aws-sdk-oam 0.2.0

AWS SDK for CloudWatch Observability Access Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle {
    pub(crate) client: aws_smithy_client::Client<
        aws_smithy_client::erase::DynConnector,
        aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
    >,
    pub(crate) conf: crate::Config,
}

/// Client for CloudWatch Observability Access Manager
///
/// Client for invoking operations on CloudWatch Observability Access Manager. Each operation on CloudWatch Observability Access Manager is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
///     // create a shared configuration. This can be used & shared between multiple service clients.
///     let shared_config = aws_config::load_from_env().await;
///     let client = aws_sdk_oam::Client::new(&shared_config);
///     // invoke an operation
///     /* let rsp = client
///         .<operation_name>().
///         .<param>("some value")
///         .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::retry::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_oam::config::Builder::from(&shared_config)
///   .retry_config(RetryConfig::disabled())
///   .build();
/// let client = aws_sdk_oam::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client {
    handle: std::sync::Arc<Handle>,
}

impl std::clone::Clone for Client {
    fn clone(&self) -> Self {
        Self {
            handle: self.handle.clone(),
        }
    }
}

#[doc(inline)]
pub use aws_smithy_client::Builder;

impl
    From<
        aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
    > for Client
{
    fn from(
        client: aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
    ) -> Self {
        Self::with_config(client, crate::Config::builder().build())
    }
}

impl Client {
    /// Creates a client with the given service configuration.
    pub fn with_config(
        client: aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
        conf: crate::Config,
    ) -> Self {
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }

    /// Returns the client's configuration.
    pub fn conf(&self) -> &crate::Config {
        &self.handle.conf
    }
}
impl Client {
    /// Constructs a fluent builder for the [`CreateLink`](crate::client::fluent_builders::CreateLink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`label_template(impl Into<String>)`](crate::client::fluent_builders::CreateLink::label_template) / [`set_label_template(Option<String>)`](crate::client::fluent_builders::CreateLink::set_label_template): <p>Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.</p>  <p>You can use a custom label or use the following variables:</p>  <ul>   <li> <p> <code>$AccountName</code> is the name of the account</p> </li>   <li> <p> <code>$AccountEmail</code> is the globally unique email address of the account</p> </li>   <li> <p> <code>$AccountEmailNoDomain</code> is the email address of the account without the domain name</p> </li>  </ul>
    ///   - [`resource_types(Vec<ResourceType>)`](crate::client::fluent_builders::CreateLink::resource_types) / [`set_resource_types(Option<Vec<ResourceType>>)`](crate::client::fluent_builders::CreateLink::set_resource_types): <p>An array of strings that define which types of data that the source account shares with the monitoring account.</p>
    ///   - [`sink_identifier(impl Into<String>)`](crate::client::fluent_builders::CreateLink::sink_identifier) / [`set_sink_identifier(Option<String>)`](crate::client::fluent_builders::CreateLink::set_sink_identifier): <p>The ARN of the sink to use to create this link. You can use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a> to find the ARNs of sinks.</p>  <p>For more information about sinks, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html">CreateSink</a>.</p>
    ///   - [`tags(HashMap<String, String>)`](crate::client::fluent_builders::CreateLink::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::client::fluent_builders::CreateLink::set_tags): <p>Assigns one or more tags (key-value pairs) to the link. </p>  <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>  <p>For more information about using tags to control access, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Controlling access to Amazon Web Services resources using tags</a>.</p>
    /// - On success, responds with [`CreateLinkOutput`](crate::output::CreateLinkOutput) with field(s):
    ///   - [`arn(Option<String>)`](crate::output::CreateLinkOutput::arn): <p>The ARN of the link that is newly created.</p>
    ///   - [`id(Option<String>)`](crate::output::CreateLinkOutput::id): <p>The random ID string that Amazon Web Services generated as part of the link ARN.</p>
    ///   - [`label(Option<String>)`](crate::output::CreateLinkOutput::label): <p>The label that you assigned to this link. If the <code>labelTemplate</code> includes variables, this field displays the variables resolved to their actual values.</p>
    ///   - [`label_template(Option<String>)`](crate::output::CreateLinkOutput::label_template): <p>The exact label template that you specified, with the variables not resolved.</p>
    ///   - [`resource_types(Option<Vec<String>>)`](crate::output::CreateLinkOutput::resource_types): <p>The resource types supported by this link.</p>
    ///   - [`sink_arn(Option<String>)`](crate::output::CreateLinkOutput::sink_arn): <p>The ARN of the sink that is used for this link.</p>
    ///   - [`tags(Option<HashMap<String, String>>)`](crate::output::CreateLinkOutput::tags): <p>The tags assigned to the link.</p>
    /// - On failure, responds with [`SdkError<CreateLinkError>`](crate::error::CreateLinkError)
    pub fn create_link(&self) -> fluent_builders::CreateLink {
        fluent_builders::CreateLink::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`CreateSink`](crate::client::fluent_builders::CreateSink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateSink::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateSink::set_name): <p>A name for the sink.</p>
    ///   - [`tags(HashMap<String, String>)`](crate::client::fluent_builders::CreateSink::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::client::fluent_builders::CreateSink::set_tags): <p>Assigns one or more tags (key-value pairs) to the link. </p>  <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>  <p>For more information about using tags to control access, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Controlling access to Amazon Web Services resources using tags</a>.</p>
    /// - On success, responds with [`CreateSinkOutput`](crate::output::CreateSinkOutput) with field(s):
    ///   - [`arn(Option<String>)`](crate::output::CreateSinkOutput::arn): <p>The ARN of the sink that is newly created.</p>
    ///   - [`id(Option<String>)`](crate::output::CreateSinkOutput::id): <p>The random ID string that Amazon Web Services generated as part of the sink ARN.</p>
    ///   - [`name(Option<String>)`](crate::output::CreateSinkOutput::name): <p>The name of the sink.</p>
    ///   - [`tags(Option<HashMap<String, String>>)`](crate::output::CreateSinkOutput::tags): <p>The tags assigned to the sink.</p>
    /// - On failure, responds with [`SdkError<CreateSinkError>`](crate::error::CreateSinkError)
    pub fn create_sink(&self) -> fluent_builders::CreateSink {
        fluent_builders::CreateSink::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DeleteLink`](crate::client::fluent_builders::DeleteLink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`identifier(impl Into<String>)`](crate::client::fluent_builders::DeleteLink::identifier) / [`set_identifier(Option<String>)`](crate::client::fluent_builders::DeleteLink::set_identifier): <p>The ARN of the link to delete.</p>
    /// - On success, responds with [`DeleteLinkOutput`](crate::output::DeleteLinkOutput)

    /// - On failure, responds with [`SdkError<DeleteLinkError>`](crate::error::DeleteLinkError)
    pub fn delete_link(&self) -> fluent_builders::DeleteLink {
        fluent_builders::DeleteLink::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DeleteSink`](crate::client::fluent_builders::DeleteSink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`identifier(impl Into<String>)`](crate::client::fluent_builders::DeleteSink::identifier) / [`set_identifier(Option<String>)`](crate::client::fluent_builders::DeleteSink::set_identifier): <p>The ARN of the sink to delete.</p>
    /// - On success, responds with [`DeleteSinkOutput`](crate::output::DeleteSinkOutput)

