Skip to content

create_autonomous_database_wallet

create_autonomous_database_wallet(
    autonomous_database_id: ResourceIdOrArn,
    *,
    config_overrides: Optional[odbClientConfig] = None,
    wallet_type: Optional[WalletType] = None,
    password: Optional[SensitiveString] = None,
    password_source: Optional[WalletPasswordSource] = None,
    password_source_configuration: Optional[
        WalletPasswordSourceConfigurationInput
    ] = None,
    client_token: Optional[GeneralInputString] = None,
) -> CreateAutonomousDatabaseWalletOutput

Creates a new wallet for the specified Autonomous Database.

Parameters:

  • autonomous_database_id (ResourceIdOrArn) –

    The unique identifier of the Autonomous Database to create a wallet for.

  • wallet_type (Optional[WalletType], default: None ) –

    The type of wallet to create, either a regional wallet or an instance wallet.

  • password (Optional[SensitiveString], default: None ) –

    The password to encrypt the keys inside the wallet.

  • password_source (Optional[WalletPasswordSource], default: None ) –

    The source of the password for encrypting the wallet. When set to CUSTOMER_MANAGED_AWS_SECRET, the password is retrieved from an Amazon Web Services Secrets Manager secret.

  • password_source_configuration (Optional[WalletPasswordSourceConfigurationInput], default: None ) –

    The configuration of the password source for the Autonomous Database wallet.

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

    A client-provided token to ensure the idempotency of the request.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.

  • InternalServerException –

    Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.

  • ResourceNotFoundException –

    The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request has failed validation because it is missing required fields or has invalid inputs.

  • UnknownServiceError –

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

Source code in docs_src/capo_odb/_services/odb.py
def create_autonomous_database_wallet(
    self,
    autonomous_database_id: "capo_odb.types.resource_id_or_arn.ResourceIdOrArn",
    *,
    config_overrides: Optional[odbClientConfig] = None,
    wallet_type: Optional["capo_odb.types.wallet_type.WalletType"] = None,
    password: Optional["capo_odb.types.sensitive_string.SensitiveString"] = None,
    password_source: Optional[
        "capo_odb.types.wallet_password_source.WalletPasswordSource"
    ] = None,
    password_source_configuration: Optional[
        "capo_odb.types.wallet_password_source_configuration_input.WalletPasswordSourceConfigurationInput"
    ] = None,
    client_token: Optional[
        "capo_odb.types.general_input_string.GeneralInputString"
    ] = None,
) -> "capo_odb.types.create_autonomous_database_wallet_output.CreateAutonomousDatabaseWalletOutput":
    """<p>Creates a new wallet for the specified Autonomous Database.</p>

    Args:
        autonomous_database_id: <p>The unique identifier of the Autonomous Database to create a wallet for.</p>
        wallet_type: <p>The type of wallet to create, either a regional wallet or an instance wallet.</p>
        password: <p>The password to encrypt the keys inside the wallet.</p>
        password_source: <p>The source of the password for encrypting the wallet. When set to <code>CUSTOMER_MANAGED_AWS_SECRET</code>, the password is retrieved from an Amazon Web Services Secrets Manager secret.</p>
        password_source_configuration: <p>The configuration of the password source for the Autonomous Database wallet.</p>
        client_token: <p>A client-provided token to ensure the idempotency of the request.</p>

    Raises:
        capo_odb.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.</p>
        capo_odb.errors.internal_server_exception.InternalServerException: <p>Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.</p>
        capo_odb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.</p>
        capo_odb.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_odb.errors.validation_exception.ValidationException: <p>The request has failed validation because it is missing required fields or has invalid inputs.</p>
        capo_odb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_odb.types.create_autonomous_database_wallet_input.CreateAutonomousDatabaseWalletInput]",
    ) -> OperationResponse[
        "capo_odb.types.create_autonomous_database_wallet_output.CreateAutonomousDatabaseWalletOutput"
    ]:
        import capo_odb._operations.odb.create_autonomous_database_wallet

        output, http_response = (
            capo_odb._operations.odb.create_autonomous_database_wallet.create_autonomous_database_wallet(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_odb.types.create_autonomous_database_wallet_input.CreateAutonomousDatabaseWalletInput",
    ) -> dict[str, Any]:
        import capo_odb.types.create_autonomous_database_wallet_input

        return (
            capo_odb.types.create_autonomous_database_wallet_input.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_odb.types.create_autonomous_database_wallet_output.CreateAutonomousDatabaseWalletOutput",
    ) -> dict[str, Any]:
        import capo_odb.types.create_autonomous_database_wallet_output

        return capo_odb.types.create_autonomous_database_wallet_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateAutonomousDatabaseWallet",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_odb.types.create_autonomous_database_wallet_input.CreateAutonomousDatabaseWalletInput = {
        "autonomous_database_id": autonomous_database_id
    }
    if wallet_type is not None:
        input_["wallet_type"] = wallet_type
    if password is not None:
        input_["password"] = password
    if password_source is not None:
        input_["password_source"] = password_source
    if password_source_configuration is not None:
        input_["password_source_configuration"] = password_source_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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