Skip to content

delete_service_specific_credential

delete_service_specific_credential(
    service_specific_credential_id: serviceSpecificCredentialId,
    *,
    config_overrides: Optional[IAMClientConfig] = None,
    user_name: Optional[userNameType] = None,
) -> None

Deletes the specified service-specific credential.

Parameters:

  • user_name (Optional[userNameType], default: None ) –

    The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.

    This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

  • service_specific_credential_id (serviceSpecificCredentialId) –

    The unique identifier of the service-specific credential. You can get this value by calling ListServiceSpecificCredentials.

    This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.

Raises:

  • NoSuchEntityException –

    The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

  • UnknownServiceError –

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

Source code in docs_src/capo_iam/_services/iam.py
def delete_service_specific_credential(
    self,
    service_specific_credential_id: "capo_iam.types.service_specific_credential_id.serviceSpecificCredentialId",
    *,
    config_overrides: Optional[IAMClientConfig] = None,
    user_name: Optional["capo_iam.types.user_name_type.userNameType"] = None,
) -> None:
    """<p>Deletes the specified service-specific credential.</p>

    Args:
        user_name: <p>The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.</p> <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
        service_specific_credential_id: <p>The unique identifier of the service-specific credential. You can get this value by calling <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListServiceSpecificCredentials.html">ListServiceSpecificCredentials</a>.</p> <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters that can consist of any upper or lowercased letter or digit.</p>

    Raises:
        capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
        capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iam.types.delete_service_specific_credential_request.DeleteServiceSpecificCredentialRequest]",
    ) -> OperationResponse[None]:
        import capo_iam._operations.aws_identity_management_v20100508.delete_service_specific_credential

        output, http_response = (
            capo_iam._operations.aws_identity_management_v20100508.delete_service_specific_credential.delete_service_specific_credential(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteServiceSpecificCredential")
    )
    input_: capo_iam.types.delete_service_specific_credential_request.DeleteServiceSpecificCredentialRequest = {
        "service_specific_credential_id": service_specific_credential_id
    }
    if user_name is not None:
        input_["user_name"] = user_name

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