调用 AWS 服务、区域、终端节点、可用区、本地区域和波长区域的公有参数 - AWS Systems Manager
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

调用 AWS 服务、区域、终端节点、可用区、本地区域和波长区域的公有参数

您可以使用以下路径调用公有参数的 AWS 区域、服务、终端节点和可用区。

/aws/service/global-infrastructure

查看活动 AWS 区域

您可以在 AWS (AWS Command Line Interface) 中使用以下命令查看所有活动 AWS CLI 区域的列表。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/regions \ --query 'Parameters[].Name'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/regions ^ --query Parameters[].Name

此命令会返回如下信息。

[
    "/aws/service/global-infrastructure/regions/af-south-1",
    "/aws/service/global-infrastructure/regions/ap-east-1",
    "/aws/service/global-infrastructure/regions/ap-northeast-3",
    "/aws/service/global-infrastructure/regions/ap-southeast-1",
    "/aws/service/global-infrastructure/regions/ca-central-1",
    "/aws/service/global-infrastructure/regions/cn-north-1",
    "/aws/service/global-infrastructure/regions/eu-west-2",
    "/aws/service/global-infrastructure/regions/eu-west-3",
    "/aws/service/global-infrastructure/regions/us-east-1",
    "/aws/service/global-infrastructure/regions/us-gov-west-1",
    "/aws/service/global-infrastructure/regions/ap-northeast-2",
    "/aws/service/global-infrastructure/regions/ap-south-1",
    "/aws/service/global-infrastructure/regions/ap-southeast-2",
    "/aws/service/global-infrastructure/regions/cn-northwest-1",
    "/aws/service/global-infrastructure/regions/eu-south-1",
    "/aws/service/global-infrastructure/regions/me-south-1",
    "/aws/service/global-infrastructure/regions/sa-east-1",
    "/aws/service/global-infrastructure/regions/us-east-2",
    "/aws/service/global-infrastructure/regions/us-gov-east-1",
    "/aws/service/global-infrastructure/regions/us-west-1",
    "/aws/service/global-infrastructure/regions/ap-northeast-1",
    "/aws/service/global-infrastructure/regions/eu-central-1",
    "/aws/service/global-infrastructure/regions/eu-north-1",
    "/aws/service/global-infrastructure/regions/eu-west-1",
    "/aws/service/global-infrastructure/regions/us-west-2"
]

查看可用 AWS 服务

您可以使用以下命令查看所有可用 AWS 服务的完整列表,并将其按字母顺序排序。此示例输出已由于空间问题截断。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/services \ --query 'Parameters[].Name | sort(@)'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/services ^ --query "Parameters[].Name | sort(@)"

此命令会返回如下信息。

