Skip to content

update_security_profile

update_security_profile(
    security_profile_id: SecurityProfileId,
    instance_id: InstanceId,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    description: Optional[SecurityProfileDescription] = None,
    permissions: Optional[PermissionsList] = None,
    allowed_access_control_tags: Optional[AllowedAccessControlTags] = None,
    tag_restricted_resources: Optional[TagRestrictedResourceList] = None,
    applications: Optional[Applications] = None,
    hierarchy_restricted_resources: Optional[HierarchyRestrictedResourceList] = None,
    allowed_access_control_hierarchy_group_id: Optional[HierarchyGroupId] = None,
    allowed_flow_modules: Optional[AllowedFlowModules] = None,
    allowed_ai_agents: Optional[AllowedAIAgents] = None,
    granular_access_control_configuration: Optional[
        GranularAccessControlConfiguration
    ] = None,
) -> None

Updates a security profile.

For information about security profiles, see Security Profiles in the Connect Customer Administrator Guide. For a mapping of the API name and user interface name of the security profile permissions, see List of security profile permissions.

Parameters:

  • description (Optional[SecurityProfileDescription], default: None ) –

    The description of the security profile.

  • permissions (Optional[PermissionsList], default: None ) –

    The permissions granted to a security profile. For a list of valid permissions, see List of security profile permissions.

  • security_profile_id (SecurityProfileId) –

    The identifier for the security profle.

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • allowed_access_control_tags (Optional[AllowedAccessControlTags], default: None ) –

    The list of tags that a security profile uses to restrict access to resources in Connect Customer.

  • tag_restricted_resources (Optional[TagRestrictedResourceList], default: None ) –

    The list of resources that a security profile applies tag restrictions to in Connect Customer.

  • applications (Optional[Applications], default: None ) –

    A list of the third-party application's metadata.

  • hierarchy_restricted_resources (Optional[HierarchyRestrictedResourceList], default: None ) –

    The list of resources that a security profile applies hierarchy restrictions to in Connect Customer. Following are acceptable ResourceNames: User.

  • allowed_access_control_hierarchy_group_id (Optional[HierarchyGroupId], default: None ) –

    The identifier of the hierarchy group that a security profile uses to restrict access to resources in Connect Customer.

  • allowed_flow_modules (Optional[AllowedFlowModules], default: None ) –

    A list of Flow Modules an AI Agent can invoke as a tool

  • allowed_ai_agents (Optional[AllowedAIAgents], default: None ) –

    A list of AI agents that the security profile will give access to.

  • granular_access_control_configuration (Optional[GranularAccessControlConfiguration], default: None ) –

    The granular access control configuration for the security profile, including data table permissions.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def update_security_profile(
    self,
    security_profile_id: "capo_connect.types.security_profile_id.SecurityProfileId",
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    description: Optional[
        "capo_connect.types.security_profile_description.SecurityProfileDescription"
    ] = None,
    permissions: Optional[
        "capo_connect.types.permissions_list.PermissionsList"
    ] = None,
    allowed_access_control_tags: Optional[
        "capo_connect.types.allowed_access_control_tags.AllowedAccessControlTags"
    ] = None,
    tag_restricted_resources: Optional[
        "capo_connect.types.tag_restricted_resource_list.TagRestrictedResourceList"
    ] = None,
    applications: Optional["capo_connect.types.applications.Applications"] = None,
    hierarchy_restricted_resources: Optional[
        "capo_connect.types.hierarchy_restricted_resource_list.HierarchyRestrictedResourceList"
    ] = None,
    allowed_access_control_hierarchy_group_id: Optional[
        "capo_connect.types.hierarchy_group_id.HierarchyGroupId"
    ] = None,
    allowed_flow_modules: Optional[
        "capo_connect.types.allowed_flow_modules.AllowedFlowModules"
    ] = None,
    allowed_ai_agents: Optional[
        "capo_connect.types.allowed_ai_agents.AllowedAIAgents"
    ] = None,
    granular_access_control_configuration: Optional[
        "capo_connect.types.granular_access_control_configuration.GranularAccessControlConfiguration"
    ] = None,
) -> None:
    """<p>Updates a security profile.</p> <p>For information about security profiles, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/connect-security-profiles.html">Security Profiles</a> in the <i>Connect Customer Administrator Guide</i>. For a mapping of the API name and user interface name of the security profile permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>. </p>

    Args:
        description: <p>The description of the security profile.</p>
        permissions: <p>The permissions granted to a 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>
        security_profile_id: <p>The identifier for the security profle.</p>
        instance_id: <p>The identifier of the Connect Customer 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>
        allowed_access_control_tags: <p>The list of tags that a security profile uses to restrict access to resources in Connect Customer.</p>
        tag_restricted_resources: <p>The list of resources that a security profile applies tag restrictions to in Connect Customer.</p>
        applications: <p>A list of the third-party application's metadata.</p>
        hierarchy_restricted_resources: <p>The list of resources that a security profile applies hierarchy restrictions to in Connect Customer. Following are acceptable ResourceNames: <code>User</code>.</p>
        allowed_access_control_hierarchy_group_id: <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Connect Customer.</p>
        allowed_flow_modules: <p> A list of Flow Modules an AI Agent can invoke as a tool </p>
        allowed_ai_agents: <p>A list of AI agents that the security profile will give access to.</p>
        granular_access_control_configuration: <p>The granular access control configuration for the security profile, including data table permissions.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.update_security_profile_request.UpdateSecurityProfileRequest]",
    ) -> OperationResponse[None]:
        import capo_connect._operations.amazon_connect_service.update_security_profile

        output, http_response = (
            capo_connect._operations.amazon_connect_service.update_security_profile.update_security_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSecurityProfile")
    )
    input_: capo_connect.types.update_security_profile_request.UpdateSecurityProfileRequest = {
        "security_profile_id": security_profile_id,
        "instance_id": instance_id,
    }
    if description is not None:
        input_["description"] = description
    if permissions is not None:
        input_["permissions"] = permissions
    if allowed_access_control_tags is not None:
        input_["allowed_access_control_tags"] = allowed_access_control_tags
    if tag_restricted_resources is not None:
        input_["tag_restricted_resources"] = tag_restricted_resources
    if applications is not None:
        input_["applications"] = applications
    if hierarchy_restricted_resources is not None:
        input_["hierarchy_restricted_resources"] = hierarchy_restricted_resources
    if allowed_access_control_hierarchy_group_id is not None:
        input_["allowed_access_control_hierarchy_group_id"] = (
            allowed_access_control_hierarchy_group_id
        )
    if allowed_flow_modules is not None:
        input_["allowed_flow_modules"] = allowed_flow_modules
    if allowed_ai_agents is not None:
        input_["allowed_ai_agents"] = allowed_ai_agents
    if granular_access_control_configuration is not None:
        input_["granular_access_control_configuration"] = (
            granular_access_control_configuration
        )

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output