Skip to content

create_instance_access_control_attribute_configuration

create_instance_access_control_attribute_configuration(
    instance_arn: InstanceArn,
    instance_access_control_attribute_configuration: InstanceAccessControlAttributeConfiguration,
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
) -> CreateInstanceAccessControlAttributeConfigurationResponse

Enables the attributes-based access control (ABAC) feature for the specified IAM Identity Center instance. You can also specify new attributes to add to your ABAC configuration during the enabling process. For more information about ABAC, see Attribute-Based Access Control in the IAM Identity Center User Guide.

After a successful response, call DescribeInstanceAccessControlAttributeConfiguration to validate that InstanceAccessControlAttributeConfiguration was created.

Parameters:

  • instance_arn (InstanceArn) –

    The ARN of the IAM Identity Center instance under which the operation will be executed.

  • instance_access_control_attribute_configuration (InstanceAccessControlAttributeConfiguration) –

    Specifies the IAM Identity Center identity store attributes to add to your ABAC configuration. When using an external identity provider as an identity source, you can pass attributes through the SAML assertion. Doing so provides an alternative to configuring attributes from the IAM Identity Center identity store. If a SAML assertion passes any of these attributes, IAM Identity Center will replace the attribute value with the value from the IAM Identity Center identity store.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.

  • InternalServerException –

    The request processing has failed because of an unknown error, exception, or failure with an internal server.

  • ResourceNotFoundException –

    Indicates that a requested resource is not found.

  • ThrottlingException –

    Indicates that the principal has crossed the throttling limits of the API operations.

  • ValidationException –

    The request failed because it contains a syntax error.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sso_admin/_services/sso_admin.py
def create_instance_access_control_attribute_configuration(
    self,
    instance_arn: "capo_sso_admin.types.instance_arn.InstanceArn",
    instance_access_control_attribute_configuration: "capo_sso_admin.types.instance_access_control_attribute_configuration.InstanceAccessControlAttributeConfiguration",
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
) -> "capo_sso_admin.types.create_instance_access_control_attribute_configuration_response.CreateInstanceAccessControlAttributeConfigurationResponse":
    """<p>Enables the attributes-based access control (ABAC) feature for the specified IAM Identity Center instance. You can also specify new attributes to add to your ABAC configuration during the enabling process. For more information about ABAC, see <a href="/singlesignon/latest/userguide/abac.html">Attribute-Based Access Control</a> in the <i>IAM Identity Center User Guide</i>.</p> <note> <p>After a successful response, call <code>DescribeInstanceAccessControlAttributeConfiguration</code> to validate that <code>InstanceAccessControlAttributeConfiguration</code> was created.</p> </note>

    Args:
        instance_arn: <p>The ARN of the IAM Identity Center instance under which the operation will be executed.</p>
        instance_access_control_attribute_configuration: <p>Specifies the IAM Identity Center identity store attributes to add to your ABAC configuration. When using an external identity provider as an identity source, you can pass attributes through the SAML assertion. Doing so provides an alternative to configuring attributes from the IAM Identity Center identity store. If a SAML assertion passes any of these attributes, IAM Identity Center will replace the attribute value with the value from the IAM Identity Center identity store.</p>

    Raises:
        capo_sso_admin.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sso_admin.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.</p>
        capo_sso_admin.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
        capo_sso_admin.errors.resource_not_found_exception.ResourceNotFoundException: <p>Indicates that a requested resource is not found.</p>
        capo_sso_admin.errors.throttling_exception.ThrottlingException: <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
        capo_sso_admin.errors.validation_exception.ValidationException: <p>The request failed because it contains a syntax error.</p>
        capo_sso_admin.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sso_admin.types.create_instance_access_control_attribute_configuration_request.CreateInstanceAccessControlAttributeConfigurationRequest]",
    ) -> OperationResponse[
        "capo_sso_admin.types.create_instance_access_control_attribute_configuration_response.CreateInstanceAccessControlAttributeConfigurationResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.create_instance_access_control_attribute_configuration

        output, http_response = (
            capo_sso_admin._operations.swb_external_service.create_instance_access_control_attribute_configuration.create_instance_access_control_attribute_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateInstanceAccessControlAttributeConfiguration"),
    )
    input_: capo_sso_admin.types.create_instance_access_control_attribute_configuration_request.CreateInstanceAccessControlAttributeConfigurationRequest = {
        "instance_arn": instance_arn,
        "instance_access_control_attribute_configuration": instance_access_control_attribute_configuration,
    }

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