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/async_iam.py
| async def delete_service_specific_credential(
self,
service_specific_credential_id: "capo_iam.types.service_specific_credential_id.serviceSpecificCredentialId",
*,
config_overrides: Optional[AsyncIAMClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.delete_service_specific_credential_request.DeleteServiceSpecificCredentialRequest]",
) -> AsyncOperationResponse[None]:
import capo_iam._operations.aws_identity_management_v20100508.delete_service_specific_credential
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.delete_service_specific_credential.async_delete_service_specific_credential(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|