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/redshift.py
| def modify_authentication_profile(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.modify_authentication_profile_message.ModifyAuthenticationProfileMessage]",
) -> OperationResponse[
"capo_redshift.types.modify_authentication_profile_result.ModifyAuthenticationProfileResult"
]:
import capo_redshift._operations.redshift_service_version20121201.modify_authentication_profile
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.modify_authentication_profile.modify_authentication_profile(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|