Skip to content

describe_container_group_definition async

describe_container_group_definition(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    name: Optional[ContainerGroupDefinitionNameOrArn] = None,
    version_number: Optional[PositiveInteger] = None,
) -> DescribeContainerGroupDefinitionOutput

This API works with the following fleet types: Container

Retrieves the properties of a container group definition, including all container definitions in the group.

Request options:

  • Retrieve the latest version of a container group definition. Specify the container group definition name only, or use an ARN value without a version number.

  • Retrieve a particular version. Specify the container group definition name and a version number, or use an ARN value that includes the version number.

Results:

If successful, this operation returns the complete properties of a container group definition version.

Learn more

Parameters:

Raises:

  • InternalServiceException –

    The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

  • InvalidRequestException –

    One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

  • NotFoundException –

    The requested resource was not found. The resource was either not created yet or deleted.

  • UnauthorizedException –

    The client failed authentication. Clients should not retry such requests.

  • UnsupportedRegionException –

    The requested operation is not supported in the Region specified.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def describe_container_group_definition(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    name: Optional[
        "capo_gamelift.types.container_group_definition_name_or_arn.ContainerGroupDefinitionNameOrArn"
    ] = None,
    version_number: Optional[
        "capo_gamelift.types.positive_integer.PositiveInteger"
    ] = None,
) -> "capo_gamelift.types.describe_container_group_definition_output.DescribeContainerGroupDefinitionOutput":
    """<p> <b>This API works with the following fleet types:</b> Container</p> <p>Retrieves the properties of a container group definition, including all container definitions in the group. </p> <p> <b>Request options:</b> </p> <ul> <li> <p>Retrieve the latest version of a container group definition. Specify the container group definition name only, or use an ARN value without a version number.</p> </li> <li> <p>Retrieve a particular version. Specify the container group definition name and a version number, or use an ARN value that includes the version number.</p> </li> </ul> <p> <b>Results:</b> </p> <p>If successful, this operation returns the complete properties of a container group definition version.</p> <p> <b>Learn more</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-create-groups.html">Manage a container group definition</a> </p> </li> </ul>

    Args:
        name: <p>The unique identifier for the container group definition to retrieve properties for. You can use either the <code>Name</code> or <code>ARN</code> value.</p>
        version_number: <p>The specific version to retrieve.</p>

    Raises:
        capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
        capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
        capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
        capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
        capo_gamelift.errors.unsupported_region_exception.UnsupportedRegionException: <p>The requested operation is not supported in the Region specified.</p>
        capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.describe_container_group_definition_input.DescribeContainerGroupDefinitionInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.describe_container_group_definition_output.DescribeContainerGroupDefinitionOutput"
    ]:
        import capo_gamelift._operations.game_lift.describe_container_group_definition

        (
            output,
            http_response,
        ) = await capo_gamelift._operations.game_lift.describe_container_group_definition.async_describe_container_group_definition(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_gamelift.types.describe_container_group_definition_output.DescribeContainerGroupDefinitionOutput",
    ) -> dict[str, Any]:
        import capo_gamelift.types.describe_container_group_definition_output

        return capo_gamelift.types.describe_container_group_definition_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeContainerGroupDefinition", redact_output=_redact_output
        ),
    )
    input_: capo_gamelift.types.describe_container_group_definition_input.DescribeContainerGroupDefinitionInput = {}
    if name is not None:
        input_["name"] = name
    if version_number is not None:
        input_["version_number"] = version_number

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