選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

Finding VPC IDs in AMS

焦點模式
Finding VPC IDs in AMS - AMS Advanced User Guide
此頁面尚未翻譯為您的語言。 請求翻譯

A virtual private cloud (VPC) has one or more subnets. In AMS your VPC is in an AWS Region and you have private and public subnets.

See also Finding subnet IDs in AMS.

Some CTs require the VpcId. To find a VPC ID, you can use either the AMS console or API/CLI.

AMS Console:

In the navigation pane, select VPCs and the relevant VPC. The VPC details page for the selected VPC opens with information including the VPC ID.

AMS SKMS API ListVpcSummaries or CLI:

Note

The AMS CLI must be installed for these commands to work. To install the AMS API or CLI, go to the AMS console Developers Resources page. For reference material on the AMS CM API or AMS SKMS API, see the AMS Information Resources section in the User Guide. You may need to add a --profile option for authentication; for example, aws amsskms ams-cli-command --profile SAML. You may also need to add the --region option as all AMS commands run out of us-east-1; for example aws amscm ams-cli-command --region=us-east-1.

Note

The AMS API/CLI (amscm and amsskms) endpoints are in the AWS N. Virginia Region, us-east-1. Depending on how your authentication is set, and what AWS Region your account and resources are in, you may need to add --region us-east-1 when issuing commands. You may also need to add --profile saml, if that is your authentication method.

  1. In the following examples, the first command requests a list of summaries for all VPCs in the account. The second command requests the list of VPCs, with a query filter to list only those VPCs created in 2016, and output the CreatedTime, VpcId, and Name.

    Note

    You can obtain the AMS SKMS CLI through the Developer's Resources page in the AMS console.

    aws amsskms list-vpc-summaries --output table
    ----------------------------------------------------- | ListVPCSummaries | +---------------------------------------------------+ | VPCSummaries | |+------------------+-------------------------------| | CreatedTime | 2016-01-15T18:50:11Z | | VpcId | vpc-01234567890abcdef | | LastModifiedTime| 2016-01-15T18:50:11Z | | Name | 952444781316-initial-vpc | |+------------------+-------------------------------| | Visibility | |+------------------+-------------------------------| | Id | PrivateAndPublic | | Name | PrivateAndPublic | |+------------------+-------------------------------|
  2. This time with a query:

    aws amsskms list-VPC-summaries --query "VPCSummaries[?starts_with(@.CreatedTime,to_string(`2016`))].[CreatedTime, VpcId, Name]" --output table
    ------------------------------------------------------------------------- | ListVPCSummaries | +---------------------+-----------------------+--------------------------+ |2016-01-15T18:50:11Z | vpc-01234567890abcdef | 952444781316-initial-VPC | +---------------------+-----------------------+--------------------------+
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。