[
    "/aws/service/global-infrastructure/services/acm-pca",
    "/aws/service/global-infrastructure/services/acm",
    "/aws/service/global-infrastructure/services/alexaforbusiness",
    "/aws/service/global-infrastructure/services/apigateway",
    "/aws/service/global-infrastructure/services/application-autoscaling",
    "/aws/service/global-infrastructure/services/appmesh",
    "/aws/service/global-infrastructure/services/appstream",
    "/aws/service/global-infrastructure/services/appsync",
    "/aws/service/global-infrastructure/services/athena",
    "/aws/service/global-infrastructure/services/autoscaling-plans",
    "/aws/service/global-infrastructure/services/autoscaling",
    "/aws/service/global-infrastructure/services/backup",
    "/aws/service/global-infrastructure/services/batch",
    "/aws/service/global-infrastructure/services/budgets",
    "/aws/service/global-infrastructure/services/ce",
    "/aws/service/global-infrastructure/services/chime",
    "/aws/service/global-infrastructure/services/cloud9",
    "/aws/service/global-infrastructure/services/cloudformation",
    "/aws/service/global-infrastructure/services/cloudfront",
    "/aws/service/global-infrastructure/services/cloudhsm",
    "/aws/service/global-infrastructure/services/cloudhsmv2",
    "/aws/service/global-infrastructure/services/cloudsearch",
    "/aws/service/global-infrastructure/services/cloudtrail",
    "/aws/service/global-infrastructure/services/cloudwatch",
    "/aws/service/global-infrastructure/services/codebuild",

查看 AWS 服务的支持区域

您可以查看提供服务的 AWS 区域列表。此示例使用 Systems Manager (ssm)。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/services/ssm/regions \ --query 'Parameters[].Value'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/services/ssm/regions ^ --query Parameters[].Value

此命令会返回如下信息。

[
    "ap-south-1",
    "ca-central-1",
    "cn-north-1",
    "eu-central-1",
    "eu-west-1",
    "eu-west-2",
    "eu-west-3",
    "me-south-1",
    "us-east-2",
    "us-gov-west-1",
    "af-south-1",
    "ap-east-1",
    "ap-northeast-1",
    "ap-northeast-2",
    "ap-southeast-1",
    "ap-southeast-2",
    "eu-north-1",
    "eu-south-1",
    "us-gov-east-1",
    "us-west-1",
    "cn-northwest-1",
    "sa-east-1",
    "us-east-1",
    "us-west-2"
]

查看服务的区域终端节点

您可以使用以下命令查看服务的区域终端节点。

Linux
aws ssm get-parameter \ --name /aws/service/global-infrastructure/regions/us-west-1/services/ssm/endpoint \ --query 'Parameter.Value'
Windows
aws ssm get-parameter ^ --name /aws/service/global-infrastructure/regions/us-west-1/services/ssm/endpoint ^ --query Parameter.Value

此命令会返回如下信息。

"ssm.us-west-1.amazonaws.com"

查看完整的可用区详细信息

您可以使用以下命令查看可用区。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/availability-zones/
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/availability-zones/

此命令会返回如下信息。此示例输出已由于空间问题截断。

{
    "Parameters": [
        {
            "Name": "/aws/service/global-infrastructure/availability-zones/apne3-az3",
            "Type": "String",
            "Value": "apne3-az3",
            "Version": 1,
            "LastModifiedDate": "2020-04-03T14:29:28.995000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/availability-zones/apne3-az3"
        },
        {
            "Name": "/aws/service/global-infrastructure/availability-zones/aps1-az2",
            "Type": "String",
            "Value": "aps1-az2",
            "Version": 1,
            "LastModifiedDate": "2020-04-03T14:21:02.690000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/availability-zones/aps1-az2"
        },
        {
            "Name": "/aws/service/global-infrastructure/availability-zones/cnn1-az2",
            "Type": "String",
            "Value": "cnn1-az2",
            "Version": 1,
            "LastModifiedDate": "2020-04-03T14:19:57.254000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/availability-zones/cnn1-az2"
        },

仅查看可用区名称

您只能使用以下命令查看可用区的名称。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/availability-zones \ --query 'Parameters[].Name | sort(@)'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/availability-zones ^ --query "Parameters[].Name | sort(@)"

此命令会返回如下信息。此示例输出已由于空间问题截断。

[
    "/aws/service/global-infrastructure/availability-zones/afs1-az1",
    "/aws/service/global-infrastructure/availability-zones/afs1-az2",
    "/aws/service/global-infrastructure/availability-zones/afs1-az3",
    "/aws/service/global-infrastructure/availability-zones/ape1-az1",
    "/aws/service/global-infrastructure/availability-zones/ape1-az2",
    "/aws/service/global-infrastructure/availability-zones/ape1-az3",
    "/aws/service/global-infrastructure/availability-zones/apne1-az1",
    "/aws/service/global-infrastructure/availability-zones/apne1-az2",
    "/aws/service/global-infrastructure/availability-zones/apne1-az3",
    "/aws/service/global-infrastructure/availability-zones/apne1-az4",

查看单个区域中的可用区的名称

您可以使用以下命令查看一个区域(在此示例中为 us-east-1)中的可用区的名称。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/regions/us-east-1/availability-zones \ --query 'Parameters[].Name | sort(@)'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/regions/us-east-1/availability-zones ^ --query "Parameters[].Name | sort(@)"

此命令会返回如下信息。此示例输出已由于空间问题截断。

[
    "/aws/service/global-infrastructure/regions/us-east-1/availability-zones/use1-az1",
    "/aws/service/global-infrastructure/regions/us-east-1/availability-zones/use1-az2",
    "/aws/service/global-infrastructure/regions/us-east-1/availability-zones/use1-az3",
    "/aws/service/global-infrastructure/regions/us-east-1/availability-zones/use1-az4",
    "/aws/service/global-infrastructure/regions/us-east-1/availability-zones/use1-az5",
    "/aws/service/global-infrastructure/regions/us-east-1/availability-zones/use1-az6"

仅查看可用区 ARN

您只能使用以下命令查看可用区的 Amazon 资源名称 (ARN)。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/availability-zones \ --query 'Parameters[].ARN | sort(@)'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/availability-zones ^ --query "Parameters[].ARN | sort(@)"

此命令会返回如下信息。

[
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/afs1-az1",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/afs1-az2",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/afs1-az3",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/ape1-az1",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/ape1-az2",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/ape1-az3",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/availability-zones/apne1-az1",

查看本地区域详细信息

您可以使用以下命令查看本地区域。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/local-zones
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/local-zones

此命令会返回如下信息。

{
    "Parameters": [
        {
            "Name": "/aws/service/global-infrastructure/local-zones/use1-bos1-az1",
            "Type": "String",
            "Value": "use1-bos1-az1",
            "Version": 3,
            "LastModifiedDate": "2020-12-15T14:16:37.850000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/use1-bos1-az1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/use1-mia1-az1",
            "Type": "String",
            "Value": "use1-mia1-az1",
            "Version": 3,
            "LastModifiedDate": "2020-12-15T14:16:29.234000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/use1-mia1-az1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1",
            "Type": "String",
            "Value": "usw2-lax1-az1",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.284000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az2",
            "Type": "String",
            "Value": "usw2-lax1-az2",
            "Version": 2,
            "LastModifiedDate": "2020-08-27T15:22:58.350000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az2",
            "DataType": "text"
        }
    ]
}

查看波长区域详细信息

您可以使用以下命令查看波长区域。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/wavelength-zones
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/wavelength-zones

此命令会返回如下信息。

{
    "Parameters": [
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/apne1-wl1-nrt-wlz1",
            "Type": "String",
            "Value": "apne1-wl1-nrt-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-12-15T14:16:21.815000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/apne1-wl1-nrt-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/use1-wl1-atl-wlz1",
            "Type": "String",
            "Value": "use1-wl1-atl-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-09-22T13:10:33.763000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/use1-wl1-atl-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/use1-wl1-bos-wlz1",
            "Type": "String",
            "Value": "use1-wl1-bos-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-08-06T07:11:42.758000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/use1-wl1-bos-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/use1-wl1-dfw-wlz1",
            "Type": "String",
            "Value": "use1-wl1-dfw-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-11-11T07:35:17.303000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/use1-wl1-dfw-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/use1-wl1-mia-wlz1",
            "Type": "String",
            "Value": "use1-wl1-mia-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-11-11T07:35:29.329000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/use1-wl1-mia-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/use1-wl1-nyc-wlz1",
            "Type": "String",
            "Value": "use1-wl1-nyc-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-09-22T13:10:22.365000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/use1-wl1-nyc-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/use1-wl1-was-wlz1",
            "Type": "String",
            "Value": "use1-wl1-was-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-09-22T13:10:26.787000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/use1-wl1-was-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-las-wlz1",
            "Type": "String",
            "Value": "usw2-wl1-las-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-12-01T07:29:21.944000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-las-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-sea-wlz1",
            "Type": "String",
            "Value": "usw2-wl1-sea-wlz1",
            "Version": 3,
            "LastModifiedDate": "2021-01-07T06:10:28.236000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-sea-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-sfo-wlz1",
            "Type": "String",
            "Value": "usw2-wl1-sfo-wlz1",
            "Version": 3,
            "LastModifiedDate": "2020-08-06T07:11:38.750000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-sfo-wlz1",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-den-wlz1",
            "Type": "String",
            "Value": "usw2-wl1-den-wlz1",
            "Version": 3,
            "LastModifiedDate": "2021-01-07T06:10:21.506000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/wavelength-zones/usw2-wl1-den-wlz1",
            "DataType": "text"
        }
    ]
}

查看本地区域下的所有参数和值

您可以使用以下命令查看本地区域的所有参数数据。

Linux
aws ssm get-parameters-by-path \ --path "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/"
Windows
aws ssm get-parameters-by-path ^ --path "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/"

此命令会返回如下信息。

{
    "Parameters": [
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/geolocationCountry",
            "Type": "String",
            "Value": "US",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.405000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/geolocationCountry",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/geolocationRegion",
            "Type": "String",
            "Value": "US-CA",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.466000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/geolocationRegion",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/location",
            "Type": "String",
            "Value": "US West (Los Angeles)",
            "Version": 1,
            "LastModifiedDate": "2021-01-12T11:45:21.151000-08:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/location",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/network-border-group",
            "Type": "String",
            "Value": "us-west-2-lax-1",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.597000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/network-border-group",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/parent-availability-zone",
            "Type": "String",
            "Value": "usw2-az2",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.783000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/parent-availability-zone",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/parent-region",
            "Type": "String",
            "Value": "us-west-2",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.704000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/parent-region",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/zone-group",
            "Type": "String",
            "Value": "us-west-2-lax-1",
            "Version": 1,
            "LastModifiedDate": "2020-04-29T20:36:58.534000-07:00",
            "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/zone-group",
            "DataType": "text"
        }
    ]
}

仅查看本地区域参数名称

您可以使用以下命令仅查看本地区域参数的名称。

Linux
aws ssm get-parameters-by-path \ --path /aws/service/global-infrastructure/local-zones/usw2-lax1-az1 \ --query 'Parameters[].Name | sort(@)'
Windows
aws ssm get-parameters-by-path ^ --path /aws/service/global-infrastructure/local-zones/usw2-lax1-az1 ^ --query "Parameters[].Name | sort(@)"

此命令会返回如下信息。

[
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/geolocationCountry",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/geolocationRegion",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/network-border-group",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/parent-availability-zone",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/parent-region",
    "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/local-zones/usw2-lax1-az1/zone-group"
]