New-AzContainerAppConfigurationObject
建立 Configuration 的記憶體內部物件。
語法
New-AzContainerAppConfigurationObject
[-ActiveRevisionsMode <String>]
[-CorPolicyAllowCredentials <Boolean>]
[-CorPolicyAllowedHeader <String[]>]
[-CorPolicyAllowedMethod <String[]>]
[-CorPolicyAllowedOrigin <String[]>]
[-CorPolicyExposeHeader <String[]>]
[-CorPolicyMaxAge <Int32>]
[-DaprAppId <String>]
[-DaprAppPort <Int32>]
[-DaprAppProtocol <String>]
[-DaprEnableApiLogging <Boolean>]
[-DaprEnabled <Boolean>]
[-DaprHttpMaxRequestSize <Int32>]
[-DaprHttpReadBufferSize <Int32>]
[-DaprLogLevel <String>]
[-IngressAllowInsecure <Boolean>]
[-IngressClientCertificateMode <String>]
[-IngressCustomDomain <ICustomDomain[]>]
[-IngressExposedPort <Int32>]
[-IngressExternal <Boolean>]
[-IngressIPSecurityRestriction <IIPSecurityRestrictionRule[]>]
[-IngressTargetPort <Int32>]
[-IngressTraffic <ITrafficWeight[]>]
[-IngressTransport <String>]
[-MaxInactiveRevision <Int32>]
[-Registry <IRegistryCredentials[]>]
[-Secret <ISecret[]>]
[-ServiceType <String>]
[-StickySessionAffinity <String>]
[<CommonParameters>]
Description
建立 Configuration 的記憶體內部物件。
範例
範例 1:建立 Configuration 的記憶體內部物件。
$customDomain = New-AzContainerAppCustomDomainObject -Name "www.my-name.com" -BindingType "SniEnabled" -CertificateId "/subscriptions/{subId}/resourceGroups/azps_test_group_app/providers/Microsoft.App/managedEnvironments/{manageEnvName}/certificates/{testcert}"
$trafficWeight = New-AzContainerAppTrafficWeightObject -Label "production" -RevisionName "testcontainerApp0-ab1234" -Weight 100
$iPSecurityRestrictionRule = New-AzContainerAppIPSecurityRestrictionRuleObject -Action "Allow" -IPAddressRange "192.168.1.1/32" -Name "Allow work IP A subnet"
New-AzContainerAppConfigurationObject -IngressCustomDomain $customDomain -IngressIPSecurityRestriction $iPSecurityRestrictionRule -IngressTraffic $trafficWeight -IngressExternal:$True -IngressTargetPort 3000 -IngressClientCertificateMode "accept" -CorPolicyAllowedOrigin "https://a.test.com","https://b.test.com" -CorPolicyAllowedMethod "GET","POST" -CorPolicyAllowedHeader "HEADER1","HEADER2" -CorPolicyExposeHeader "HEADER3","HEADER4" -CorPolicyMaxAge 1234 -CorPolicyAllowCredentials:$True -DaprEnabled:$True -DaprAppPort 3000 -DaprAppProtocol "http" -DaprHttpReadBufferSize 30 -DaprHttpMaxRequestSize 10 -DaprLogLevel "debug" -DaprEnableApiLogging:$True -MaxInactiveRevision 10 -ServiceType "redis" -IngressTransport "http"
ActiveRevisionsMode MaxInactiveRevision
------------------- -------------------
10
建立 Configuration 的記憶體內部物件。
參數
-ActiveRevisionsMode
ActiveRevisionsMode 控制容器應用程式的使用中修訂處理方式:<清單><專案>多個:多個修訂可以使用中。</item><專案>Single:一次只能使用一個修訂。 無法在此模式中使用修訂權數。 如果未提供任何值,則這是預設值。</item></list>。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorPolicyAllowCredentials
指定資源是否允許認證。
類型: | Boolean |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorPolicyAllowedHeader
指定 access-control-allow-headers 標頭的內容。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorPolicyAllowedMethod
指定 access-control-allow-methods 標頭的內容。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorPolicyAllowedOrigin
指定 access-control-allow-origins 標頭的內容。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorPolicyExposeHeader
指定 access-control-expose-headers 標頭 的內容。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorPolicyMaxAge
指定 access-control-max-age 標頭的內容。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprAppId
Dapr 應用程式識別碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprAppPort
告知 Dapr 您的應用程式正在接聽哪個埠。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprAppProtocol
告知 Dapr 您的應用程式所使用的通訊協定。 有效的選項為 HTTP 和 grpc。 預設值為 HTTP。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprEnableApiLogging
啟用 Dapr Sidecar 的 API 記錄。
類型: | Boolean |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprEnabled
布爾值,指出 Dapr 側車是否已啟用。
類型: | Boolean |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprHttpMaxRequestSize
增加 MB 中要求本文 HTTP 和 grpc 伺服器參數的大小上限,以處理大型檔案上傳。 預設值為 4 MB。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprHttpReadBufferSize
在傳送多 KB 標頭標頭時,要處理之 HTTP 標頭讀取緩衝區的大小上限。 預設值為 65KB。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DaprLogLevel
設定 Dapr 側車的記錄層級。 允許的值為偵錯、資訊、警告、錯誤。 預設值為 info。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressAllowInsecure
布爾,指出是否允許 HTTP 連線。 如果設定為 false HTTP 連線,則會自動重新導向至 HTTPS 連線。
類型: | Boolean |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressClientCertificateMode
mTLS 驗證的客戶端憑證模式。 Ignore 表示伺服器在轉送時卸除客戶端憑證。 Accept 表示伺服器轉送客戶端憑證,但不需要客戶端憑證。 Require 表示伺服器需要客戶端憑證。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressCustomDomain
Container Apps 主機名的自定義網域系結。
類型: | ICustomDomain[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressExposedPort
容器中公開的埠,用於來自輸入的 TCP 流量。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressExternal
布爾值,指出應用程式是否公開外部 HTTP 端點。
類型: | Boolean |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressIPSecurityRestriction
限制連入IP位址的規則。
類型: | IIPSecurityRestrictionRule[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressTargetPort
針對來自輸入的流量,將容器中的埠設為目標。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressTraffic
應用程式修訂的流量權數。
類型: | ITrafficWeight[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IngressTransport
輸入傳輸通訊協定。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-MaxInactiveRevision
自選。 容器應用程式可以擁有的最大非使用中修訂。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Registry
容器應用程式所使用的容器的私人容器登錄認證集合。
類型: | IRegistryCredentials[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Secret
容器應用程式所使用的秘密集合。
類型: | ISecret[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ServiceType
Dev ContainerApp 服務類型。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-StickySessionAffinity
黏性會話親和性。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |