Skip to content

get_group_version

get_group_version(
    group_id: __string,
    group_version_id: __string,
    *,
    config_overrides: Optional[GreengrassClientConfig] = None,
) -> GetGroupVersionResponse

Retrieves information about a group version.

Parameters:

  • group_id (__string) –

    The ID of the Greengrass group.

  • group_version_id (__string) –

    The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.

Raises:

Source code in docs_src/capo_greengrass/_services/greengrass.py
def get_group_version(
    self,
    group_id: "capo_greengrass.types.__string.__string",
    group_version_id: "capo_greengrass.types.__string.__string",
    *,
    config_overrides: Optional[GreengrassClientConfig] = None,
) -> "capo_greengrass.types.get_group_version_response.GetGroupVersionResponse":
    """Retrieves information about a group version.

    Args:
        group_id: The ID of the Greengrass group.
        group_version_id: The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.

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

    def _handler(
        req: "OperationRequest[capo_greengrass.types.get_group_version_request.GetGroupVersionRequest]",
    ) -> OperationResponse[
        "capo_greengrass.types.get_group_version_response.GetGroupVersionResponse"
    ]:
        import capo_greengrass._operations.greengrass.get_group_version

        output, http_response = (
            capo_greengrass._operations.greengrass.get_group_version.get_group_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetGroupVersion")
    )
    input_: capo_greengrass.types.get_group_version_request.GetGroupVersionRequest = {
        "group_id": group_id,
        "group_version_id": group_version_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output