Skip to content

delete_credential_provider async

delete_credential_provider(
    credential_provider_pool_identifier: CredentialProviderPoolIdentifier,
    credential_provider_identifier: CredentialProviderIdentifier,
    *,
    config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
) -> DeleteCredentialProviderResponse

Accepts an asynchronous request to delete a CredentialProvider of any provider type.

The operation is idempotent. Poll GetCredentialProvider until it returns a resource-not-found error to observe that deletion has finished.

Required permissions: in addition to permission for this operation, the service performs secretsmanager:DeleteSecret on your behalf, but only when the provider's credential is held in a secret the service created. A provider that references a secret you own leaves that secret untouched.

Parameters:

  • credential_provider_pool_identifier (CredentialProviderPoolIdentifier) –

    Identifies a credential provider pool. Accepts either the pool's ARN or its service-generated ID; both refer to the same pool.

  • credential_provider_identifier (CredentialProviderIdentifier) –

    Identifies a credential provider. Accepts either the provider's ARN or its service-generated ID; both refer to the same provider.

Raises:

  • AccessDeniedException –

    The caller is not authorized to perform the request, or a resource the request depends on refused access. reason distinguishes a denial by this service from a denial reported by a dependency the caller configured, such as a customer-owned secret, KMS key, or external identity provider, which usually points at a permission or configuration fix outside this API.

  • ConflictException –

    The request conflicts with the current state of the resource. Nothing was changed. Depending on reason, the request may succeed if retried once the resource reaches a settled state, or it may require different input (for example a name that is not already taken).

  • InternalServerException –

    The request failed because of an unexpected error in the service. Whether the request took effect is undefined, so for a create or update, read the resource back before retrying. Retryable: the same request may succeed later.

  • ResourceNotFoundException –

    The requested resource does not exist, or the caller is not permitted to know that it exists. A resource that was deleted, or that is still being created, can also be reported this way.

  • ThrottlingException –

    The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring retryAfterSeconds when it is present.

  • ValidationException –

    The request is not valid. The request was rejected before any change was made, so it is safe to correct the input and retry. Use reason to branch in code and message for the human-readable detail of which field or combination of fields was at fault.

  • UnknownServiceError –

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

Source code in docs_src/capo_credentialbroker_control/_services/async_credential_broker_control.py
async def delete_credential_provider(
    self,
    credential_provider_pool_identifier: "capo_credentialbroker_control.types.credential_provider_pool_identifier.CredentialProviderPoolIdentifier",
    credential_provider_identifier: "capo_credentialbroker_control.types.credential_provider_identifier.CredentialProviderIdentifier",
    *,
    config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
) -> "capo_credentialbroker_control.types.delete_credential_provider_response.DeleteCredentialProviderResponse":
    """<p>Accepts an asynchronous request to delete a CredentialProvider of any provider type.</p> <p>The operation is idempotent. Poll <code>GetCredentialProvider</code> until it returns a resource-not-found error to observe that deletion has finished.</p> <p> <b>Required permissions:</b> in addition to permission for this operation, the service performs <code>secretsmanager:DeleteSecret</code> on your behalf, but only when the provider's credential is held in a secret the service created. A provider that references a secret you own leaves that secret untouched.</p>

    Args:
        credential_provider_pool_identifier: <p>Identifies a credential provider pool. Accepts either the pool's ARN or its service-generated ID; both refer to the same pool.</p>
        credential_provider_identifier: <p>Identifies a credential provider. Accepts either the provider's ARN or its service-generated ID; both refer to the same provider.</p>

    Raises:
        capo_credentialbroker_control.errors.access_denied_exception.AccessDeniedException: <p>The caller is not authorized to perform the request, or a resource the request depends on refused access. <code>reason</code> distinguishes a denial by this service from a denial reported by a dependency the caller configured, such as a customer-owned secret, KMS key, or external identity provider, which usually points at a permission or configuration fix outside this API.</p>
        capo_credentialbroker_control.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Nothing was changed. Depending on <code>reason</code>, the request may succeed if retried once the resource reaches a settled state, or it may require different input (for example a name that is not already taken).</p>
        capo_credentialbroker_control.errors.internal_server_exception.InternalServerException: <p>The request failed because of an unexpected error in the service. Whether the request took effect is undefined, so for a create or update, read the resource back before retrying. Retryable: the same request may succeed later.</p>
        capo_credentialbroker_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource does not exist, or the caller is not permitted to know that it exists. A resource that was deleted, or that is still being created, can also be reported this way.</p>
        capo_credentialbroker_control.errors.throttling_exception.ThrottlingException: <p>The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring <code>retryAfterSeconds</code> when it is present.</p>
        capo_credentialbroker_control.errors.validation_exception.ValidationException: <p>The request is not valid. The request was rejected before any change was made, so it is safe to correct the input and retry. Use <code>reason</code> to branch in code and <code>message</code> for the human-readable detail of which field or combination of fields was at fault.</p>
        capo_credentialbroker_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_credentialbroker_control.types.delete_credential_provider_request.DeleteCredentialProviderRequest]",
    ) -> AsyncOperationResponse[
        "capo_credentialbroker_control.types.delete_credential_provider_response.DeleteCredentialProviderResponse"
    ]:
        import capo_credentialbroker_control._operations.aws_tessera_control_plane.delete_credential_provider

        (
            output,
            http_response,
        ) = await capo_credentialbroker_control._operations.aws_tessera_control_plane.delete_credential_provider.async_delete_credential_provider(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteCredentialProvider")
    )
    input_: capo_credentialbroker_control.types.delete_credential_provider_request.DeleteCredentialProviderRequest = {
        "credential_provider_pool_identifier": credential_provider_pool_identifier,
        "credential_provider_identifier": credential_provider_identifier,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output