aws-sdk-connect 1.154.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSecurityProfileInput {
    /// <p>The name of the security profile.</p>
    pub security_profile_name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the security profile.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
    pub permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub allowed_access_control_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub tag_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
    pub applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
    /// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
    pub hierarchy_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub allowed_access_control_hierarchy_group_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
    pub allowed_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::FlowModule>>,
    /// <p>The granular access control configuration for the security profile, including data table permissions.</p>
    pub granular_access_control_configuration: ::std::option::Option<crate::types::GranularAccessControlConfiguration>,
}
impl CreateSecurityProfileInput {
    /// <p>The name of the security profile.</p>
    pub fn security_profile_name(&self) -> ::std::option::Option<&str> {
        self.security_profile_name.as_deref()
    }
    /// <p>The description of the security profile.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.permissions.is_none()`.
    pub fn permissions(&self) -> &[::std::string::String] {
        self.permissions.as_deref().unwrap_or_default()
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn allowed_access_control_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.allowed_access_control_tags.as_ref()
    }
    /// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_restricted_resources.is_none()`.
    pub fn tag_restricted_resources(&self) -> &[::std::string::String] {
        self.tag_restricted_resources.as_deref().unwrap_or_default()
    }
    /// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.applications.is_none()`.
    pub fn applications(&self) -> &[crate::types::Application] {
        self.applications.as_deref().unwrap_or_default()
    }
    /// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hierarchy_restricted_resources.is_none()`.
    pub fn hierarchy_restricted_resources(&self) -> &[::std::string::String] {
        self.hierarchy_restricted_resources.as_deref().unwrap_or_default()
    }
    /// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn allowed_access_control_hierarchy_group_id(&self) -> ::std::option::Option<&str> {
        self.allowed_access_control_hierarchy_group_id.as_deref()
    }
    /// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allowed_flow_modules.is_none()`.
    pub fn allowed_flow_modules(&self) -> &[crate::types::FlowModule] {
        self.allowed_flow_modules.as_deref().unwrap_or_default()
    }
    /// <p>The granular access control configuration for the security profile, including data table permissions.</p>
    pub fn granular_access_control_configuration(&self) -> ::std::option::Option<&crate::types::GranularAccessControlConfiguration> {
        self.granular_access_control_configuration.as_ref()
    }
}
impl CreateSecurityProfileInput {
    /// Creates a new builder-style object to manufacture [`CreateSecurityProfileInput`](crate::operation::create_security_profile::CreateSecurityProfileInput).
    pub fn builder() -> crate::operation::create_security_profile::builders::CreateSecurityProfileInputBuilder {
        crate::operation::create_security_profile::builders::CreateSecurityProfileInputBuilder::default()
    }
}

