Pilih preferensi cookie Anda

Kami menggunakan cookie penting serta alat serupa yang diperlukan untuk menyediakan situs dan layanan. Kami menggunakan cookie performa untuk mengumpulkan statistik anonim sehingga kami dapat memahami cara pelanggan menggunakan situs dan melakukan perbaikan. Cookie penting tidak dapat dinonaktifkan, tetapi Anda dapat mengklik “Kustom” atau “Tolak” untuk menolak cookie performa.

Jika Anda setuju, AWS dan pihak ketiga yang disetujui juga akan menggunakan cookie untuk menyediakan fitur situs yang berguna, mengingat preferensi Anda, dan menampilkan konten yang relevan, termasuk iklan yang relevan. Untuk menerima atau menolak semua cookie yang tidak penting, klik “Terima” atau “Tolak”. Untuk membuat pilihan yang lebih detail, klik “Kustomisasi”.

ModifyVpcAttribute

Mode fokus
ModifyVpcAttribute - Amazon Elastic Compute Cloud
Halaman ini belum diterjemahkan ke dalam bahasa Anda. Minta terjemahan

Modifies the specified attribute of the specified VPC.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

EnableDnsHostnames

Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.

Type: AttributeBooleanValue object

Required: No

EnableDnsSupport

Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

Type: AttributeBooleanValue object

Required: No

EnableNetworkAddressUsageMetrics

Indicates whether Network Address Usage metrics are enabled for your VPC.

Type: AttributeBooleanValue object

Required: No

VpcId

The ID of the VPC.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

requestId

The ID of the request.

Type: String

return

Is true if the request succeeds, and an error otherwise.

Type: Boolean

Errors

For information about the errors that are common to all actions, see Common client error codes.

Examples

Example

This example disables support for DNS hostnames in the specified VPC.

Sample Request

https://ec2.amazonaws.com/?Action=ModifyVpcAttribute &VpcId=vpc-1a2b3c4d &EnableDnsHostnames.Value=false &AUTHPARAMS

Sample Response

<ModifyVpcAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>d742de94-5f3e-4c3d-b6d4-440cexample</requestId> <return>true</return> </ModifyVpcAttributeResponse>

See Also

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

Di halaman ini

PrivasiSyarat situsPreferensi cookie
© 2025, Amazon Web Services, Inc. atau afiliasinya. Semua hak dilindungi undang-undang.