create_credential_provider
async
¶
create_credential_provider(
credential_provider_pool_identifier: CredentialProviderPoolIdentifier,
name: ProviderName,
provider_configuration_input: CredentialProviderConfigurationInput,
*,
config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagMap] = None,
) -> CreateCredentialProviderResponse
Creates a CredentialProvider under a parent CredentialProviderPool. The provider type is determined by which member of providerConfigurationInput you set: oauthConfiguration creates an OAUTH provider, apiKeyConfiguration an API_KEY provider. Set exactly one. The operation always returns 202 Accepted.
Creation is asynchronous. The provider is returned with a transitional status and reaches READY or FAILED on its own; poll GetCredentialProvider to observe the transition.
Credentials this provider caches are encrypted under the parent pool's encryption configuration unless the provider overrides it. Within oauthConfiguration, set providerEncryptionConfiguration to a customer managed key to use that key in place of the pool's, or to inheritFromPool to follow the pool. A provider cannot select service-managed encryption on its own, the only way to use the service-owned key is to inherit it from a pool configured that way. An OAuth provider's response reports which applies in encryptionSource, as INHERITED or PROVIDER_OVERRIDE, alongside the resolved encryptionConfiguration.
Required permissions: in addition to permission for this operation, the service performs these actions on your behalf, each only when the request calls for it: secretsmanager:GetSecretValue and secretsmanager:DescribeSecret when the provider references a secret you own; secretsmanager:CreateSecret when you supply the credential value instead, so that the service stores it in a secret it creates; and kms:CreateGrant, kms:DescribeKey, kms:GenerateDataKeyWithoutPlaintext, kms:ReEncryptFrom, kms:ReEncryptTo, kms:Encrypt, and kms:Decrypt when a customer managed KMS key is in use.
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.
-
name(ProviderName) –The name for the credential provider. Must be unique among the providers that currently exist in the same pool. You can change it later with UpdateCredentialProvider.
-
client_token(Optional[ClientToken], default:None) –SDK-populated idempotency token for safe retries.
-
provider_configuration_input(CredentialProviderConfigurationInput) –Type-specific input configuration. Exactly one member must be set.
-
tags(Optional[TagMap], default:None) –Tags attached to a resource, as key-value pairs. Keys are unique within a resource and are case-sensitive. Use tags to categorize resources and to control access with tag-based IAM policies.
Raises:
-
AccessDeniedException–The caller is not authorized to perform the request, or a resource the request depends on refused access.
reasondistinguishes 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.
-
ServiceQuotaExceededException–The request would exceed a service quota, so it was rejected and nothing was created or changed. Delete resources that are no longer needed, or request a quota increase in Service Quotas using
serviceCodeandquotaCode, then retry. -
ThrottlingException–The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring
retryAfterSecondswhen 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
reasonto branch in code andmessagefor 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
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 | |