Skip to content

delete_attribute_mapping

delete_attribute_mapping(
    profile_id: ProfileIdentifier,
    certificate_field: CertificateField,
    *,
    config_overrides: Optional[RolesAnywhereClientConfig] = None,
    specifiers: Optional[SpecifierList] = None,
) -> DeleteAttributeMappingResponse

Delete an entry from the attribute mapping rules enforced by a given profile.

Parameters:

  • profile_id (ProfileIdentifier) –

    The profile to act on. You can specify one of the following:

    • The profile ID.

    • The profile ARN.

    • The alias ARN of the profile.

    An ARN must be for a profile in your account and Region.

  • certificate_field (CertificateField) –

    Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.

  • specifiers (Optional[SpecifierList], default: None ) –

    A list of specifiers of a certificate field; for example, CN, OU, UID from a Subject.

Raises:

Examples:

DeleteAttributeMapping - Deletes a custom attribute mapping rule

>>> client.delete_attribute_mapping(profile_id='00000000-0000-0000-0000-000000000000', specifiers=['OU'], certificate_field='x509Subject')
Source code in docs_src/capo_rolesanywhere/_services/roles_anywhere.py
def delete_attribute_mapping(
    self,
    profile_id: "capo_rolesanywhere.types.profile_identifier.ProfileIdentifier",
    certificate_field: "capo_rolesanywhere.types.certificate_field.CertificateField",
    *,
    config_overrides: Optional[RolesAnywhereClientConfig] = None,
    specifiers: Optional[
        "capo_rolesanywhere.types.specifier_list.SpecifierList"
    ] = None,
) -> "capo_rolesanywhere.types.delete_attribute_mapping_response.DeleteAttributeMappingResponse":
    """<p>Delete an entry from the attribute mapping rules enforced by a given profile.</p>

    Args:
        profile_id: <p>The profile to act on. You can specify one of the following:</p> <ul> <li> <p>The profile ID.</p> </li> <li> <p>The profile ARN.</p> </li> <li> <p>The alias ARN of the profile.</p> </li> </ul> <p>An ARN must be for a profile in your account and Region.</p>
        certificate_field: <p>Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.</p>
        specifiers: <p>A list of specifiers of a certificate field; for example, CN, OU, UID from a Subject.</p>

    Raises:
        capo_rolesanywhere.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_rolesanywhere.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_rolesanywhere.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed due to a temporary failure of the service.</p>
        capo_rolesanywhere.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
        capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        DeleteAttributeMapping - Deletes a custom attribute mapping rule

        >>> client.delete_attribute_mapping(profile_id='00000000-0000-0000-0000-000000000000', specifiers=['OU'], certificate_field='x509Subject')
    """

    def _handler(
        req: "OperationRequest[capo_rolesanywhere.types.delete_attribute_mapping_request.DeleteAttributeMappingRequest]",
    ) -> OperationResponse[
        "capo_rolesanywhere.types.delete_attribute_mapping_response.DeleteAttributeMappingResponse"
    ]:
        import capo_rolesanywhere._operations.roles_anywhere.delete_attribute_mapping

        output, http_response = (
            capo_rolesanywhere._operations.roles_anywhere.delete_attribute_mapping.delete_attribute_mapping(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAttributeMapping")
    )
    input_: capo_rolesanywhere.types.delete_attribute_mapping_request.DeleteAttributeMappingRequest = {
        "profile_id": profile_id,
        "certificate_field": certificate_field,
    }
    if specifiers is not None:
        input_["specifiers"] = specifiers

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