本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
HttpApiDomainConfiguration
設定 API 的自訂網域。
語法
若要在 AWS Serverless Application Model (AWS SAM) 範本中宣告此實體,請使用下列語法。
YAML
BasePath:ListCertificateArn:StringDomainName:StringEndpointConfiguration:StringMutualTlsAuthentication:MutualTlsAuthenticationOwnershipVerificationCertificateArn:StringRoute53:Route53ConfigurationSecurityPolicy:String
屬性
-
BasePath -
要使用 Amazon API Gateway 網域名稱設定的基本路徑清單。
類型:清單
必要:否
預設:/
CloudFormation 相容性:此屬性類似於
AWS::ApiGatewayV2::ApiMappingresource.creates 的ApiMappingKey屬性。 會 AWS SAM 建立多個AWS::ApiGatewayV2::ApiMapping資源,每個在此屬性中指定的值各一個。 -
CertificateArn -
此網域名稱端點受 AWS 管憑證的 Amazon Resource Name (ARN)。 AWS Certificate Manager 是唯一支援的來源。
類型:字串
必要:是
CloudFormation 相容性:此屬性會直接傳遞至
AWS::ApiGateway2::DomainName DomainNameConfiguration資源的CertificateArn屬性。 -
DomainName -
API Gateway API 的自訂網域名稱。不支援大寫字母。
AWS SAM 會在設定此屬性時產生
AWS::ApiGatewayV2::DomainName資源。如需此案例的資訊,請參閱 已指定 DomainName 屬性。如需產生 CloudFormation 資源的資訊,請參閱產生的 CloudFormation 資源 AWS SAM。類型:字串
必要:是
CloudFormation 相容性:此屬性會直接傳遞至
AWS::ApiGateway2::DomainName資源的DomainName屬性。 -
EndpointConfiguration -
定義要映射到自訂網域的 API Gateway 端點類型。此屬性的值會決定
CertificateArn屬性的映射方式 CloudFormation。HTTP APIs 的唯一有效值是
REGIONAL。類型:字串
必要:否
預設:
REGIONALCloudFormation 相容性:此屬性對 是唯一的 AWS SAM ,並且沒有 CloudFormation 同等的。
-
MutualTlsAuthentication -
自訂網域名稱的相互傳輸層安全 (TLS) 身分驗證組態。
必要:否
CloudFormation 相容性:此屬性會直接傳遞至
AWS::ApiGatewayV2::DomainName資源的MutualTlsAuthentication屬性。 -
OwnershipVerificationCertificateArn -
ACM 核發之公有憑證的 ARN,用於驗證您的自訂網域的擁有權。只有在您設定相互 TLS 且為 指定 ACM 匯入或私有 CA 憑證 ARN 時,才需要
CertificateArn。類型:字串
必要:否
CloudFormation 相容性:此屬性會直接傳遞至
AWS::ApiGatewayV2::DomainNameDomainNameConfiguration資料類型的OwnershipVerificationCertificateArn屬性。 -
Route53 -
定義 Amazon Route 53 組態。
必要:否
CloudFormation 相容性:此屬性對 是唯一的 AWS SAM ,並且沒有 CloudFormation 同等的。
-
SecurityPolicy -
此網域名稱之安全政策的 TLS 版本。
HTTP APIs 的唯一有效值是
TLS_1_2。類型:字串
必要:否
CloudFormation 相容性:此屬性會直接傳遞至
AWS::ApiGatewayV2::DomainNameDomainNameConfiguration資料類型的SecurityPolicy屬性。
範例
DomainName
DomainName 範例
YAML
Domain: DomainName: www.example.com CertificateArn: arn-example EndpointConfiguration: REGIONAL Route53: HostedZoneId: Z1PA6795UKMFR9 BasePath: - foo - bar