View a markdown version of this page

ReplicaRegions - AWS Serverless Application Model

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

ReplicaRegions

指定 MultiRegion或 PerRegion Web 函數端點複寫函數的區域。您可以指定區域代碼和區域群組的清單,或包含區域並選擇性地排除其中部分區域的物件。

您可以在指定區域的任何位置使用下列區域群組:

  • US: us-east-1, us-east-2, us-west-1, us-west-2

  • EU: eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-north-1

  • AP: ap-south-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-southeast-1, ap-southeast-2

  • CA: ca-central-1

  • SA: sa-east-1

  • SPARSE_GLOBAL:每個洲一或兩個區域,涵蓋較少區域的全球範圍:us-east-1、eu-west-1、eu-central-1、ap-northeast-1ap-southeast-1、ap-southeast-2、、 sa-east-1

  • ALL_STANDARD:US、、CA、 和 SA群組中的每個區域 EU AP(17 個區域)

語法

若要在 AWS Serverless Application Model (AWS SAM) 範本中宣告此實體,請使用下列語法。

YAML

ExcludeRegions: List IncludeRegions: List

Properties

ExcludeRegions

要從 移除的區域代碼和區域群組清單IncludeRegions。您也必須指定 IncludeRegions。項目不能是內部函數,而且當 IncludeRegions包含內部函數ExcludeRegions時,您無法使用 。

類型:清單

必要:否

CloudFormation 相容性:此屬性對 是唯一的 AWS SAM ,並且沒有 CloudFormation 同等屬性。

IncludeRegions

要複寫函數的區域代碼和區域群組清單。清單本身不能是內部 函數,但個別項目可以。

類型:清單

必要:否

CloudFormation 相容性:此屬性類似於 AWS::Lambda::WebFunctionEndpoint resource. AWS SAM expands 區域群組的 Regions 屬性,並移除任何ExcludeRegions項目以產生區域清單。

範例

區域清單

下列範例會將函數複寫到兩個區域。

ReplicaRegions: - us-east-1 - eu-west-1

具有排除的區域群組

下列範例會將 函數複寫至美國區域,但 除外us-west-1。

ReplicaRegions: IncludeRegions: - US ExcludeRegions: - us-west-1