    /// - On failure, responds with [`SdkError<DeleteSinkError>`](crate::error::DeleteSinkError)
    pub fn delete_sink(&self) -> fluent_builders::DeleteSink {
        fluent_builders::DeleteSink::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`GetLink`](crate::client::fluent_builders::GetLink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`identifier(impl Into<String>)`](crate::client::fluent_builders::GetLink::identifier) / [`set_identifier(Option<String>)`](crate::client::fluent_builders::GetLink::set_identifier): <p>The ARN of the link to retrieve information for.</p>
    /// - On success, responds with [`GetLinkOutput`](crate::output::GetLinkOutput) with field(s):
    ///   - [`arn(Option<String>)`](crate::output::GetLinkOutput::arn): <p>The ARN of the link.</p>
    ///   - [`id(Option<String>)`](crate::output::GetLinkOutput::id): <p>The random ID string that Amazon Web Services generated as part of the link ARN.</p>
    ///   - [`label(Option<String>)`](crate::output::GetLinkOutput::label): <p>The label that you assigned to this link, with the variables resolved to their actual values.</p>
    ///   - [`label_template(Option<String>)`](crate::output::GetLinkOutput::label_template): <p>The exact label template that was specified when the link was created, with the template variables not resolved.</p>
    ///   - [`resource_types(Option<Vec<String>>)`](crate::output::GetLinkOutput::resource_types): <p>The resource types supported by this link.</p>
    ///   - [`sink_arn(Option<String>)`](crate::output::GetLinkOutput::sink_arn): <p>The ARN of the sink that is used for this link.</p>
    ///   - [`tags(Option<HashMap<String, String>>)`](crate::output::GetLinkOutput::tags): <p>The tags assigned to the link.</p>
    /// - On failure, responds with [`SdkError<GetLinkError>`](crate::error::GetLinkError)
    pub fn get_link(&self) -> fluent_builders::GetLink {
        fluent_builders::GetLink::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`GetSink`](crate::client::fluent_builders::GetSink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`identifier(impl Into<String>)`](crate::client::fluent_builders::GetSink::identifier) / [`set_identifier(Option<String>)`](crate::client::fluent_builders::GetSink::set_identifier): <p>The ARN of the sink to retrieve information for.</p>
    /// - On success, responds with [`GetSinkOutput`](crate::output::GetSinkOutput) with field(s):
    ///   - [`arn(Option<String>)`](crate::output::GetSinkOutput::arn): <p>The ARN of the sink.</p>
    ///   - [`id(Option<String>)`](crate::output::GetSinkOutput::id): <p>The random ID string that Amazon Web Services generated as part of the sink ARN.</p>
    ///   - [`name(Option<String>)`](crate::output::GetSinkOutput::name): <p>The name of the sink.</p>
    ///   - [`tags(Option<HashMap<String, String>>)`](crate::output::GetSinkOutput::tags): <p>The tags assigned to the sink.</p>
    /// - On failure, responds with [`SdkError<GetSinkError>`](crate::error::GetSinkError)
    pub fn get_sink(&self) -> fluent_builders::GetSink {
        fluent_builders::GetSink::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`GetSinkPolicy`](crate::client::fluent_builders::GetSinkPolicy) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`sink_identifier(impl Into<String>)`](crate::client::fluent_builders::GetSinkPolicy::sink_identifier) / [`set_sink_identifier(Option<String>)`](crate::client::fluent_builders::GetSinkPolicy::set_sink_identifier): <p>The ARN of the sink to retrieve the policy of.</p>
    /// - On success, responds with [`GetSinkPolicyOutput`](crate::output::GetSinkPolicyOutput) with field(s):
    ///   - [`sink_arn(Option<String>)`](crate::output::GetSinkPolicyOutput::sink_arn): <p>The ARN of the sink.</p>
    ///   - [`sink_id(Option<String>)`](crate::output::GetSinkPolicyOutput::sink_id): <p>The random ID string that Amazon Web Services generated as part of the sink ARN.</p>
    ///   - [`policy(Option<String>)`](crate::output::GetSinkPolicyOutput::policy): <p>The policy that you specified, in JSON format.</p>
    /// - On failure, responds with [`SdkError<GetSinkPolicyError>`](crate::error::GetSinkPolicyError)
    pub fn get_sink_policy(&self) -> fluent_builders::GetSinkPolicy {
        fluent_builders::GetSinkPolicy::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListAttachedLinks`](crate::client::fluent_builders::ListAttachedLinks) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListAttachedLinks::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`max_results(i32)`](crate::client::fluent_builders::ListAttachedLinks::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListAttachedLinks::set_max_results): <p>Limits the number of returned links to the specified number.</p>
    ///   - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListAttachedLinks::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListAttachedLinks::set_next_token): <p>The token for the next set of items to return. You received this token from a previous call.</p>
    ///   - [`sink_identifier(impl Into<String>)`](crate::client::fluent_builders::ListAttachedLinks::sink_identifier) / [`set_sink_identifier(Option<String>)`](crate::client::fluent_builders::ListAttachedLinks::set_sink_identifier): <p>The ARN of the sink that you want to retrieve links for.</p>
    /// - On success, responds with [`ListAttachedLinksOutput`](crate::output::ListAttachedLinksOutput) with field(s):
    ///   - [`items(Option<Vec<ListAttachedLinksItem>>)`](crate::output::ListAttachedLinksOutput::items): <p>An array of structures that contain the information about the attached links.</p>
    ///   - [`next_token(Option<String>)`](crate::output::ListAttachedLinksOutput::next_token): <p>The token to use when requesting the next set of links.</p>
    /// - On failure, responds with [`SdkError<ListAttachedLinksError>`](crate::error::ListAttachedLinksError)
    pub fn list_attached_links(&self) -> fluent_builders::ListAttachedLinks {
        fluent_builders::ListAttachedLinks::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListLinks`](crate::client::fluent_builders::ListLinks) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListLinks::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`max_results(i32)`](crate::client::fluent_builders::ListLinks::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListLinks::set_max_results): <p>Limits the number of returned links to the specified number.</p>
    ///   - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListLinks::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListLinks::set_next_token): <p>The token for the next set of items to return. You received this token from a previous call.</p>
    /// - On success, responds with [`ListLinksOutput`](crate::output::ListLinksOutput) with field(s):
    ///   - [`items(Option<Vec<ListLinksItem>>)`](crate::output::ListLinksOutput::items): <p>An array of structures that contain the information about the returned links.</p>
    ///   - [`next_token(Option<String>)`](crate::output::ListLinksOutput::next_token): <p>The token to use when requesting the next set of links.</p>
    /// - On failure, responds with [`SdkError<ListLinksError>`](crate::error::ListLinksError)
    pub fn list_links(&self) -> fluent_builders::ListLinks {
        fluent_builders::ListLinks::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListSinks`](crate::client::fluent_builders::ListSinks) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListSinks::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`max_results(i32)`](crate::client::fluent_builders::ListSinks::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListSinks::set_max_results): <p>Limits the number of returned links to the specified number.</p>
    ///   - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListSinks::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListSinks::set_next_token): <p>The token for the next set of items to return. You received this token from a previous call.</p>
    /// - On success, responds with [`ListSinksOutput`](crate::output::ListSinksOutput) with field(s):
    ///   - [`items(Option<Vec<ListSinksItem>>)`](crate::output::ListSinksOutput::items): <p>An array of structures that contain the information about the returned sinks.</p>
    ///   - [`next_token(Option<String>)`](crate::output::ListSinksOutput::next_token): <p>The token to use when requesting the next set of sinks.</p>
    /// - On failure, responds with [`SdkError<ListSinksError>`](crate::error::ListSinksError)
    pub fn list_sinks(&self) -> fluent_builders::ListSinks {
        fluent_builders::ListSinks::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListTagsForResource`](crate::client::fluent_builders::ListTagsForResource) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::ListTagsForResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::ListTagsForResource::set_resource_arn): <p>The ARN of the resource that you want to view tags for.</p>  <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>  <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>  <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> <important>   <p>Unlike tagging permissions in other Amazon Web Services services, to retrieve the list of tags for links or sinks you must have the <code>oam:RequestTag</code> permission. The <code>aws:ReguestTag</code> permission does not allow you to tag and untag links and sinks.</p>  </important>
    /// - On success, responds with [`ListTagsForResourceOutput`](crate::output::ListTagsForResourceOutput) with field(s):
    ///   - [`tags(Option<HashMap<String, String>>)`](crate::output::ListTagsForResourceOutput::tags): <p>The list of tags associated with the requested resource.&gt;</p>
    /// - On failure, responds with [`SdkError<ListTagsForResourceError>`](crate::error::ListTagsForResourceError)
    pub fn list_tags_for_resource(&self) -> fluent_builders::ListTagsForResource {
        fluent_builders::ListTagsForResource::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`PutSinkPolicy`](crate::client::fluent_builders::PutSinkPolicy) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`sink_identifier(impl Into<String>)`](crate::client::fluent_builders::PutSinkPolicy::sink_identifier) / [`set_sink_identifier(Option<String>)`](crate::client::fluent_builders::PutSinkPolicy::set_sink_identifier): <p>The ARN of the sink to attach this policy to.</p>
    ///   - [`policy(impl Into<String>)`](crate::client::fluent_builders::PutSinkPolicy::policy) / [`set_policy(Option<String>)`](crate::client::fluent_builders::PutSinkPolicy::set_policy): <p>The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.</p>  <p>The policy must be in JSON string format with quotation marks escaped and no newlines.</p>  <p>For examples of different types of policies, see the <b>Examples</b> section on this page.</p>
    /// - On success, responds with [`PutSinkPolicyOutput`](crate::output::PutSinkPolicyOutput) with field(s):
    ///   - [`sink_arn(Option<String>)`](crate::output::PutSinkPolicyOutput::sink_arn): <p>The ARN of the sink.</p>
    ///   - [`sink_id(Option<String>)`](crate::output::PutSinkPolicyOutput::sink_id): <p>The random ID string that Amazon Web Services generated as part of the sink ARN.</p>
    ///   - [`policy(Option<String>)`](crate::output::PutSinkPolicyOutput::policy): <p>The policy that you specified.</p>
    /// - On failure, responds with [`SdkError<PutSinkPolicyError>`](crate::error::PutSinkPolicyError)
    pub fn put_sink_policy(&self) -> fluent_builders::PutSinkPolicy {
        fluent_builders::PutSinkPolicy::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`TagResource`](crate::client::fluent_builders::TagResource) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::TagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::TagResource::set_resource_arn): <p>The ARN of the resource that you're adding tags to.</p>  <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>  <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>  <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>
    ///   - [`tags(HashMap<String, String>)`](crate::client::fluent_builders::TagResource::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::client::fluent_builders::TagResource::set_tags): <p>The list of key-value pairs to associate with the resource.</p>
    /// - On success, responds with [`TagResourceOutput`](crate::output::TagResourceOutput)

    /// - On failure, responds with [`SdkError<TagResourceError>`](crate::error::TagResourceError)
    pub fn tag_resource(&self) -> fluent_builders::TagResource {
        fluent_builders::TagResource::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`UntagResource`](crate::client::fluent_builders::UntagResource) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::UntagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::UntagResource::set_resource_arn): <p>The ARN of the resource that you're removing tags from.</p>  <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>  <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>  <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>
    ///   - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::UntagResource::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::UntagResource::set_tag_keys): <p>The list of tag keys to remove from the resource.</p>
    /// - On success, responds with [`UntagResourceOutput`](crate::output::UntagResourceOutput)

    /// - On failure, responds with [`SdkError<UntagResourceError>`](crate::error::UntagResourceError)
    pub fn untag_resource(&self) -> fluent_builders::UntagResource {
        fluent_builders::UntagResource::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`UpdateLink`](crate::client::fluent_builders::UpdateLink) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`identifier(impl Into<String>)`](crate::client::fluent_builders::UpdateLink::identifier) / [`set_identifier(Option<String>)`](crate::client::fluent_builders::UpdateLink::set_identifier): <p>The ARN of the link that you want to update.</p>
    ///   - [`resource_types(Vec<ResourceType>)`](crate::client::fluent_builders::UpdateLink::resource_types) / [`set_resource_types(Option<Vec<ResourceType>>)`](crate::client::fluent_builders::UpdateLink::set_resource_types): <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>  <p>Your input here replaces the current set of data types that are shared.</p>
    /// - On success, responds with [`UpdateLinkOutput`](crate::output::UpdateLinkOutput) with field(s):
    ///   - [`arn(Option<String>)`](crate::output::UpdateLinkOutput::arn): <p>The ARN of the link that you have updated.</p>
    ///   - [`id(Option<String>)`](crate::output::UpdateLinkOutput::id): <p>The random ID string that Amazon Web Services generated as part of the sink ARN.</p>
    ///   - [`label(Option<String>)`](crate::output::UpdateLinkOutput::label): <p>The label assigned to this link, with the variables resolved to their actual values.</p>
    ///   - [`label_template(Option<String>)`](crate::output::UpdateLinkOutput::label_template): <p>The exact label template that was specified when the link was created, with the template variables not resolved.</p>
    ///   - [`resource_types(Option<Vec<String>>)`](crate::output::UpdateLinkOutput::resource_types): <p>The resource types now supported by this link.</p>
    ///   - [`sink_arn(Option<String>)`](crate::output::UpdateLinkOutput::sink_arn): <p>The ARN of the sink that is used for this link.</p>
    ///   - [`tags(Option<HashMap<String, String>>)`](crate::output::UpdateLinkOutput::tags): <p>The tags assigned to the link.</p>
    /// - On failure, responds with [`SdkError<UpdateLinkError>`](crate::error::UpdateLinkError)
    pub fn update_link(&self) -> fluent_builders::UpdateLink {
        fluent_builders::UpdateLink::new(self.handle.clone())
    }
}
pub mod fluent_builders {

