aws_sdk_securityhub/types/_aws_auto_scaling_launch_configuration_metadata_options.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The metadata options for the instances.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsAutoScalingLaunchConfigurationMetadataOptions {
7 /// <p>Enables or disables the HTTP metadata endpoint on your instances. By default, the metadata endpoint is enabled.</p>
8 pub http_endpoint: ::std::option::Option<::std::string::String>,
9 /// <p>The HTTP <code>PUT</code> response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
10 pub http_put_response_hop_limit: ::std::option::Option<i32>,
11 /// <p>Indicates whether token usage is <code>required</code> or <code>optional</code> for metadata requests. By default, token usage is <code>optional</code>.</p>
12 pub http_tokens: ::std::option::Option<::std::string::String>,
13}
14impl AwsAutoScalingLaunchConfigurationMetadataOptions {
15 /// <p>Enables or disables the HTTP metadata endpoint on your instances. By default, the metadata endpoint is enabled.</p>
16 pub fn http_endpoint(&self) -> ::std::option::Option<&str> {
17 self.http_endpoint.as_deref()
18 }
19 /// <p>The HTTP <code>PUT</code> response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
20 pub fn http_put_response_hop_limit(&self) -> ::std::option::Option<i32> {
21 self.http_put_response_hop_limit
22 }
23 /// <p>Indicates whether token usage is <code>required</code> or <code>optional</code> for metadata requests. By default, token usage is <code>optional</code>.</p>
24 pub fn http_tokens(&self) -> ::std::option::Option<&str> {
25 self.http_tokens.as_deref()
26 }
27}
28impl AwsAutoScalingLaunchConfigurationMetadataOptions {
29 /// Creates a new builder-style object to manufacture [`AwsAutoScalingLaunchConfigurationMetadataOptions`](crate::types::AwsAutoScalingLaunchConfigurationMetadataOptions).
30 pub fn builder() -> crate::types::builders::AwsAutoScalingLaunchConfigurationMetadataOptionsBuilder {
31 crate::types::builders::AwsAutoScalingLaunchConfigurationMetadataOptionsBuilder::default()
32 }
33}
34
35/// A builder for [`AwsAutoScalingLaunchConfigurationMetadataOptions`](crate::types::AwsAutoScalingLaunchConfigurationMetadataOptions).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct AwsAutoScalingLaunchConfigurationMetadataOptionsBuilder {
39 pub(crate) http_endpoint: ::std::option::Option<::std::string::String>,
40 pub(crate) http_put_response_hop_limit: ::std::option::Option<i32>,
41 pub(crate) http_tokens: ::std::option::Option<::std::string::String>,
42}
43impl AwsAutoScalingLaunchConfigurationMetadataOptionsBuilder {
44 /// <p>Enables or disables the HTTP metadata endpoint on your instances. By default, the metadata endpoint is enabled.</p>
45 pub fn http_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.http_endpoint = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>Enables or disables the HTTP metadata endpoint on your instances. By default, the metadata endpoint is enabled.</p>
50 pub fn set_http_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.http_endpoint = input;
52 self
53 }
54 /// <p>Enables or disables the HTTP metadata endpoint on your instances. By default, the metadata endpoint is enabled.</p>
55 pub fn get_http_endpoint(&self) -> &::std::option::Option<::std::string::String> {
56 &self.http_endpoint
57 }
58 /// <p>The HTTP <code>PUT</code> response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
59 pub fn http_put_response_hop_limit(mut self, input: i32) -> Self {
60 self.http_put_response_hop_limit = ::std::option::Option::Some(input);
61 self
62 }
63 /// <p>The HTTP <code>PUT</code> response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
64 pub fn set_http_put_response_hop_limit(mut self, input: ::std::option::Option<i32>) -> Self {
65 self.http_put_response_hop_limit = input;
66 self
67 }
68 /// <p>The HTTP <code>PUT</code> response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
69 pub fn get_http_put_response_hop_limit(&self) -> &::std::option::Option<i32> {
70 &self.http_put_response_hop_limit
71 }
72 /// <p>Indicates whether token usage is <code>required</code> or <code>optional</code> for metadata requests. By default, token usage is <code>optional</code>.</p>
73 pub fn http_tokens(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.http_tokens = ::std::option::Option::Some(input.into());
75 self
76 }
77 /// <p>Indicates whether token usage is <code>required</code> or <code>optional</code> for metadata requests. By default, token usage is <code>optional</code>.</p>
78 pub fn set_http_tokens(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.http_tokens = input;
80 self
81 }
82 /// <p>Indicates whether token usage is <code>required</code> or <code>optional</code> for metadata requests. By default, token usage is <code>optional</code>.</p>
83 pub fn get_http_tokens(&self) -> &::std::option::Option<::std::string::String> {
84 &self.http_tokens
85 }
86 /// Consumes the builder and constructs a [`AwsAutoScalingLaunchConfigurationMetadataOptions`](crate::types::AwsAutoScalingLaunchConfigurationMetadataOptions).
87 pub fn build(self) -> crate::types::AwsAutoScalingLaunchConfigurationMetadataOptions {
88 crate::types::AwsAutoScalingLaunchConfigurationMetadataOptions {
89 http_endpoint: self.http_endpoint,
90 http_put_response_hop_limit: self.http_put_response_hop_limit,
91 http_tokens: self.http_tokens,
92 }
93 }
94}