aws_sdk_gamelift/operation/create_build/
_create_build_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 CreateBuildInput {
6    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique. You can change this value later.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique. You can change this value later.</p>
9    pub version: ::std::option::Option<::std::string::String>,
10    /// <p>Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.</p>
11    /// <p>If a <code>StorageLocation</code> is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a <code>SizeOnDisk</code> of 0.</p>
12    pub storage_location: ::std::option::Option<crate::types::S3Location>,
13    /// <p>The operating system that your game server binaries run on. This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.</p><note>
14    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
15    /// </note>
16    pub operating_system: ::std::option::Option<crate::types::OperatingSystem>,
17    /// <p>A list of labels to assign to the new build resource. Tags are developer defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. Once the resource is created, you can use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_TagResource.html">TagResource</a>, <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UntagResource.html">UntagResource</a>, and <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.</p>
18    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
19    /// <p>A server SDK version you used when integrating your game server build with Amazon GameLift Servers. For more information see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html">Integrate games with custom game servers</a>. By default Amazon GameLift Servers sets this value to <code>4.0.2</code>.</p>
20    pub server_sdk_version: ::std::option::Option<::std::string::String>,
21}
22impl CreateBuildInput {
23    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique. You can change this value later.</p>
24    pub fn name(&self) -> ::std::option::Option<&str> {
25        self.name.as_deref()
26    }
27    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique. You can change this value later.</p>
28    pub fn version(&self) -> ::std::option::Option<&str> {
29        self.version.as_deref()
30    }
31    /// <p>Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.</p>
32    /// <p>If a <code>StorageLocation</code> is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a <code>SizeOnDisk</code> of 0.</p>
33    pub fn storage_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
34        self.storage_location.as_ref()
35    }
36    /// <p>The operating system that your game server binaries run on. This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.</p><note>
37    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
38    /// </note>
39    pub fn operating_system(&self) -> ::std::option::Option<&crate::types::OperatingSystem> {
40        self.operating_system.as_ref()
41    }
42    /// <p>A list of labels to assign to the new build resource. Tags are developer defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. Once the resource is created, you can use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_TagResource.html">TagResource</a>, <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UntagResource.html">UntagResource</a>, and <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
45    pub fn tags(&self) -> &[crate::types::Tag] {
46        self.tags.as_deref().unwrap_or_default()
47    }
48    /// <p>A server SDK version you used when integrating your game server build with Amazon GameLift Servers. For more information see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html">Integrate games with custom game servers</a>. By default Amazon GameLift Servers sets this value to <code>4.0.2</code>.</p>
49    pub fn server_sdk_version(&self) -> ::std::option::Option<&str> {
50        self.server_sdk_version.as_deref()
51    }
52}
53impl CreateBuildInput {
54    /// Creates a new builder-style object to manufacture [`CreateBuildInput`](crate::operation::create_build::CreateBuildInput).
55    pub fn builder() -> crate::operation::create_build::builders::CreateBuildInputBuilder {
56        crate::operation::create_build::builders::CreateBuildInputBuilder::default()
57    }
58}
59
60/// A builder for [`CreateBuildInput`](crate::operation::create_build::CreateBuildInput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct CreateBuildInputBuilder {
64    pub(crate) name: ::std::option::Option<::std::string::String>,
65    pub(crate) version: ::std::option::Option<::std::string::String>,
66    pub(crate) storage_location: ::std::option::Option<crate::types::S3Location>,
67    pub(crate) operating_system: ::std::option::Option<crate::types::OperatingSystem>,
68    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
69    pub(crate) server_sdk_version: ::std::option::Option<::std::string::String>,
70}
71impl CreateBuildInputBuilder {
72    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique. You can change this value later.</p>
73    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique. You can change this value later.</p>
78    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.name = input;
80        self
81    }
82    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique. You can change this value later.</p>
83    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.name
85    }
86    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique. You can change this value later.</p>
87    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.version = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique. You can change this value later.</p>
92    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.version = input;
94        self
95    }
96    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique. You can change this value later.</p>
97    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
98        &self.version
99    }
100    /// <p>Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.</p>
101    /// <p>If a <code>StorageLocation</code> is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a <code>SizeOnDisk</code> of 0.</p>
102    pub fn storage_location(mut self, input: crate::types::S3Location) -> Self {
103        self.storage_location = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.</p>
107    /// <p>If a <code>StorageLocation</code> is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a <code>SizeOnDisk</code> of 0.</p>
108    pub fn set_storage_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
109        self.storage_location = input;
110        self
111    }
112    /// <p>Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.</p>
113    /// <p>If a <code>StorageLocation</code> is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a <code>SizeOnDisk</code> of 0.</p>
114    pub fn get_storage_location(&self) -> &::std::option::Option<crate::types::S3Location> {
115        &self.storage_location
116    }
117    /// <p>The operating system that your game server binaries run on. This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.</p><note>
118    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
119    /// </note>
120    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
121        self.operating_system = ::std::option::Option::Some(input);
122        self
123    }
124    /// <p>The operating system that your game server binaries run on. This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.</p><note>
125    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
126    /// </note>
127    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
128        self.operating_system = input;
129        self
130    }
131    /// <p>The operating system that your game server binaries run on. This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.</p><note>
132    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
133    /// </note>
134    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
135        &self.operating_system
136    }
137    /// Appends an item to `tags`.
138    ///
139    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
140    ///
141    /// <p>A list of labels to assign to the new build resource. Tags are developer defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. Once the resource is created, you can use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_TagResource.html">TagResource</a>, <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UntagResource.html">UntagResource</a>, and <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.</p>
142    pub fn tags(mut self, input: crate::types::Tag) -> Self {
143        let mut v = self.tags.unwrap_or_default();
144        v.push(input);
145        self.tags = ::std::option::Option::Some(v);
146        self
147    }
148    /// <p>A list of labels to assign to the new build resource. Tags are developer defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. Once the resource is created, you can use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_TagResource.html">TagResource</a>, <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UntagResource.html">UntagResource</a>, and <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.</p>
149    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
150        self.tags = input;
151        self
152    }
153    /// <p>A list of labels to assign to the new build resource. Tags are developer defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. Once the resource is created, you can use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_TagResource.html">TagResource</a>, <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UntagResource.html">UntagResource</a>, and <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.</p>
154    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
155        &self.tags
156    }
157    /// <p>A server SDK version you used when integrating your game server build with Amazon GameLift Servers. For more information see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html">Integrate games with custom game servers</a>. By default Amazon GameLift Servers sets this value to <code>4.0.2</code>.</p>
158    pub fn server_sdk_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.server_sdk_version = ::std::option::Option::Some(input.into());
160        self
161    }
162    /// <p>A server SDK version you used when integrating your game server build with Amazon GameLift Servers. For more information see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html">Integrate games with custom game servers</a>. By default Amazon GameLift Servers sets this value to <code>4.0.2</code>.</p>
163    pub fn set_server_sdk_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.server_sdk_version = input;
165        self
166    }
167    /// <p>A server SDK version you used when integrating your game server build with Amazon GameLift Servers. For more information see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html">Integrate games with custom game servers</a>. By default Amazon GameLift Servers sets this value to <code>4.0.2</code>.</p>
168    pub fn get_server_sdk_version(&self) -> &::std::option::Option<::std::string::String> {
169        &self.server_sdk_version
170    }
171    /// Consumes the builder and constructs a [`CreateBuildInput`](crate::operation::create_build::CreateBuildInput).
172    pub fn build(self) -> ::std::result::Result<crate::operation::create_build::CreateBuildInput, ::aws_smithy_types::error::operation::BuildError> {
173        ::std::result::Result::Ok(crate::operation::create_build::CreateBuildInput {
174            name: self.name,
175            version: self.version,
176            storage_location: self.storage_location,
177            operating_system: self.operating_system,
178            tags: self.tags,
179            server_sdk_version: self.server_sdk_version,
180        })
181    }
182}