Struct aws_sdk_ec2::client::fluent_builders::CreateDhcpOptions
source · pub struct CreateDhcpOptions { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateDhcpOptions
.
Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132.
-
domain-name-servers
- The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. To have your instance receive a custom DNS hostname as specified indomain-name
, you must setdomain-name-servers
to a custom DNS server. -
domain-name
- If you're using AmazonProvidedDNS inus-east-1
, specifyec2.internal
. If you're using AmazonProvidedDNS in another Region, specifyregion.compute.internal
(for example,ap-northeast-1.compute.internal
). Otherwise, specify a domain name (for example,ExampleCompany.com
). This value is used to complete unqualified DNS hostnames. Important: Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name. -
ntp-servers
- The IP addresses of up to four Network Time Protocol (NTP) servers. -
netbios-name-servers
- The IP addresses of up to four NetBIOS name servers. -
netbios-node-type
- The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132.
Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an internet gateway, make sure to set the domain-name-servers
option either to AmazonProvidedDNS
or to a domain name server of your choice. For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide.
Implementations§
source§impl CreateDhcpOptions
impl CreateDhcpOptions
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateDhcpOptions, AwsResponseRetryClassifier>, SdkError<CreateDhcpOptionsError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CreateDhcpOptions, AwsResponseRetryClassifier>, SdkError<CreateDhcpOptionsError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CreateDhcpOptionsOutput, SdkError<CreateDhcpOptionsError>>
pub async fn send(
self
) -> Result<CreateDhcpOptionsOutput, SdkError<CreateDhcpOptionsError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn dhcp_configurations(self, input: NewDhcpConfiguration) -> Self
pub fn dhcp_configurations(self, input: NewDhcpConfiguration) -> Self
Appends an item to DhcpConfigurations
.
To override the contents of this collection use set_dhcp_configurations
.
A DHCP configuration option.
sourcepub fn set_dhcp_configurations(
self,
input: Option<Vec<NewDhcpConfiguration>>
) -> Self
pub fn set_dhcp_configurations(
self,
input: Option<Vec<NewDhcpConfiguration>>
) -> Self
A DHCP configuration option.
sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to TagSpecifications
.
To override the contents of this collection use set_tag_specifications
.
The tags to assign to the DHCP option.
sourcepub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
pub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
The tags to assign to the DHCP option.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
Trait Implementations§
source§impl Clone for CreateDhcpOptions
impl Clone for CreateDhcpOptions
source§fn clone(&self) -> CreateDhcpOptions
fn clone(&self) -> CreateDhcpOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more