選取您的 Cookie 偏好設定

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

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

GetHostedZone - Amazon Route 53
此頁面尚未翻譯為您的語言。 請求翻譯

GetHostedZone

Gets information about a specified hosted zone including the four name servers assigned to the hosted zone.

returns the VPCs associated with the specified hosted zone and does not reflect the VPC associations by Route 53 Profiles. To get the associations to a Profile, call the ListProfileAssociations API.

Request Syntax

GET /2013-04-01/hostedzone/Id HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

Id

The ID of the hosted zone that you want to get information about.

Length Constraints: Maximum length of 32.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <GetHostedZoneResponse> <DelegationSet> <CallerReference>string</CallerReference> <Id>string</Id> <NameServers> <NameServer>string</NameServer> </NameServers> </DelegationSet> <HostedZone> <CallerReference>string</CallerReference> <Config> <Comment>string</Comment> <PrivateZone>boolean</PrivateZone> </Config> <Id>string</Id> <LinkedService> <Description>string</Description> <ServicePrincipal>string</ServicePrincipal> </LinkedService> <Name>string</Name> <ResourceRecordSetCount>long</ResourceRecordSetCount> </HostedZone> <VPCs> <VPC> <VPCId>string</VPCId> <VPCRegion>string</VPCRegion> </VPC> </VPCs> </GetHostedZoneResponse>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

GetHostedZoneResponse

Root level tag for the GetHostedZoneResponse parameters.

Required: Yes

DelegationSet

A complex type that lists the Amazon Route 53 name servers for the specified hosted zone.

Type: DelegationSet object

HostedZone

A complex type that contains general information about the specified hosted zone.

Type: HostedZone object

VPCs

A complex type that contains information about the VPCs that are associated with the specified hosted zone.

Type: Array of VPC objects

Array Members: Minimum number of 1 item.

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInput

The input is not valid.

HTTP Status Code: 400

NoSuchHostedZone

No hosted zone exists with the ID that you specified.

HTTP Status Code: 404

Examples

Example Request

This example illustrates one usage of GetHostedZone.

GET /2013-04-01/hostedzone/Z1PA6795UKMFR9

Example Response (Public Hosted Zone, Default Delegation Set Assigned by Route 53)

This example illustrates one usage of GetHostedZone.

HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <GetHostedZoneResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <HostedZone> <Id>/hostedzone/Z1PA6795UKMFR9</Id> <Name>example.com.</Name> <CallerReference>2017-03-01T11:22:14Z</CallerReference> <Config> <Comment>This is my first hosted zone.</Comment> <PrivateZone>false</PrivateZone> </Config> <ResourceRecordSetCount>17</ResourceRecordSetCount> </HostedZone> <DelegationSet> <NameServers> <NameServer>ns-2048.awsdns-64.com</NameServer> <NameServer>ns-2049.awsdns-65.net</NameServer> <NameServer>ns-2050.awsdns-66.org</NameServer> <NameServer>ns-2051.awsdns-67.co.uk</NameServer> </NameServers> </DelegationSet> </GetHostedZoneResponse>

Example Response (Public Hosted Zone, Reusable Delegation Set)

This example illustrates one usage of GetHostedZone.

HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <GetHostedZoneResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <HostedZone> <Id>/hostedzone/Z1PA6795UKMFR9</Id> <Name>example.com.</Name> <CallerReference>2017-03-02T10:44:04Z</CallerReference> <Config> <Comment>This is my first hosted zone.</Comment> <PrivateZone>false</PrivateZone> </Config> <ResourceRecordSetCount>17</ResourceRecordSetCount> </HostedZone> <DelegationSet> <Id>NU241VPSAMPLE</Id> <CallerReference>2017-03-01T11:22:14Z</CallerReference> <NameServers> <NameServer>ns-2048.awsdns-64.com</NameServer> <NameServer>ns-2049.awsdns-65.net</NameServer> <NameServer>ns-2050.awsdns-66.org</NameServer> <NameServer>ns-2051.awsdns-67.co.uk</NameServer> </NameServers> </DelegationSet> </GetHostedZoneResponse>

Example Response (Private Hosted Zone)

This example illustrates one usage of GetHostedZone.

HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <GetHostedZoneResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <HostedZone> <Id>/hostedzone/Z1PA6795UKMFR9</Id> <Name>example.com.</Name> <CallerReference>myUniqueIdentifier</CallerReference> <Config> <Comment>This is my first hosted zone.</Comment> <PrivateZone>true</PrivateZone> </Config> <ResourceRecordSetCount>17</ResourceRecordSetCount> </HostedZone> <VPCs> <VPC> <VPCRegion>us-east-2</VPCRegion> <VPCId>vpc-1a2b3c4d</VPCId> </VPC> </VPCs> </GetHostedZoneResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。