aws_sdk_ssoadmin/operation/update_instance/
_update_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 UpdateInstanceInput {
6    /// <p>Updates the instance name.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
9    pub instance_arn: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies the encryption configuration for your IAM Identity Center instance. You can use this to configure customer managed KMS keys (CMK) or Amazon Web Services owned KMS keys for encrypting your instance data.</p>
11    pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
12}
13impl UpdateInstanceInput {
14    /// <p>Updates the instance name.</p>
15    pub fn name(&self) -> ::std::option::Option<&str> {
16        self.name.as_deref()
17    }
18    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
19    pub fn instance_arn(&self) -> ::std::option::Option<&str> {
20        self.instance_arn.as_deref()
21    }
22    /// <p>Specifies the encryption configuration for your IAM Identity Center instance. You can use this to configure customer managed KMS keys (CMK) or Amazon Web Services owned KMS keys for encrypting your instance data.</p>
23    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
24        self.encryption_configuration.as_ref()
25    }
26}
27impl UpdateInstanceInput {
28    /// Creates a new builder-style object to manufacture [`UpdateInstanceInput`](crate::operation::update_instance::UpdateInstanceInput).
29    pub fn builder() -> crate::operation::update_instance::builders::UpdateInstanceInputBuilder {
30        crate::operation::update_instance::builders::UpdateInstanceInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateInstanceInput`](crate::operation::update_instance::UpdateInstanceInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateInstanceInputBuilder {
38    pub(crate) name: ::std::option::Option<::std::string::String>,
39    pub(crate) instance_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
41}
42impl UpdateInstanceInputBuilder {
43    /// <p>Updates the instance name.</p>
44    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.name = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>Updates the instance name.</p>
49    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.name = input;
51        self
52    }
53    /// <p>Updates the instance name.</p>
54    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
55        &self.name
56    }
57    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
58    /// This field is required.
59    pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.instance_arn = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
64    pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.instance_arn = input;
66        self
67    }
68    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
69    pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
70        &self.instance_arn
71    }
72    /// <p>Specifies the encryption configuration for your IAM Identity Center instance. You can use this to configure customer managed KMS keys (CMK) or Amazon Web Services owned KMS keys for encrypting your instance data.</p>
73    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
74        self.encryption_configuration = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Specifies the encryption configuration for your IAM Identity Center instance. You can use this to configure customer managed KMS keys (CMK) or Amazon Web Services owned KMS keys for encrypting your instance data.</p>
78    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
79        self.encryption_configuration = input;
80        self
81    }
82    /// <p>Specifies the encryption configuration for your IAM Identity Center instance. You can use this to configure customer managed KMS keys (CMK) or Amazon Web Services owned KMS keys for encrypting your instance data.</p>
83    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
84        &self.encryption_configuration
85    }
86    /// Consumes the builder and constructs a [`UpdateInstanceInput`](crate::operation::update_instance::UpdateInstanceInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::update_instance::UpdateInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::update_instance::UpdateInstanceInput {
91            name: self.name,
92            instance_arn: self.instance_arn,
93            encryption_configuration: self.encryption_configuration,
94        })
95    }
96}