    //! Utilities to ergonomically construct a request to the service.
    //!
    //! Fluent builders are created through the [`Client`](crate::client::Client) by calling
    //! one if its operation methods. After parameters are set using the builder methods,
    //! the `send` method can be called to initiate the request.
    /// Fluent builder constructing a request to `CreateLink`.
    ///
    /// <p>Creates a link between a source account and a sink that you have created in a monitoring account.</p>
    /// <p>Before you create a link, you must create a sink in the monitoring account and create a sink policy in that account. The sink policy must permit the source account to link to it. You can grant permission to source accounts by granting permission to an entire organization or to individual accounts.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html">CreateSink</a> and <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html">PutSinkPolicy</a>.</p>
    /// <p>Each monitoring account can be linked to as many as 100,000 source accounts.</p>
    /// <p>Each source account can be linked to as many as five monitoring accounts.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct CreateLink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::create_link_input::Builder,
    }
    impl CreateLink {
        /// Creates a new `CreateLink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateLink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateLinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateLinkOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateLinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.</p>
        /// <p>You can use a custom label or use the following variables:</p>
        /// <ul>
        /// <li> <p> <code>$AccountName</code> is the name of the account</p> </li>
        /// <li> <p> <code>$AccountEmail</code> is the globally unique email address of the account</p> </li>
        /// <li> <p> <code>$AccountEmailNoDomain</code> is the email address of the account without the domain name</p> </li>
        /// </ul>
        pub fn label_template(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.label_template(input.into());
            self
        }
        /// <p>Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.</p>
        /// <p>You can use a custom label or use the following variables:</p>
        /// <ul>
        /// <li> <p> <code>$AccountName</code> is the name of the account</p> </li>
        /// <li> <p> <code>$AccountEmail</code> is the globally unique email address of the account</p> </li>
        /// <li> <p> <code>$AccountEmailNoDomain</code> is the email address of the account without the domain name</p> </li>
        /// </ul>
        pub fn set_label_template(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_label_template(input);
            self
        }
        /// Appends an item to `ResourceTypes`.
        ///
        /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
        ///
        /// <p>An array of strings that define which types of data that the source account shares with the monitoring account.</p>
        pub fn resource_types(mut self, input: crate::model::ResourceType) -> Self {
            self.inner = self.inner.resource_types(input);
            self
        }
        /// <p>An array of strings that define which types of data that the source account shares with the monitoring account.</p>
        pub fn set_resource_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ResourceType>>,
        ) -> Self {
            self.inner = self.inner.set_resource_types(input);
            self
        }
        /// <p>The ARN of the sink to use to create this link. You can use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a> to find the ARNs of sinks.</p>
        /// <p>For more information about sinks, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html">CreateSink</a>.</p>
        pub fn sink_identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sink_identifier(input.into());
            self
        }
        /// <p>The ARN of the sink to use to create this link. You can use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a> to find the ARNs of sinks.</p>
        /// <p>For more information about sinks, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html">CreateSink</a>.</p>
        pub fn set_sink_identifier(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sink_identifier(input);
            self
        }
        /// Adds a key-value pair to `Tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Assigns one or more tags (key-value pairs) to the link. </p>
        /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
        /// <p>For more information about using tags to control access, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Controlling access to Amazon Web Services resources using tags</a>.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.tags(k.into(), v.into());
            self
        }
        /// <p>Assigns one or more tags (key-value pairs) to the link. </p>
        /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
        /// <p>For more information about using tags to control access, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Controlling access to Amazon Web Services resources using tags</a>.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
    }
    /// Fluent builder constructing a request to `CreateSink`.
    ///
    /// <p>Use this to create a <i>sink</i> in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data.</p>
    /// <p>After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html">PutSinkPolicy</a>.</p>
    /// <p>Each account can contain one sink. If you delete a sink, you can then create a new one in that account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct CreateSink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::create_sink_input::Builder,
    }
    impl CreateSink {
        /// Creates a new `CreateSink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateSink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateSinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateSinkOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateSinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>A name for the sink.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.name(input.into());
            self
        }
        /// <p>A name for the sink.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_name(input);
            self
        }
        /// Adds a key-value pair to `Tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Assigns one or more tags (key-value pairs) to the link. </p>
        /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
        /// <p>For more information about using tags to control access, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Controlling access to Amazon Web Services resources using tags</a>.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.tags(k.into(), v.into());
            self
        }
        /// <p>Assigns one or more tags (key-value pairs) to the link. </p>
        /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
        /// <p>For more information about using tags to control access, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Controlling access to Amazon Web Services resources using tags</a>.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DeleteLink`.
    ///
    /// <p>Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DeleteLink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::delete_link_input::Builder,
    }
    impl DeleteLink {
        /// Creates a new `DeleteLink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DeleteLink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DeleteLinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeleteLinkOutput,
            aws_smithy_http::result::SdkError<crate::error::DeleteLinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the link to delete.</p>
        pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.identifier(input.into());
            self
        }
        /// <p>The ARN of the link to delete.</p>
        pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_identifier(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DeleteSink`.
    ///
    /// <p>Deletes a sink. You must delete all links to a sink before you can delete that sink.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DeleteSink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::delete_sink_input::Builder,
    }
    impl DeleteSink {
        /// Creates a new `DeleteSink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DeleteSink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DeleteSinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeleteSinkOutput,
            aws_smithy_http::result::SdkError<crate::error::DeleteSinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the sink to delete.</p>
        pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.identifier(input.into());
            self
        }
        /// <p>The ARN of the sink to delete.</p>
        pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_identifier(input);
            self
        }
    }
    /// Fluent builder constructing a request to `GetLink`.
    ///
    /// <p>Returns complete information about one link.</p>
    /// <p>To use this operation, provide the link ARN. To retrieve a list of link ARNs, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html">ListLinks</a>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct GetLink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::get_link_input::Builder,
    }
    impl GetLink {
        /// Creates a new `GetLink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::GetLink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::GetLinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetLinkOutput,
            aws_smithy_http::result::SdkError<crate::error::GetLinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the link to retrieve information for.</p>
        pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.identifier(input.into());
            self
        }
        /// <p>The ARN of the link to retrieve information for.</p>
        pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_identifier(input);
            self
        }
    }
    /// Fluent builder constructing a request to `GetSink`.
    ///
    /// <p>Returns complete information about one monitoring account sink.</p>
    /// <p>To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct GetSink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::get_sink_input::Builder,
    }
    impl GetSink {
        /// Creates a new `GetSink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::GetSink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::GetSinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetSinkOutput,
            aws_smithy_http::result::SdkError<crate::error::GetSinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the sink to retrieve information for.</p>
        pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.identifier(input.into());
            self
        }
        /// <p>The ARN of the sink to retrieve information for.</p>
        pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_identifier(input);
            self
        }
    }
    /// Fluent builder constructing a request to `GetSinkPolicy`.
    ///
    /// <p>Returns the current sink policy attached to this sink. The sink policy specifies what accounts can attach to this sink as source accounts, and what types of data they can share.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct GetSinkPolicy {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::get_sink_policy_input::Builder,
    }
    impl GetSinkPolicy {
        /// Creates a new `GetSinkPolicy`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::GetSinkPolicy,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::GetSinkPolicyError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetSinkPolicyOutput,
            aws_smithy_http::result::SdkError<crate::error::GetSinkPolicyError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the sink to retrieve the policy of.</p>
        pub fn sink_identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sink_identifier(input.into());
            self
        }
        /// <p>The ARN of the sink to retrieve the policy of.</p>
        pub fn set_sink_identifier(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sink_identifier(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListAttachedLinks`.
    ///
    /// <p>Returns a list of source account links that are linked to this monitoring account sink.</p>
    /// <p>To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a>.</p>
    /// <p>To find a list of links for one source account, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html">ListLinks</a>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListAttachedLinks {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_attached_links_input::Builder,
    }
    impl ListAttachedLinks {
        /// Creates a new `ListAttachedLinks`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListAttachedLinks,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListAttachedLinksError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListAttachedLinksOutput,
            aws_smithy_http::result::SdkError<crate::error::ListAttachedLinksError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// Create a paginator for this request
        ///
        /// Paginators are used by calling [`send().await`](crate::paginator::ListAttachedLinksPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
        pub fn into_paginator(self) -> crate::paginator::ListAttachedLinksPaginator {
            crate::paginator::ListAttachedLinksPaginator::new(self.handle, self.inner)
        }
        /// <p>Limits the number of returned links to the specified number.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        /// <p>Limits the number of returned links to the specified number.</p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
        /// <p>The token for the next set of items to return. You received this token from a previous call.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input.into());
            self
        }
        /// <p>The token for the next set of items to return. You received this token from a previous call.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
        /// <p>The ARN of the sink that you want to retrieve links for.</p>
        pub fn sink_identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sink_identifier(input.into());
            self
        }
        /// <p>The ARN of the sink that you want to retrieve links for.</p>
        pub fn set_sink_identifier(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sink_identifier(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListLinks`.
    ///
    /// <p>Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.</p>
    /// <p>To find a list of links for one monitoring account sink, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html">ListAttachedLinks</a> from within the monitoring account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListLinks {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_links_input::Builder,
    }
    impl ListLinks {
        /// Creates a new `ListLinks`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListLinks,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListLinksError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListLinksOutput,
            aws_smithy_http::result::SdkError<crate::error::ListLinksError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// Create a paginator for this request
        ///
        /// Paginators are used by calling [`send().await`](crate::paginator::ListLinksPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
        pub fn into_paginator(self) -> crate::paginator::ListLinksPaginator {
            crate::paginator::ListLinksPaginator::new(self.handle, self.inner)
        }
        /// <p>Limits the number of returned links to the specified number.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        /// <p>Limits the number of returned links to the specified number.</p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
        /// <p>The token for the next set of items to return. You received this token from a previous call.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input.into());
            self
        }
        /// <p>The token for the next set of items to return. You received this token from a previous call.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListSinks`.
    ///
    /// <p>Use this operation in a monitoring account to return the list of sinks created in that account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListSinks {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_sinks_input::Builder,
    }
    impl ListSinks {
        /// Creates a new `ListSinks`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListSinks,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListSinksError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListSinksOutput,
            aws_smithy_http::result::SdkError<crate::error::ListSinksError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// Create a paginator for this request
        ///
        /// Paginators are used by calling [`send().await`](crate::paginator::ListSinksPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
        pub fn into_paginator(self) -> crate::paginator::ListSinksPaginator {
            crate::paginator::ListSinksPaginator::new(self.handle, self.inner)
        }
        /// <p>Limits the number of returned links to the specified number.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        /// <p>Limits the number of returned links to the specified number.</p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
        /// <p>The token for the next set of items to return. You received this token from a previous call.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input.into());
            self
        }
        /// <p>The token for the next set of items to return. You received this token from a previous call.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListTagsForResource`.
    ///
    /// <p>Displays the tags associated with a resource. Both sinks and links support tagging.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListTagsForResource {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_tags_for_resource_input::Builder,
    }
    impl ListTagsForResource {
        /// Creates a new `ListTagsForResource`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListTagsForResource,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListTagsForResourceOutput,
            aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the resource that you want to view tags for.</p>
        /// <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>
        /// <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>
        /// <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> <important>
        /// <p>Unlike tagging permissions in other Amazon Web Services services, to retrieve the list of tags for links or sinks you must have the <code>oam:RequestTag</code> permission. The <code>aws:ReguestTag</code> permission does not allow you to tag and untag links and sinks.</p>
        /// </important>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input.into());
            self
        }
        /// <p>The ARN of the resource that you want to view tags for.</p>
        /// <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>
        /// <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>
        /// <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> <important>
        /// <p>Unlike tagging permissions in other Amazon Web Services services, to retrieve the list of tags for links or sinks you must have the <code>oam:RequestTag</code> permission. The <code>aws:ReguestTag</code> permission does not allow you to tag and untag links and sinks.</p>
        /// </important>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `PutSinkPolicy`.
    ///
    /// <p>Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink. When you create a sink policy, you can grant permissions to all accounts in an organization or to individual accounts.</p>
    /// <p>You can also use a sink policy to limit the types of data that is shared. The three types that you can allow or deny are:</p>
    /// <ul>
    /// <li> <p> <b>Metrics</b> - Specify with <code>AWS::CloudWatch::Metric</code> </p> </li>
    /// <li> <p> <b>Log groups</b> - Specify with <code>AWS::Logs::LogGroup</code> </p> </li>
    /// <li> <p> <b>Traces</b> - Specify with <code>AWS::XRay::Trace</code> </p> </li>
    /// </ul>
    /// <p>See the examples in this section to see how to specify permitted source accounts and data types.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct PutSinkPolicy {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::put_sink_policy_input::Builder,
    }
    impl PutSinkPolicy {
        /// Creates a new `PutSinkPolicy`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::PutSinkPolicy,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::PutSinkPolicyError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::PutSinkPolicyOutput,
            aws_smithy_http::result::SdkError<crate::error::PutSinkPolicyError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the sink to attach this policy to.</p>
        pub fn sink_identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sink_identifier(input.into());
            self
        }
        /// <p>The ARN of the sink to attach this policy to.</p>
        pub fn set_sink_identifier(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sink_identifier(input);
            self
        }
        /// <p>The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.</p>
        /// <p>The policy must be in JSON string format with quotation marks escaped and no newlines.</p>
        /// <p>For examples of different types of policies, see the <b>Examples</b> section on this page.</p>
        pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.policy(input.into());
            self
        }
        /// <p>The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.</p>
        /// <p>The policy must be in JSON string format with quotation marks escaped and no newlines.</p>
        /// <p>For examples of different types of policies, see the <b>Examples</b> section on this page.</p>
        pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_policy(input);
            self
        }
    }
    /// Fluent builder constructing a request to `TagResource`.
    ///
    /// <p>Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged. </p>
    /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
    /// <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
    /// <p>You can use the <code>TagResource</code> action with a resource that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.</p>
    /// <p>You can associate as many as 50 tags with a resource.</p> <important>
    /// <p>Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the <code>oam:ResourceTag</code> permission. The <code>iam:ResourceTag</code> permission does not allow you to tag and untag links and sinks.</p>
    /// </important>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct TagResource {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::tag_resource_input::Builder,
    }
    impl TagResource {
        /// Creates a new `TagResource`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::TagResource,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::TagResourceError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::TagResourceOutput,
            aws_smithy_http::result::SdkError<crate::error::TagResourceError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the resource that you're adding tags to.</p>
        /// <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>
        /// <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>
        /// <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>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input.into());
            self
        }
        /// <p>The ARN of the resource that you're adding tags to.</p>
        /// <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>
        /// <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>
        /// <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>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// Adds a key-value pair to `Tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The list of key-value pairs to associate with the resource.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.tags(k.into(), v.into());
            self
        }
        /// <p>The list of key-value pairs to associate with the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
    }
    /// Fluent builder constructing a request to `UntagResource`.
    ///
    /// <p>Removes one or more tags from the specified resource.</p> <important>
    /// <p>Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the <code>oam:ResourceTag</code> permission. The <code>iam:TagResource</code> permission does not allow you to tag and untag links and sinks.</p>
    /// </important>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct UntagResource {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::untag_resource_input::Builder,
    }
    impl UntagResource {
        /// Creates a new `UntagResource`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::UntagResource,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::UntagResourceError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::UntagResourceOutput,
            aws_smithy_http::result::SdkError<crate::error::UntagResourceError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the resource that you're removing tags from.</p>
        /// <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>
        /// <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>
        /// <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>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input.into());
            self
        }
        /// <p>The ARN of the resource that you're removing tags from.</p>
        /// <p>The ARN format of a sink is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:sink/<i>sink-id</i> </code> </p>
        /// <p>The ARN format of a link is <code>arn:aws:oam:<i>Region</i>:<i>account-id</i>:link/<i>link-id</i> </code> </p>
        /// <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>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// Appends an item to `TagKeys`.
        ///
        /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
        ///
        /// <p>The list of tag keys to remove from the resource.</p>
        pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.tag_keys(input.into());
            self
        }
        /// <p>The list of tag keys to remove from the resource.</p>
        pub fn set_tag_keys(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_tag_keys(input);
            self
        }
    }
    /// Fluent builder constructing a request to `UpdateLink`.
    ///
    /// <p>Use this operation to change what types of data are shared from a source account to its linked monitoring account sink. You can't change the sink or change the monitoring account with this operation.</p>
    /// <p>To update the list of tags associated with the sink, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_TagResource.html">TagResource</a>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct UpdateLink {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::update_link_input::Builder,
    }
    impl UpdateLink {
        /// Creates a new `UpdateLink`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::UpdateLink,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::UpdateLinkError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::UpdateLinkOutput,
            aws_smithy_http::result::SdkError<crate::error::UpdateLinkError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the link that you want to update.</p>
        pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.identifier(input.into());
            self
        }
        /// <p>The ARN of the link that you want to update.</p>
        pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_identifier(input);
            self
        }
        /// Appends an item to `ResourceTypes`.
        ///
        /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
        ///
        /// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
        /// <p>Your input here replaces the current set of data types that are shared.</p>
        pub fn resource_types(mut self, input: crate::model::ResourceType) -> Self {
            self.inner = self.inner.resource_types(input);
            self
        }
        /// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
        /// <p>Your input here replaces the current set of data types that are shared.</p>
        pub fn set_resource_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ResourceType>>,
        ) -> Self {
            self.inner = self.inner.set_resource_types(input);
            self
        }
    }
}

