Generates a ClientCertificate resource.
Parameters:
-
description
(Optional[String], default:
None
)
–
The description of the ClientCertificate.
-
tags
(Optional[MapOfStringToString], default:
None
)
–
The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.
Raises:
-
BadRequestException
–
The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
-
ConflictException
–
The request configuration has conflicts. For details, see the accompanying error message.
-
LimitExceededException
–
The request exceeded the rate limit. Retry after the specified time period.
-
TooManyRequestsException
–
The request has reached its throttling limit. Retry after the specified time period.
-
UnauthorizedException
–
The request is denied because the caller has insufficient permissions.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_api_gateway/_services/async_api_gateway.py
| async def generate_client_certificate(
self,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
description: Optional["capo_api_gateway.types.string.String"] = None,
tags: Optional[
"capo_api_gateway.types.map_of_string_to_string.MapOfStringToString"
] = None,
) -> "capo_api_gateway.types.client_certificate.ClientCertificate":
"""<p>Generates a ClientCertificate resource.</p>
Args:
description: <p>The description of the ClientCertificate.</p>
tags: <p>The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with <code>aws:</code>. The tag value can be up to 256 characters.</p>
Raises:
capo_api_gateway.errors.bad_request_exception.BadRequestException: <p>The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.</p>
capo_api_gateway.errors.conflict_exception.ConflictException: <p>The request configuration has conflicts. For details, see the accompanying error message.</p>
capo_api_gateway.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded the rate limit. Retry after the specified time period.</p>
capo_api_gateway.errors.too_many_requests_exception.TooManyRequestsException: <p>The request has reached its throttling limit. Retry after the specified time period.</p>
capo_api_gateway.errors.unauthorized_exception.UnauthorizedException: <p>The request is denied because the caller has insufficient permissions.</p>
capo_api_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_api_gateway.types.generate_client_certificate_request.GenerateClientCertificateRequest]",
) -> AsyncOperationResponse[
"capo_api_gateway.types.client_certificate.ClientCertificate"
]:
import capo_api_gateway._operations.backplane_control_service.generate_client_certificate
(
output,
http_response,
) = await capo_api_gateway._operations.backplane_control_service.generate_client_certificate.async_generate_client_certificate(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GenerateClientCertificate")
)
input_: capo_api_gateway.types.generate_client_certificate_request.GenerateClientCertificateRequest = {}
if description is not None:
input_["description"] = description
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|