Skip to content

modify_authentication_profile async

modify_authentication_profile(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    authentication_profile_name: Optional[AuthenticationProfileNameString] = None,
    authentication_profile_content: Optional[String] = None,
) -> ModifyAuthenticationProfileResult

Modifies an authentication profile.

Parameters:

  • authentication_profile_name (Optional[AuthenticationProfileNameString], default: None ) –

    The name of the authentication profile to replace.

  • authentication_profile_content (Optional[String], default: None ) –

    The new content of the authentication profile in JSON format. The maximum length of the JSON string is determined by a quota for your account.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def modify_authentication_profile(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    authentication_profile_name: Optional[
        "capo_redshift.types.authentication_profile_name_string.AuthenticationProfileNameString"
    ] = None,
    authentication_profile_content: Optional[
        "capo_redshift.types.string.String"
    ] = None,
) -> "capo_redshift.types.modify_authentication_profile_result.ModifyAuthenticationProfileResult":
    """<p>Modifies an authentication profile.</p>

    Args:
        authentication_profile_name: <p>The name of the authentication profile to replace.</p>
        authentication_profile_content: <p>The new content of the authentication profile in JSON format. The maximum length of the JSON string is determined by a quota for your account.</p>

    Raises:
        capo_redshift.errors.authentication_profile_not_found_fault.AuthenticationProfileNotFoundFault: <p>The authentication profile can't be found.</p>
        capo_redshift.errors.authentication_profile_quota_exceeded_fault.AuthenticationProfileQuotaExceededFault: <p>The size or number of authentication profiles has exceeded the quota. The maximum length of the JSON string and maximum number of authentication profiles is determined by a quota for your account.</p>
        capo_redshift.errors.invalid_authentication_profile_request_fault.InvalidAuthenticationProfileRequestFault: <p>The authentication profile request is not valid. The profile name can't be null or empty. The authentication profile API operation must be available in the Amazon Web Services Region.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.modify_authentication_profile_message.ModifyAuthenticationProfileMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.modify_authentication_profile_result.ModifyAuthenticationProfileResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.modify_authentication_profile

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.modify_authentication_profile.async_modify_authentication_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyAuthenticationProfile")
    )
    input_: capo_redshift.types.modify_authentication_profile_message.ModifyAuthenticationProfileMessage = {}
    if authentication_profile_name is not None:
        input_["authentication_profile_name"] = authentication_profile_name
    if authentication_profile_content is not None:
        input_["authentication_profile_content"] = authentication_profile_content

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output