Skip to content

describe_instance_connect_endpoints

describe_instance_connect_endpoints(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    max_results: Optional[InstanceConnectEndpointMaxResults] = None,
    next_token: Optional[NextToken] = None,
    filters: Optional[FilterList] = None,
    instance_connect_endpoint_ids: Optional[ValueStringList] = None,
) -> DescribeInstanceConnectEndpointsResult

Describes the specified EC2 Instance Connect Endpoints or all EC2 Instance Connect Endpoints.

Parameters:

  • 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.

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

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

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

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

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

    One or more filters.

    • instance-connect-endpoint-id - The ID of the EC2 Instance Connect Endpoint.

    • state - The state of the EC2 Instance Connect Endpoint (create-in-progress | create-complete | create-failed | delete-in-progress | delete-complete | delete-failed).

    • subnet-id - The ID of the subnet in which the EC2 Instance Connect Endpoint was created.

    • tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    • tag-value - The value of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific value, regardless of tag key.

    • vpc-id - The ID of the VPC in which the EC2 Instance Connect Endpoint was created.

  • instance_connect_endpoint_ids (Optional[ValueStringList], default: None ) –

    One or more EC2 Instance Connect Endpoint IDs.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def describe_instance_connect_endpoints(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    max_results: Optional[
        "capo_ec2.types.instance_connect_endpoint_max_results.InstanceConnectEndpointMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.next_token.NextToken"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    instance_connect_endpoint_ids: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
) -> "capo_ec2.types.describe_instance_connect_endpoints_result.DescribeInstanceConnectEndpointsResult":
    """<p>Describes the specified EC2 Instance Connect Endpoints or all EC2 Instance Connect Endpoints.</p>

    Args:
        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>
        max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
        next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
        filters: <p>One or more filters.</p> <ul> <li> <p> <code>instance-connect-endpoint-id</code> - The ID of the EC2 Instance Connect Endpoint.</p> </li> <li> <p> <code>state</code> - The state of the EC2 Instance Connect Endpoint (<code>create-in-progress</code> | <code>create-complete</code> | <code>create-failed</code> | <code>delete-in-progress</code> | <code>delete-complete</code> | <code>delete-failed</code>).</p> </li> <li> <p> <code>subnet-id</code> - The ID of the subnet in which the EC2 Instance Connect Endpoint was created.</p> </li> <li> <p> <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific value, regardless of tag key.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC in which the EC2 Instance Connect Endpoint was created.</p> </li> </ul>
        instance_connect_endpoint_ids: <p>One or more EC2 Instance Connect Endpoint IDs.</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_instance_connect_endpoints_request.DescribeInstanceConnectEndpointsRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_instance_connect_endpoints_result.DescribeInstanceConnectEndpointsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_instance_connect_endpoints

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeInstanceConnectEndpoints")
    )
    input_: capo_ec2.types.describe_instance_connect_endpoints_request.DescribeInstanceConnectEndpointsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if filters is not None:
        input_["filters"] = filters
    if instance_connect_endpoint_ids is not None:
        input_["instance_connect_endpoint_ids"] = instance_connect_endpoint_ids

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