impl Client {
    /// Creates a new client from an [SDK Config](aws_types::sdk_config::SdkConfig).
    ///
    /// # Panics
    ///
    /// - This method will panic if the `sdk_config` is missing an async sleep implementation. If you experience this panic, set
    ///     the `sleep_impl` on the Config passed into this function to fix it.
    /// - This method will panic if the `sdk_config` is missing an HTTP connector. If you experience this panic, set the
    ///     `http_connector` on the Config passed into this function to fix it.
    pub fn new(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
        Self::from_conf(sdk_config.into())
    }

    /// Creates a new client from the service [`Config`](crate::Config).
    ///
    /// # Panics
    ///
    /// - This method will panic if the `conf` is missing an async sleep implementation. If you experience this panic, set
    ///     the `sleep_impl` on the Config passed into this function to fix it.
    /// - This method will panic if the `conf` is missing an HTTP connector. If you experience this panic, set the
    ///     `http_connector` on the Config passed into this function to fix it.
    pub fn from_conf(conf: crate::Config) -> Self {
        let retry_config = conf
            .retry_config()
            .cloned()
            .unwrap_or_else(aws_smithy_types::retry::RetryConfig::disabled);
        let timeout_config = conf
            .timeout_config()
            .cloned()
            .unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
        let sleep_impl = conf.sleep_impl();
        if (retry_config.has_retry() || timeout_config.has_timeouts()) && sleep_impl.is_none() {
            panic!("An async sleep implementation is required for retries or timeouts to work. \
                                    Set the `sleep_impl` on the Config passed into this function to fix this panic.");
        }

        let connector = conf.http_connector().and_then(|c| {
            let timeout_config = conf
                .timeout_config()
                .cloned()
                .unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
            let connector_settings =
                aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
                    &timeout_config,
                );
            c.connector(&connector_settings, conf.sleep_impl())
        });

        let builder = aws_smithy_client::Builder::new();

        let builder = match connector {
            // Use provided connector
            Some(c) => builder.connector(c),
            None => {
                #[cfg(any(feature = "rustls", feature = "native-tls"))]
                {
                    // Use default connector based on enabled features
                    builder.dyn_https_connector(
                        aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
                            &timeout_config,
                        ),
                    )
                }
                #[cfg(not(any(feature = "rustls", feature = "native-tls")))]
                {
                    panic!("No HTTP connector was available. Enable the `rustls` or `native-tls` crate feature or set a connector to fix this.");
                }
            }
        };
        let mut builder = builder
            .middleware(aws_smithy_client::erase::DynMiddleware::new(
                crate::middleware::DefaultMiddleware::new(),
            ))
            .retry_config(retry_config.into())
            .operation_timeout_config(timeout_config.into());
        builder.set_sleep_impl(sleep_impl);
        let client = builder.build();

        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }
}