aws-sdk-continuum 1.0.0

AWS SDK for AWS Continuum
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Specifies the Collector ARN and data-access role to associate with this Environment.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateCollectorInput {
    /// The unique identifier of the Environment making the association.
    pub environment_id: ::std::option::Option<::std::string::String>,
    /// Caller-provided token that makes retried association requests idempotent. The first successful request binds the token to the complete Collector ARN, supplied role, and result for at least 24 hours. During that retry window, reusing it with a different request fails with ConflictException. A matching replay still requires the supplied role to have current Collector access. Once authorized, a matching replay returns the stored result without changing association state. Revocation can deny a replay; it does not remove the stored association or its original result.
    pub client_token: ::std::option::Option<::std::string::String>,
    /// The ARN of the Collector to associate with this Environment.
    pub collector_arn: ::std::option::Option<::std::string::String>,
    /// IAM role in the Environment account that Continuum assumes before authorizing access to associated Collector inventory. Every association, including a same-account association, requires this role. The supplied ARN replaces the Environment's previously stored role. The customer is responsible for granting the role access to every Collector that should contribute data.
    pub collector_data_access_role_arn: ::std::option::Option<::std::string::String>,
}
impl AssociateCollectorInput {
    /// The unique identifier of the Environment making the association.
    pub fn environment_id(&self) -> ::std::option::Option<&str> {
        self.environment_id.as_deref()
    }
    /// Caller-provided token that makes retried association requests idempotent. The first successful request binds the token to the complete Collector ARN, supplied role, and result for at least 24 hours. During that retry window, reusing it with a different request fails with ConflictException. A matching replay still requires the supplied role to have current Collector access. Once authorized, a matching replay returns the stored result without changing association state. Revocation can deny a replay; it does not remove the stored association or its original result.
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// The ARN of the Collector to associate with this Environment.
    pub fn collector_arn(&self) -> ::std::option::Option<&str> {
        self.collector_arn.as_deref()
    }
    /// IAM role in the Environment account that Continuum assumes before authorizing access to associated Collector inventory. Every association, including a same-account association, requires this role. The supplied ARN replaces the Environment's previously stored role. The customer is responsible for granting the role access to every Collector that should contribute data.
    pub fn collector_data_access_role_arn(&self) -> ::std::option::Option<&str> {
        self.collector_data_access_role_arn.as_deref()
    }
}
impl AssociateCollectorInput {
    /// Creates a new builder-style object to manufacture [`AssociateCollectorInput`](crate::operation::associate_collector::AssociateCollectorInput).
    pub fn builder() -> crate::operation::associate_collector::builders::AssociateCollectorInputBuilder {
        crate::operation::associate_collector::builders::AssociateCollectorInputBuilder::default()
    }
}

/// A builder for [`AssociateCollectorInput`](crate::operation::associate_collector::AssociateCollectorInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateCollectorInputBuilder {
    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) collector_arn: ::std::option::Option<::std::string::String>,
    pub(crate) collector_data_access_role_arn: ::std::option::Option<::std::string::String>,
}
impl AssociateCollectorInputBuilder {
    /// The unique identifier of the Environment making the association.
    /// This field is required.
    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the Environment making the association.
    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_id = input;
        self
    }
    /// The unique identifier of the Environment making the association.
    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_id
    }
    /// Caller-provided token that makes retried association requests idempotent. The first successful request binds the token to the complete Collector ARN, supplied role, and result for at least 24 hours. During that retry window, reusing it with a different request fails with ConflictException. A matching replay still requires the supplied role to have current Collector access. Once authorized, a matching replay returns the stored result without changing association state. Revocation can deny a replay; it does not remove the stored association or its original result.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// Caller-provided token that makes retried association requests idempotent. The first successful request binds the token to the complete Collector ARN, supplied role, and result for at least 24 hours. During that retry window, reusing it with a different request fails with ConflictException. A matching replay still requires the supplied role to have current Collector access. Once authorized, a matching replay returns the stored result without changing association state. Revocation can deny a replay; it does not remove the stored association or its original result.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// Caller-provided token that makes retried association requests idempotent. The first successful request binds the token to the complete Collector ARN, supplied role, and result for at least 24 hours. During that retry window, reusing it with a different request fails with ConflictException. A matching replay still requires the supplied role to have current Collector access. Once authorized, a matching replay returns the stored result without changing association state. Revocation can deny a replay; it does not remove the stored association or its original result.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// The ARN of the Collector to associate with this Environment.
    /// This field is required.
    pub fn collector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.collector_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the Collector to associate with this Environment.
    pub fn set_collector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.collector_arn = input;
        self
    }
    /// The ARN of the Collector to associate with this Environment.
    pub fn get_collector_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.collector_arn
    }
    /// IAM role in the Environment account that Continuum assumes before authorizing access to associated Collector inventory. Every association, including a same-account association, requires this role. The supplied ARN replaces the Environment's previously stored role. The customer is responsible for granting the role access to every Collector that should contribute data.
    /// This field is required.
    pub fn collector_data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.collector_data_access_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// IAM role in the Environment account that Continuum assumes before authorizing access to associated Collector inventory. Every association, including a same-account association, requires this role. The supplied ARN replaces the Environment's previously stored role. The customer is responsible for granting the role access to every Collector that should contribute data.
    pub fn set_collector_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.collector_data_access_role_arn = input;
        self
    }
    /// IAM role in the Environment account that Continuum assumes before authorizing access to associated Collector inventory. Every association, including a same-account association, requires this role. The supplied ARN replaces the Environment's previously stored role. The customer is responsible for granting the role access to every Collector that should contribute data.
    pub fn get_collector_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.collector_data_access_role_arn
    }
    /// Consumes the builder and constructs a [`AssociateCollectorInput`](crate::operation::associate_collector::AssociateCollectorInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_collector::AssociateCollectorInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::associate_collector::AssociateCollectorInput {
            environment_id: self.environment_id,
            client_token: self.client_token,
            collector_arn: self.collector_arn,
            collector_data_access_role_arn: self.collector_data_access_role_arn,
        })
    }
}