Skip to content

describe_elastic_gpus

describe_elastic_gpus(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    elastic_gpu_ids: Optional[ElasticGpuIdSet] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[DescribeElasticGpusMaxResults] = None,
    next_token: Optional[String] = None,
) -> DescribeElasticGpusResult

Amazon Elastic Graphics reached end of life on January 8, 2024.

Describes the Elastic Graphics accelerator associated with your instances.

Parameters:

  • elastic_gpu_ids (Optional[ElasticGpuIdSet], default: None ) –

    The Elastic Graphics accelerator IDs.

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • filters (Optional[FilterList], default: None ) –

    The filters.

    • availability-zone - The Availability Zone in which the Elastic Graphics accelerator resides.

    • elastic-gpu-health - The status of the Elastic Graphics accelerator (OK | IMPAIRED).

    • elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED).

    • elastic-gpu-type - The type of Elastic Graphics accelerator; for example, eg1.medium.

    • instance-id - The ID of the instance to which the Elastic Graphics accelerator is associated.

  • max_results (Optional[DescribeElasticGpusMaxResults], default: None ) –

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000.

  • next_token (Optional[String], default: None ) –

    The token to request the next page of results.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def describe_elastic_gpus(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    elastic_gpu_ids: Optional[
        "capo_ec2.types.elastic_gpu_id_set.ElasticGpuIdSet"
    ] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_elastic_gpus_max_results.DescribeElasticGpusMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.describe_elastic_gpus_result.DescribeElasticGpusResult":
    """<note> <p>Amazon Elastic Graphics reached end of life on January 8, 2024.</p> </note> <p>Describes the Elastic Graphics accelerator associated with your instances.</p>

    Args:
        elastic_gpu_ids: <p>The Elastic Graphics accelerator IDs.</p>
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        filters: <p>The filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone in which the Elastic Graphics accelerator resides.</p> </li> <li> <p> <code>elastic-gpu-health</code> - The status of the Elastic Graphics accelerator (<code>OK</code> | <code>IMPAIRED</code>).</p> </li> <li> <p> <code>elastic-gpu-state</code> - The state of the Elastic Graphics accelerator (<code>ATTACHED</code>).</p> </li> <li> <p> <code>elastic-gpu-type</code> - The type of Elastic Graphics accelerator; for example, <code>eg1.medium</code>.</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance to which the Elastic Graphics accelerator is associated.</p> </li> </ul>
        max_results: <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. This value can be between 5 and 1000.</p>
        next_token: <p>The token to request the next page of results.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.describe_elastic_gpus_request.DescribeElasticGpusRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_elastic_gpus_result.DescribeElasticGpusResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_elastic_gpus

        output, http_response = (
            capo_ec2._operations.amazon_ec2.describe_elastic_gpus.describe_elastic_gpus(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeElasticGpus")
    )
    input_: capo_ec2.types.describe_elastic_gpus_request.DescribeElasticGpusRequest = {}
    if elastic_gpu_ids is not None:
        input_["elastic_gpu_ids"] = elastic_gpu_ids
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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