/// A builder for [`CreateSecurityProfileInput`](crate::operation::create_security_profile::CreateSecurityProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSecurityProfileInputBuilder {
    pub(crate) security_profile_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) allowed_access_control_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) tag_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
    pub(crate) hierarchy_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) allowed_access_control_hierarchy_group_id: ::std::option::Option<::std::string::String>,
    pub(crate) allowed_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::FlowModule>>,
    pub(crate) granular_access_control_configuration: ::std::option::Option<crate::types::GranularAccessControlConfiguration>,
}
impl CreateSecurityProfileInputBuilder {
    /// <p>The name of the security profile.</p>
    /// This field is required.
    pub fn security_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.security_profile_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the security profile.</p>
    pub fn set_security_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.security_profile_name = input;
        self
    }
    /// <p>The name of the security profile.</p>
    pub fn get_security_profile_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.security_profile_name
    }
    /// <p>The description of the security profile.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the security profile.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the security profile.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `permissions`.
    ///
    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
    ///
    /// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
    pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.permissions.unwrap_or_default();
        v.push(input.into());
        self.permissions = ::std::option::Option::Some(v);
        self
    }
    /// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.permissions = input;
        self
    }
    /// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.permissions
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Adds a key-value pair to `allowed_access_control_tags`.
    ///
    /// To override the contents of this collection use [`set_allowed_access_control_tags`](Self::set_allowed_access_control_tags).
    ///
    /// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn allowed_access_control_tags(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.allowed_access_control_tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.allowed_access_control_tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn set_allowed_access_control_tags(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.allowed_access_control_tags = input;
        self
    }
    /// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn get_allowed_access_control_tags(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.allowed_access_control_tags
    }
    /// Appends an item to `tag_restricted_resources`.
    ///
    /// To override the contents of this collection use [`set_tag_restricted_resources`](Self::set_tag_restricted_resources).
    ///
    /// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn tag_restricted_resources(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.tag_restricted_resources.unwrap_or_default();
        v.push(input.into());
        self.tag_restricted_resources = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn set_tag_restricted_resources(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.tag_restricted_resources = input;
        self
    }
    /// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn get_tag_restricted_resources(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.tag_restricted_resources
    }
    /// Appends an item to `applications`.
    ///
    /// To override the contents of this collection use [`set_applications`](Self::set_applications).
    ///
    /// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
    pub fn applications(mut self, input: crate::types::Application) -> Self {
        let mut v = self.applications.unwrap_or_default();
        v.push(input);
        self.applications = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
    pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Application>>) -> Self {
        self.applications = input;
        self
    }
    /// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
    pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Application>> {
        &self.applications
    }
    /// Appends an item to `hierarchy_restricted_resources`.
    ///
    /// To override the contents of this collection use [`set_hierarchy_restricted_resources`](Self::set_hierarchy_restricted_resources).
    ///
    /// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
    pub fn hierarchy_restricted_resources(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.hierarchy_restricted_resources.unwrap_or_default();
        v.push(input.into());
        self.hierarchy_restricted_resources = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
    pub fn set_hierarchy_restricted_resources(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.hierarchy_restricted_resources = input;
        self
    }
    /// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
    pub fn get_hierarchy_restricted_resources(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.hierarchy_restricted_resources
    }
    /// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn allowed_access_control_hierarchy_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.allowed_access_control_hierarchy_group_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn set_allowed_access_control_hierarchy_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.allowed_access_control_hierarchy_group_id = input;
        self
    }
    /// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
    pub fn get_allowed_access_control_hierarchy_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.allowed_access_control_hierarchy_group_id
    }
    /// Appends an item to `allowed_flow_modules`.
    ///
    /// To override the contents of this collection use [`set_allowed_flow_modules`](Self::set_allowed_flow_modules).
    ///
    /// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
    pub fn allowed_flow_modules(mut self, input: crate::types::FlowModule) -> Self {
        let mut v = self.allowed_flow_modules.unwrap_or_default();
        v.push(input);
        self.allowed_flow_modules = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
    pub fn set_allowed_flow_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowModule>>) -> Self {
        self.allowed_flow_modules = input;
        self
    }
    /// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
    pub fn get_allowed_flow_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowModule>> {
        &self.allowed_flow_modules
    }
    /// <p>The granular access control configuration for the security profile, including data table permissions.</p>
    pub fn granular_access_control_configuration(mut self, input: crate::types::GranularAccessControlConfiguration) -> Self {
        self.granular_access_control_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The granular access control configuration for the security profile, including data table permissions.</p>
    pub fn set_granular_access_control_configuration(
        mut self,
        input: ::std::option::Option<crate::types::GranularAccessControlConfiguration>,
    ) -> Self {
        self.granular_access_control_configuration = input;
        self
    }
    /// <p>The granular access control configuration for the security profile, including data table permissions.</p>
    pub fn get_granular_access_control_configuration(&self) -> &::std::option::Option<crate::types::GranularAccessControlConfiguration> {
        &self.granular_access_control_configuration
    }
    /// Consumes the builder and constructs a [`CreateSecurityProfileInput`](crate::operation::create_security_profile::CreateSecurityProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_security_profile::CreateSecurityProfileInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_security_profile::CreateSecurityProfileInput {
            security_profile_name: self.security_profile_name,
            description: self.description,
            permissions: self.permissions,
            instance_id: self.instance_id,
            tags: self.tags,
            allowed_access_control_tags: self.allowed_access_control_tags,
            tag_restricted_resources: self.tag_restricted_resources,
            applications: self.applications,
            hierarchy_restricted_resources: self.hierarchy_restricted_resources,
            allowed_access_control_hierarchy_group_id: self.allowed_access_control_hierarchy_group_id,
            allowed_flow_modules: self.allowed_flow_modules,
            granular_access_control_configuration: self.granular_access_control_configuration,
        })
    }
}