1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about whether DevOps Guru is configured to encrypt server-side data using KMS.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct KmsServerSideEncryptionIntegrationConfig {
/// <p>Describes the specified KMS key.</p>
/// <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), Amazon Web Services KMS associates the alias with an Amazon Web Services managed key and returns its KeyId and Arn in the response. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <p>Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Alias name: alias/ExampleAlias</p>
/// <p>Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</p>
pub kms_key_id: ::std::option::Option<::std::string::String>,
/// <p>Specifies if DevOps Guru is enabled for KMS integration.</p>
pub opt_in_status: ::std::option::Option<crate::types::OptInStatus>,
/// <p>The type of KMS key used. Customer managed keys are the KMS keys that you create. Amazon Web Services owned keys are keys that are owned and managed by DevOps Guru.</p>
pub r#type: ::std::option::Option<crate::types::ServerSideEncryptionType>,
}
impl KmsServerSideEncryptionIntegrationConfig {
/// <p>Describes the specified KMS key.</p>
/// <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), Amazon Web Services KMS associates the alias with an Amazon Web Services managed key and returns its KeyId and Arn in the response. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <p>Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Alias name: alias/ExampleAlias</p>
/// <p>Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</p>
pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
self.kms_key_id.as_deref()
}
/// <p>Specifies if DevOps Guru is enabled for KMS integration.</p>
pub fn opt_in_status(&self) -> ::std::option::Option<&crate::types::OptInStatus> {
self.opt_in_status.as_ref()
}
/// <p>The type of KMS key used. Customer managed keys are the KMS keys that you create. Amazon Web Services owned keys are keys that are owned and managed by DevOps Guru.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::ServerSideEncryptionType> {
self.r#type.as_ref()
}
}
impl KmsServerSideEncryptionIntegrationConfig {
/// Creates a new builder-style object to manufacture [`KmsServerSideEncryptionIntegrationConfig`](crate::types::KmsServerSideEncryptionIntegrationConfig).
pub fn builder() -> crate::types::builders::KmsServerSideEncryptionIntegrationConfigBuilder {
crate::types::builders::KmsServerSideEncryptionIntegrationConfigBuilder::default()
}
}
/// A builder for [`KmsServerSideEncryptionIntegrationConfig`](crate::types::KmsServerSideEncryptionIntegrationConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct KmsServerSideEncryptionIntegrationConfigBuilder {
pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) opt_in_status: ::std::option::Option<crate::types::OptInStatus>,
pub(crate) r#type: ::std::option::Option<crate::types::ServerSideEncryptionType>,
}
impl KmsServerSideEncryptionIntegrationConfigBuilder {
/// <p>Describes the specified KMS key.</p>
/// <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), Amazon Web Services KMS associates the alias with an Amazon Web Services managed key and returns its KeyId and Arn in the response. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <p>Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Alias name: alias/ExampleAlias</p>
/// <p>Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</p>
pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Describes the specified KMS key.</p>
/// <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), Amazon Web Services KMS associates the alias with an Amazon Web Services managed key and returns its KeyId and Arn in the response. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <p>Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Alias name: alias/ExampleAlias</p>
/// <p>Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</p>
pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_id = input;
self
}
/// <p>Describes the specified KMS key.</p>
/// <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), Amazon Web Services KMS associates the alias with an Amazon Web Services managed key and returns its KeyId and Arn in the response. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <p>Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</p>
/// <p>Alias name: alias/ExampleAlias</p>
/// <p>Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</p>
pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_id
}
/// <p>Specifies if DevOps Guru is enabled for KMS integration.</p>
pub fn opt_in_status(mut self, input: crate::types::OptInStatus) -> Self {
self.opt_in_status = ::std::option::Option::Some(input);
self
}
/// <p>Specifies if DevOps Guru is enabled for KMS integration.</p>
pub fn set_opt_in_status(mut self, input: ::std::option::Option<crate::types::OptInStatus>) -> Self {
self.opt_in_status = input;
self
}
/// <p>Specifies if DevOps Guru is enabled for KMS integration.</p>
pub fn get_opt_in_status(&self) -> &::std::option::Option<crate::types::OptInStatus> {
&self.opt_in_status
}
/// <p>The type of KMS key used. Customer managed keys are the KMS keys that you create. Amazon Web Services owned keys are keys that are owned and managed by DevOps Guru.</p>
pub fn r#type(mut self, input: crate::types::ServerSideEncryptionType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of KMS key used. Customer managed keys are the KMS keys that you create. Amazon Web Services owned keys are keys that are owned and managed by DevOps Guru.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::ServerSideEncryptionType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of KMS key used. Customer managed keys are the KMS keys that you create. Amazon Web Services owned keys are keys that are owned and managed by DevOps Guru.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::ServerSideEncryptionType> {
&self.r#type
}
/// Consumes the builder and constructs a [`KmsServerSideEncryptionIntegrationConfig`](crate::types::KmsServerSideEncryptionIntegrationConfig).
pub fn build(self) -> crate::types::KmsServerSideEncryptionIntegrationConfig {
crate::types::KmsServerSideEncryptionIntegrationConfig {
kms_key_id: self.kms_key_id,
opt_in_status: self.opt_in_status,
r#type: self.r#type,
}
}
}