aws_sdk_servicediscovery/operation/register_instance/_register_instance_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RegisterInstanceInput {
6 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to use for settings for the instance. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
7 pub service_id: ::std::option::Option<::std::string::String>,
8 /// <p>An identifier that you want to associate with the instance. Note the following:</p>
9 /// <ul>
10 /// <li>
11 /// <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p></li>
12 /// <li>
13 /// <p>You can use this value to update an existing instance.</p></li>
14 /// <li>
15 /// <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service.</p></li>
16 /// <li>
17 /// <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one.</p><note>
18 /// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
19 /// </note></li>
20 /// </ul><note>
21 /// <p>Do not include sensitive information in <code>InstanceId</code> if the namespace is discoverable by public DNS queries and any <code>Type</code> member of <code>DnsRecord</code> for the service contains <code>SRV</code> because the <code>InstanceId</code> is discoverable by public DNS queries.</p>
22 /// </note>
23 pub instance_id: ::std::option::Option<::std::string::String>,
24 /// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
25 pub creator_request_id: ::std::option::Option<::std::string::String>,
26 /// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
27 /// <ul>
28 /// <li>
29 /// <p>The attributes that apply to the records that are defined in the service.</p></li>
30 /// <li>
31 /// <p>For each attribute, the applicable value.</p></li>
32 /// </ul><important>
33 /// <p>Do not include sensitive information in the attributes if the namespace is discoverable by public DNS queries.</p>
34 /// </important>
35 /// <p>The following are the supported attribute keys.</p>
36 /// <dl>
37 /// <dt>
38 /// AWS_ALIAS_DNS_NAME
39 /// </dt>
40 /// <dd>
41 /// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
42 /// <p>Note the following:</p>
43 /// <ul>
44 /// <li>
45 /// <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p></li>
46 /// <li>
47 /// <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p></li>
48 /// <li>
49 /// <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p></li>
50 /// <li>
51 /// <p>Cloud Map currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p></li>
52 /// <li>
53 /// <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p></li>
54 /// <li>
55 /// <p>The <code>AWS_ALIAS_DNS_NAME</code> is not supported in the GovCloud (US) Regions.</p></li>
56 /// </ul>
57 /// </dd>
58 /// <dt>
59 /// AWS_EC2_INSTANCE_ID
60 /// </dt>
61 /// <dd>
62 /// <p><i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
63 /// </dd>
64 /// <dt>
65 /// AWS_INIT_HEALTH_STATUS
66 /// </dt>
67 /// <dd>
68 /// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
69 /// </dd>
70 /// <dt>
71 /// AWS_INSTANCE_CNAME
72 /// </dt>
73 /// <dd>
74 /// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
75 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
76 /// </dd>
77 /// <dt>
78 /// AWS_INSTANCE_IPV4
79 /// </dt>
80 /// <dd>
81 /// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
82 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
83 /// </dd>
84 /// <dt>
85 /// AWS_INSTANCE_IPV6
86 /// </dt>
87 /// <dd>
88 /// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
89 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
90 /// </dd>
91 /// <dt>
92 /// AWS_INSTANCE_PORT
93 /// </dt>
94 /// <dd>
95 /// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
96 /// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to.</p>
97 /// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
98 /// </dd>
99 /// <dt>
100 /// Custom attributes
101 /// </dt>
102 /// <dd>
103 /// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
104 /// </dd>
105 /// </dl>
106 pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
107}
108impl RegisterInstanceInput {
109 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to use for settings for the instance. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
110 pub fn service_id(&self) -> ::std::option::Option<&str> {
111 self.service_id.as_deref()
112 }
113 /// <p>An identifier that you want to associate with the instance. Note the following:</p>
114 /// <ul>
115 /// <li>
116 /// <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p></li>
117 /// <li>
118 /// <p>You can use this value to update an existing instance.</p></li>
119 /// <li>
120 /// <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service.</p></li>
121 /// <li>
122 /// <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one.</p><note>
123 /// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
124 /// </note></li>
125 /// </ul><note>
126 /// <p>Do not include sensitive information in <code>InstanceId</code> if the namespace is discoverable by public DNS queries and any <code>Type</code> member of <code>DnsRecord</code> for the service contains <code>SRV</code> because the <code>InstanceId</code> is discoverable by public DNS queries.</p>
127 /// </note>
128 pub fn instance_id(&self) -> ::std::option::Option<&str> {
129 self.instance_id.as_deref()
130 }
131 /// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
132 pub fn creator_request_id(&self) -> ::std::option::Option<&str> {
133 self.creator_request_id.as_deref()
134 }
135 /// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
136 /// <ul>
137 /// <li>
138 /// <p>The attributes that apply to the records that are defined in the service.</p></li>
139 /// <li>
140 /// <p>For each attribute, the applicable value.</p></li>
141 /// </ul><important>
142 /// <p>Do not include sensitive information in the attributes if the namespace is discoverable by public DNS queries.</p>
143 /// </important>
144 /// <p>The following are the supported attribute keys.</p>
145 /// <dl>
146 /// <dt>
147 /// AWS_ALIAS_DNS_NAME
148 /// </dt>
149 /// <dd>
150 /// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
151 /// <p>Note the following:</p>
152 /// <ul>
153 /// <li>
154 /// <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p></li>
155 /// <li>
156 /// <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p></li>
157 /// <li>
158 /// <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p></li>
159 /// <li>
160 /// <p>Cloud Map currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p></li>
161 /// <li>
162 /// <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p></li>
163 /// <li>
164 /// <p>The <code>AWS_ALIAS_DNS_NAME</code> is not supported in the GovCloud (US) Regions.</p></li>
165 /// </ul>
166 /// </dd>
167 /// <dt>
168 /// AWS_EC2_INSTANCE_ID
169 /// </dt>
170 /// <dd>
171 /// <p><i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
172 /// </dd>
173 /// <dt>
174 /// AWS_INIT_HEALTH_STATUS
175 /// </dt>
176 /// <dd>
177 /// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
178 /// </dd>
179 /// <dt>
180 /// AWS_INSTANCE_CNAME
181 /// </dt>
182 /// <dd>
183 /// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
184 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
185 /// </dd>
186 /// <dt>
187 /// AWS_INSTANCE_IPV4
188 /// </dt>
189 /// <dd>
190 /// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
191 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
192 /// </dd>
193 /// <dt>
194 /// AWS_INSTANCE_IPV6
195 /// </dt>
196 /// <dd>
197 /// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
198 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
199 /// </dd>
200 /// <dt>
201 /// AWS_INSTANCE_PORT
202 /// </dt>
203 /// <dd>
204 /// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
205 /// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to.</p>
206 /// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
207 /// </dd>
208 /// <dt>
209 /// Custom attributes
210 /// </dt>
211 /// <dd>
212 /// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
213 /// </dd>
214 /// </dl>
215 pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
216 self.attributes.as_ref()
217 }
218}
219impl RegisterInstanceInput {
220 /// Creates a new builder-style object to manufacture [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
221 pub fn builder() -> crate::operation::register_instance::builders::RegisterInstanceInputBuilder {
222 crate::operation::register_instance::builders::RegisterInstanceInputBuilder::default()
223 }
224}
225
226/// A builder for [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
227#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
228#[non_exhaustive]
229pub struct RegisterInstanceInputBuilder {
230 pub(crate) service_id: ::std::option::Option<::std::string::String>,
231 pub(crate) instance_id: ::std::option::Option<::std::string::String>,
232 pub(crate) creator_request_id: ::std::option::Option<::std::string::String>,
233 pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
234}
235impl RegisterInstanceInputBuilder {
236 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to use for settings for the instance. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
237 /// This field is required.
238 pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239 self.service_id = ::std::option::Option::Some(input.into());
240 self
241 }
242 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to use for settings for the instance. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
243 pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.service_id = input;
245 self
246 }
247 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to use for settings for the instance. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
248 pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
249 &self.service_id
250 }
251 /// <p>An identifier that you want to associate with the instance. Note the following:</p>
252 /// <ul>
253 /// <li>
254 /// <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p></li>
255 /// <li>
256 /// <p>You can use this value to update an existing instance.</p></li>
257 /// <li>
258 /// <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service.</p></li>
259 /// <li>
260 /// <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one.</p><note>
261 /// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
262 /// </note></li>
263 /// </ul><note>
264 /// <p>Do not include sensitive information in <code>InstanceId</code> if the namespace is discoverable by public DNS queries and any <code>Type</code> member of <code>DnsRecord</code> for the service contains <code>SRV</code> because the <code>InstanceId</code> is discoverable by public DNS queries.</p>
265 /// </note>
266 /// This field is required.
267 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.instance_id = ::std::option::Option::Some(input.into());
269 self
270 }
271 /// <p>An identifier that you want to associate with the instance. Note the following:</p>
272 /// <ul>
273 /// <li>
274 /// <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p></li>
275 /// <li>
276 /// <p>You can use this value to update an existing instance.</p></li>
277 /// <li>
278 /// <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service.</p></li>
279 /// <li>
280 /// <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one.</p><note>
281 /// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
282 /// </note></li>
283 /// </ul><note>
284 /// <p>Do not include sensitive information in <code>InstanceId</code> if the namespace is discoverable by public DNS queries and any <code>Type</code> member of <code>DnsRecord</code> for the service contains <code>SRV</code> because the <code>InstanceId</code> is discoverable by public DNS queries.</p>
285 /// </note>
286 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287 self.instance_id = input;
288 self
289 }
290 /// <p>An identifier that you want to associate with the instance. Note the following:</p>
291 /// <ul>
292 /// <li>
293 /// <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p></li>
294 /// <li>
295 /// <p>You can use this value to update an existing instance.</p></li>
296 /// <li>
297 /// <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service.</p></li>
298 /// <li>
299 /// <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one.</p><note>
300 /// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
301 /// </note></li>
302 /// </ul><note>
303 /// <p>Do not include sensitive information in <code>InstanceId</code> if the namespace is discoverable by public DNS queries and any <code>Type</code> member of <code>DnsRecord</code> for the service contains <code>SRV</code> because the <code>InstanceId</code> is discoverable by public DNS queries.</p>
304 /// </note>
305 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
306 &self.instance_id
307 }
308 /// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
309 pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
310 self.creator_request_id = ::std::option::Option::Some(input.into());
311 self
312 }
313 /// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
314 pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
315 self.creator_request_id = input;
316 self
317 }
318 /// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
319 pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
320 &self.creator_request_id
321 }
322 /// Adds a key-value pair to `attributes`.
323 ///
324 /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
325 ///
326 /// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
327 /// <ul>
328 /// <li>
329 /// <p>The attributes that apply to the records that are defined in the service.</p></li>
330 /// <li>
331 /// <p>For each attribute, the applicable value.</p></li>
332 /// </ul><important>
333 /// <p>Do not include sensitive information in the attributes if the namespace is discoverable by public DNS queries.</p>
334 /// </important>
335 /// <p>The following are the supported attribute keys.</p>
336 /// <dl>
337 /// <dt>
338 /// AWS_ALIAS_DNS_NAME
339 /// </dt>
340 /// <dd>
341 /// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
342 /// <p>Note the following:</p>
343 /// <ul>
344 /// <li>
345 /// <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p></li>
346 /// <li>
347 /// <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p></li>
348 /// <li>
349 /// <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p></li>
350 /// <li>
351 /// <p>Cloud Map currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p></li>
352 /// <li>
353 /// <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p></li>
354 /// <li>
355 /// <p>The <code>AWS_ALIAS_DNS_NAME</code> is not supported in the GovCloud (US) Regions.</p></li>
356 /// </ul>
357 /// </dd>
358 /// <dt>
359 /// AWS_EC2_INSTANCE_ID
360 /// </dt>
361 /// <dd>
362 /// <p><i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
363 /// </dd>
364 /// <dt>
365 /// AWS_INIT_HEALTH_STATUS
366 /// </dt>
367 /// <dd>
368 /// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
369 /// </dd>
370 /// <dt>
371 /// AWS_INSTANCE_CNAME
372 /// </dt>
373 /// <dd>
374 /// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
375 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
376 /// </dd>
377 /// <dt>
378 /// AWS_INSTANCE_IPV4
379 /// </dt>
380 /// <dd>
381 /// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
382 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
383 /// </dd>
384 /// <dt>
385 /// AWS_INSTANCE_IPV6
386 /// </dt>
387 /// <dd>
388 /// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
389 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
390 /// </dd>
391 /// <dt>
392 /// AWS_INSTANCE_PORT
393 /// </dt>
394 /// <dd>
395 /// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
396 /// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to.</p>
397 /// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
398 /// </dd>
399 /// <dt>
400 /// Custom attributes
401 /// </dt>
402 /// <dd>
403 /// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
404 /// </dd>
405 /// </dl>
406 pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
407 let mut hash_map = self.attributes.unwrap_or_default();
408 hash_map.insert(k.into(), v.into());
409 self.attributes = ::std::option::Option::Some(hash_map);
410 self
411 }
412 /// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
413 /// <ul>
414 /// <li>
415 /// <p>The attributes that apply to the records that are defined in the service.</p></li>
416 /// <li>
417 /// <p>For each attribute, the applicable value.</p></li>
418 /// </ul><important>
419 /// <p>Do not include sensitive information in the attributes if the namespace is discoverable by public DNS queries.</p>
420 /// </important>
421 /// <p>The following are the supported attribute keys.</p>
422 /// <dl>
423 /// <dt>
424 /// AWS_ALIAS_DNS_NAME
425 /// </dt>
426 /// <dd>
427 /// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
428 /// <p>Note the following:</p>
429 /// <ul>
430 /// <li>
431 /// <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p></li>
432 /// <li>
433 /// <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p></li>
434 /// <li>
435 /// <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p></li>
436 /// <li>
437 /// <p>Cloud Map currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p></li>
438 /// <li>
439 /// <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p></li>
440 /// <li>
441 /// <p>The <code>AWS_ALIAS_DNS_NAME</code> is not supported in the GovCloud (US) Regions.</p></li>
442 /// </ul>
443 /// </dd>
444 /// <dt>
445 /// AWS_EC2_INSTANCE_ID
446 /// </dt>
447 /// <dd>
448 /// <p><i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
449 /// </dd>
450 /// <dt>
451 /// AWS_INIT_HEALTH_STATUS
452 /// </dt>
453 /// <dd>
454 /// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
455 /// </dd>
456 /// <dt>
457 /// AWS_INSTANCE_CNAME
458 /// </dt>
459 /// <dd>
460 /// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
461 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
462 /// </dd>
463 /// <dt>
464 /// AWS_INSTANCE_IPV4
465 /// </dt>
466 /// <dd>
467 /// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
468 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
469 /// </dd>
470 /// <dt>
471 /// AWS_INSTANCE_IPV6
472 /// </dt>
473 /// <dd>
474 /// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
475 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
476 /// </dd>
477 /// <dt>
478 /// AWS_INSTANCE_PORT
479 /// </dt>
480 /// <dd>
481 /// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
482 /// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to.</p>
483 /// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
484 /// </dd>
485 /// <dt>
486 /// Custom attributes
487 /// </dt>
488 /// <dd>
489 /// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
490 /// </dd>
491 /// </dl>
492 pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
493 self.attributes = input;
494 self
495 }
496 /// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
497 /// <ul>
498 /// <li>
499 /// <p>The attributes that apply to the records that are defined in the service.</p></li>
500 /// <li>
501 /// <p>For each attribute, the applicable value.</p></li>
502 /// </ul><important>
503 /// <p>Do not include sensitive information in the attributes if the namespace is discoverable by public DNS queries.</p>
504 /// </important>
505 /// <p>The following are the supported attribute keys.</p>
506 /// <dl>
507 /// <dt>
508 /// AWS_ALIAS_DNS_NAME
509 /// </dt>
510 /// <dd>
511 /// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
512 /// <p>Note the following:</p>
513 /// <ul>
514 /// <li>
515 /// <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p></li>
516 /// <li>
517 /// <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p></li>
518 /// <li>
519 /// <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p></li>
520 /// <li>
521 /// <p>Cloud Map currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p></li>
522 /// <li>
523 /// <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p></li>
524 /// <li>
525 /// <p>The <code>AWS_ALIAS_DNS_NAME</code> is not supported in the GovCloud (US) Regions.</p></li>
526 /// </ul>
527 /// </dd>
528 /// <dt>
529 /// AWS_EC2_INSTANCE_ID
530 /// </dt>
531 /// <dd>
532 /// <p><i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
533 /// </dd>
534 /// <dt>
535 /// AWS_INIT_HEALTH_STATUS
536 /// </dt>
537 /// <dd>
538 /// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
539 /// </dd>
540 /// <dt>
541 /// AWS_INSTANCE_CNAME
542 /// </dt>
543 /// <dd>
544 /// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
545 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
546 /// </dd>
547 /// <dt>
548 /// AWS_INSTANCE_IPV4
549 /// </dt>
550 /// <dd>
551 /// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
552 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
553 /// </dd>
554 /// <dt>
555 /// AWS_INSTANCE_IPV6
556 /// </dt>
557 /// <dd>
558 /// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
559 /// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
560 /// </dd>
561 /// <dt>
562 /// AWS_INSTANCE_PORT
563 /// </dt>
564 /// <dd>
565 /// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
566 /// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to.</p>
567 /// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
568 /// </dd>
569 /// <dt>
570 /// Custom attributes
571 /// </dt>
572 /// <dd>
573 /// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
574 /// </dd>
575 /// </dl>
576 pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
577 &self.attributes
578 }
579 /// Consumes the builder and constructs a [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
580 pub fn build(
581 self,
582 ) -> ::std::result::Result<crate::operation::register_instance::RegisterInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
583 ::std::result::Result::Ok(crate::operation::register_instance::RegisterInstanceInput {
584 service_id: self.service_id,
585 instance_id: self.instance_id,
586 creator_request_id: self.creator_request_id,
587 attributes: self.attributes,
588 })
589 }
590}