aws_sdk_cloudwatchlogs/operation/untag_resource/
_untag_resource_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 UntagResourceInput {
6    /// <p>The ARN of the CloudWatch Logs resource that you're removing tags from.</p>
7    /// <p>The ARN format of a log group is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:log-group:<i>log-group-name</i> </code></p>
8    /// <p>The ARN format of a destination is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:destination:<i>destination-name</i> </code></p>
9    /// <p>For more information about ARN format, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html">CloudWatch Logs resources and operations</a>.</p>
10    pub resource_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The list of tag keys to remove from the resource.</p>
12    pub tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13}
14impl UntagResourceInput {
15    /// <p>The ARN of the CloudWatch Logs resource that you're removing tags from.</p>
16    /// <p>The ARN format of a log group is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:log-group:<i>log-group-name</i> </code></p>
17    /// <p>The ARN format of a destination is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:destination:<i>destination-name</i> </code></p>
18    /// <p>For more information about ARN format, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html">CloudWatch Logs resources and operations</a>.</p>
19    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
20        self.resource_arn.as_deref()
21    }
22    /// <p>The list of tag keys to remove from the resource.</p>
23    ///
24    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_keys.is_none()`.
25    pub fn tag_keys(&self) -> &[::std::string::String] {
26        self.tag_keys.as_deref().unwrap_or_default()
27    }
28}
29impl UntagResourceInput {
30    /// Creates a new builder-style object to manufacture [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
31    pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceInputBuilder {
32        crate::operation::untag_resource::builders::UntagResourceInputBuilder::default()
33    }
34}
35
36/// A builder for [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct UntagResourceInputBuilder {
40    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
41    pub(crate) tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42}
43impl UntagResourceInputBuilder {
44    /// <p>The ARN of the CloudWatch Logs resource that you're removing tags from.</p>
45    /// <p>The ARN format of a log group is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:log-group:<i>log-group-name</i> </code></p>
46    /// <p>The ARN format of a destination is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:destination:<i>destination-name</i> </code></p>
47    /// <p>For more information about ARN format, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html">CloudWatch Logs resources and operations</a>.</p>
48    /// This field is required.
49    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50        self.resource_arn = ::std::option::Option::Some(input.into());
51        self
52    }
53    /// <p>The ARN of the CloudWatch Logs resource that you're removing tags from.</p>
54    /// <p>The ARN format of a log group is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:log-group:<i>log-group-name</i> </code></p>
55    /// <p>The ARN format of a destination is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:destination:<i>destination-name</i> </code></p>
56    /// <p>For more information about ARN format, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html">CloudWatch Logs resources and operations</a>.</p>
57    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.resource_arn = input;
59        self
60    }
61    /// <p>The ARN of the CloudWatch Logs resource that you're removing tags from.</p>
62    /// <p>The ARN format of a log group is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:log-group:<i>log-group-name</i> </code></p>
63    /// <p>The ARN format of a destination is <code>arn:aws:logs:<i>Region</i>:<i>account-id</i>:destination:<i>destination-name</i> </code></p>
64    /// <p>For more information about ARN format, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html">CloudWatch Logs resources and operations</a>.</p>
65    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
66        &self.resource_arn
67    }
68    /// Appends an item to `tag_keys`.
69    ///
70    /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
71    ///
72    /// <p>The list of tag keys to remove from the resource.</p>
73    pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        let mut v = self.tag_keys.unwrap_or_default();
75        v.push(input.into());
76        self.tag_keys = ::std::option::Option::Some(v);
77        self
78    }
79    /// <p>The list of tag keys to remove from the resource.</p>
80    pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
81        self.tag_keys = input;
82        self
83    }
84    /// <p>The list of tag keys to remove from the resource.</p>
85    pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
86        &self.tag_keys
87    }
88    /// Consumes the builder and constructs a [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::untag_resource::UntagResourceInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::untag_resource::UntagResourceInput {
93            resource_arn: self.resource_arn,
94            tag_keys: self.tag_keys,
95        })
96    }
97}