Creates an authentication profile with the specified parameters.
Parameters:
-
authentication_profile_name
(Optional[AuthenticationProfileNameString], default:
None
)
–
The name of the authentication profile to be created.
-
authentication_profile_content
(Optional[String], default:
None
)
–
The 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 create_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.create_authentication_profile_result.CreateAuthenticationProfileResult":
"""<p>Creates an authentication profile with the specified parameters.</p>
Args:
authentication_profile_name: <p>The name of the authentication profile to be created.</p>
authentication_profile_content: <p>The 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_already_exists_fault.AuthenticationProfileAlreadyExistsFault: <p>The authentication profile already exists.</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.create_authentication_profile_message.CreateAuthenticationProfileMessage]",
) -> AsyncOperationResponse[
"capo_redshift.types.create_authentication_profile_result.CreateAuthenticationProfileResult"
]:
import capo_redshift._operations.redshift_service_version20121201.create_authentication_profile
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.create_authentication_profile.async_create_authentication_profile(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateAuthenticationProfile")
)
input_: capo_redshift.types.create_authentication_profile_message.CreateAuthenticationProfileMessage = {}
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
|