Skip to content

create_group_certificate_authority async

create_group_certificate_authority(
    group_id: __string,
    *,
    config_overrides: Optional[AsyncGreengrassClientConfig] = None,
    amzn_client_token: Optional[__string] = None,
) -> CreateGroupCertificateAuthorityResponse

Creates a CA for the group. If a CA already exists, it will rotate the existing CA.

Parameters:

  • amzn_client_token (Optional[__string], default: None ) –

    A client token used to correlate requests and responses.

  • group_id (__string) –

    The ID of the Greengrass group.

Raises:

Source code in docs_src/capo_greengrass/_services/async_greengrass.py
async def create_group_certificate_authority(
    self,
    group_id: "capo_greengrass.types.__string.__string",
    *,
    config_overrides: Optional[AsyncGreengrassClientConfig] = None,
    amzn_client_token: Optional["capo_greengrass.types.__string.__string"] = None,
) -> "capo_greengrass.types.create_group_certificate_authority_response.CreateGroupCertificateAuthorityResponse":
    """Creates a CA for the group. If a CA already exists, it will rotate the existing CA.

    Args:
        amzn_client_token: A client token used to correlate requests and responses.
        group_id: The ID of the Greengrass group.

    Raises:
        capo_greengrass.errors.bad_request_exception.BadRequestException: General error information.
        capo_greengrass.errors.internal_server_error_exception.InternalServerErrorException: General error information.
        capo_greengrass.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_greengrass.types.create_group_certificate_authority_request.CreateGroupCertificateAuthorityRequest]",
    ) -> AsyncOperationResponse[
        "capo_greengrass.types.create_group_certificate_authority_response.CreateGroupCertificateAuthorityResponse"
    ]:
        import capo_greengrass._operations.greengrass.create_group_certificate_authority

        (
            output,
            http_response,
        ) = await capo_greengrass._operations.greengrass.create_group_certificate_authority.async_create_group_certificate_authority(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateGroupCertificateAuthority")
    )
    input_: capo_greengrass.types.create_group_certificate_authority_request.CreateGroupCertificateAuthorityRequest = {
        "group_id": group_id
    }
    if amzn_client_token is not None:
        input_["amzn_client_token"] = amzn_client_token

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