Skip to content

put_account_alias

put_account_alias(
    account_alias: awsAccountAlias,
    *,
    config_overrides: Optional[SupportAppClientConfig] = None,
) -> PutAccountAliasResult

Creates or updates an individual alias for each Amazon Web Services account ID. The alias appears in the Amazon Web Services Support App page of the Amazon Web Services Support Center. The alias also appears in Slack messages from the Amazon Web Services Support App.

Parameters:

  • account_alias (awsAccountAlias) –

    An alias or short name for an Amazon Web Services account.

Raises:

  • AccessDeniedException –

    You don't have sufficient permission to perform this action.

  • InternalServerException –

    We can’t process your request right now because of a server issue. Try again later.

  • ValidationException –

    Your request input doesn't meet the constraints that the Amazon Web Services Support App specifies.

  • UnknownServiceError –

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

Source code in docs_src/capo_support_app/_services/support_app.py
def put_account_alias(
    self,
    account_alias: "capo_support_app.types.aws_account_alias.awsAccountAlias",
    *,
    config_overrides: Optional[SupportAppClientConfig] = None,
) -> "capo_support_app.types.put_account_alias_result.PutAccountAliasResult":
    """<p>Creates or updates an individual alias for each Amazon Web Services account ID. The alias appears in the Amazon Web Services Support App page of the Amazon Web Services Support Center. The alias also appears in Slack messages from the Amazon Web Services Support App.</p>

    Args:
        account_alias: <p>An alias or short name for an Amazon Web Services account.</p>

    Raises:
        capo_support_app.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_support_app.errors.internal_server_exception.InternalServerException: <p>We can’t process your request right now because of a server issue. Try again later.</p>
        capo_support_app.errors.validation_exception.ValidationException: <p>Your request input doesn't meet the constraints that the Amazon Web Services Support App specifies.</p>
        capo_support_app.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_support_app.types.put_account_alias_request.PutAccountAliasRequest]",
    ) -> OperationResponse[
        "capo_support_app.types.put_account_alias_result.PutAccountAliasResult"
    ]:
        import capo_support_app._operations.support_app.put_account_alias

        output, http_response = (
            capo_support_app._operations.support_app.put_account_alias.put_account_alias(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutAccountAlias")
    )
    input_: capo_support_app.types.put_account_alias_request.PutAccountAliasRequest = {
        "account_alias": account_alias
    }

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