Skip to content

create_credential_provider_pool

create_credential_provider_pool(
    name: PoolName,
    *,
    config_overrides: Optional[CredentialBrokerControlClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    encryption_configuration: Optional[EncryptionConfiguration] = None,
    identity_center_configuration: Optional[IdentityCenterConfiguration] = None,
    tags: Optional[TagMap] = None,
) -> CreateCredentialProviderPoolResponse

Creates a CredentialProviderPool. The customer provides the pool name; the service generates the pool id and ARN.

Creation is asynchronous. The operation returns the pool with a transitional status, and the pool reaches READY or FAILED on its own; poll GetCredentialProviderPool to observe the transition.

The encryption configuration you set here governs every credential provider in the pool: a provider encrypts the credentials it caches under the pool's configuration unless it overrides that with a customer managed key of its own. A provider that inherits follows the pool, so setting or changing the pool's key later moves those providers onto the new key, while a provider that set its own key is unaffected.

Required permissions: this operation needs additional permissions depending on how you configure the pool. If you associate an IAM Identity Center instance, you also need sso:CreateApplication, sso:PutApplicationAuthenticationMethod, sso:PutApplicationGrant, and sso:PutApplicationAssignmentConfiguration. If you encrypt with a customer managed KMS key, you also need kms:CreateGrant and kms:DescribeKey on that key.

Parameters:

  • name (PoolName) –

    The name for the credential provider pool. Must be unique among the pools that currently exist in your account. You can change it later with UpdateCredentialProviderPool.

  • client_token (Optional[ClientToken], default: None ) –

    SDK auto-populates; enables safe retries.

  • encryption_configuration (Optional[EncryptionConfiguration], default: None ) –

    How cached tokens are encrypted at rest for the providers in this pool. Omit to encrypt with a service-owned key. Each provider in the pool uses this configuration unless it overrides it with a customer managed key of its own.

  • identity_center_configuration (Optional[IdentityCenterConfiguration], default: None ) –

    Links a credential provider pool to an IAM Identity Center instance, so that providers in the pool can issue credentials for the identity in the caller's Identity Center session. A pool can be associated with at most one instance. Associating an instance creates an Identity Center application that the pool owns; every provider in the pool reports that same application.

  • 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. 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.

  • 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 serviceCode and quotaCode, then retry.

  • 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/credential_broker_control.py
def create_credential_provider_pool(
    self,
    name: "capo_credentialbroker_control.types.pool_name.PoolName",
    *,
    config_overrides: Optional[CredentialBrokerControlClientConfig] = None,
    client_token: Optional[
        "capo_credentialbroker_control.types.client_token.ClientToken"
    ] = None,
    encryption_configuration: Optional[
        "capo_credentialbroker_control.types.encryption_configuration.EncryptionConfiguration"
    ] = None,
    identity_center_configuration: Optional[
        "capo_credentialbroker_control.types.identity_center_configuration.IdentityCenterConfiguration"
    ] = None,
    tags: Optional["capo_credentialbroker_control.types.tag_map.TagMap"] = None,
) -> "capo_credentialbroker_control.types.create_credential_provider_pool_response.CreateCredentialProviderPoolResponse":
    """<p>Creates a CredentialProviderPool. The customer provides the pool name; the service generates the pool id and ARN.</p> <p>Creation is asynchronous. The operation returns the pool with a transitional <code>status</code>, and the pool reaches <code>READY</code> or <code>FAILED</code> on its own; poll <code>GetCredentialProviderPool</code> to observe the transition.</p> <p>The encryption configuration you set here governs every credential provider in the pool: a provider encrypts the credentials it caches under the pool's configuration unless it overrides that with a customer managed key of its own. A provider that inherits follows the pool, so setting or changing the pool's key later moves those providers onto the new key, while a provider that set its own key is unaffected.</p> <p> <b>Required permissions:</b> this operation needs additional permissions depending on how you configure the pool. If you associate an IAM Identity Center instance, you also need <code>sso:CreateApplication</code>, <code>sso:PutApplicationAuthenticationMethod</code>, <code>sso:PutApplicationGrant</code>, and <code>sso:PutApplicationAssignmentConfiguration</code>. If you encrypt with a customer managed KMS key, you also need <code>kms:CreateGrant</code> and <code>kms:DescribeKey</code> on that key.</p>

    Args:
        name: <p>The name for the credential provider pool. Must be unique among the pools that currently exist in your account. You can change it later with UpdateCredentialProviderPool.</p>
        client_token: <p>SDK auto-populates; enables safe retries.</p>
        encryption_configuration: <p>How cached tokens are encrypted at rest for the providers in this pool. Omit to encrypt with a service-owned key. Each provider in the pool uses this configuration unless it overrides it with a customer managed key of its own.</p>
        identity_center_configuration: <p>Links a credential provider pool to an IAM Identity Center instance, so that providers in the pool can issue credentials for the identity in the caller's Identity Center session. A pool can be associated with at most one instance. Associating an instance creates an Identity Center application that the pool owns; every provider in the pool reports that same application.</p>
        tags: <p>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.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>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 <code>serviceCode</code> and <code>quotaCode</code>, then retry.</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.
    """

    def _handler(
        req: "OperationRequest[capo_credentialbroker_control.types.create_credential_provider_pool_request.CreateCredentialProviderPoolRequest]",
    ) -> OperationResponse[
        "capo_credentialbroker_control.types.create_credential_provider_pool_response.CreateCredentialProviderPoolResponse"
    ]:
        import capo_credentialbroker_control._operations.aws_tessera_control_plane.create_credential_provider_pool

        output, http_response = (
            capo_credentialbroker_control._operations.aws_tessera_control_plane.create_credential_provider_pool.create_credential_provider_pool(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCredentialProviderPool")
    )
    input_: capo_credentialbroker_control.types.create_credential_provider_pool_request.CreateCredentialProviderPoolRequest = {
        "name": name
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if encryption_configuration is not None:
        input_["encryption_configuration"] = encryption_configuration
    if identity_center_configuration is not None:
        input_["identity_center_configuration"] = identity_center_configuration
    if tags is not None:
        input_["tags"] = tags

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