Skip to content

describe_instance_properties

describe_instance_properties(
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    instance_property_filter_list: Optional[InstancePropertyFilterList] = None,
    filters_with_operator: Optional[InstancePropertyStringFilterList] = None,
    max_results: Optional[DescribeInstancePropertiesMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeInstancePropertiesResult

An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.

Parameters:

Raises:

  • InternalServerError –

    An error occurred on the server side.

  • InvalidActivationId –

    The activation ID isn't valid. Verify that you entered the correct ActivationId or ActivationCode and try again.

  • InvalidDocument –

    The specified SSM document doesn't exist.

  • InvalidFilterKey –

    The specified key isn't valid.

  • InvalidInstanceId –

    The following problems can cause this exception:

    • You don't have permission to access the managed node.

    • Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.

    • SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.

    • The managed node isn't in a valid state. Valid states are: Running, Pending, Stopped, and Stopping. Invalid states are: Shutting-down and Terminated.

  • InvalidInstancePropertyFilterValue –

    The specified filter value isn't valid.

  • InvalidNextToken –

    The specified token isn't valid.

  • UnknownServiceError –

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

Source code in docs_src/capo_ssm/_services/ssm.py
def describe_instance_properties(
    self,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    instance_property_filter_list: Optional[
        "capo_ssm.types.instance_property_filter_list.InstancePropertyFilterList"
    ] = None,
    filters_with_operator: Optional[
        "capo_ssm.types.instance_property_string_filter_list.InstancePropertyStringFilterList"
    ] = None,
    max_results: Optional[
        "capo_ssm.types.describe_instance_properties_max_results.DescribeInstancePropertiesMaxResults"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.describe_instance_properties_result.DescribeInstancePropertiesResult":
    """<p>An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.</p>

    Args:
        instance_property_filter_list: <p>An array of instance property filters.</p>
        filters_with_operator: <p>The request filters to use with the operator.</p>
        max_results: <p>The maximum number of items to return for the call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
        next_token: <p>The token provided by a previous request to use to return the next set of properties.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_activation_id.InvalidActivationId: <p>The activation ID isn't valid. Verify that you entered the correct ActivationId or ActivationCode and try again.</p>
        capo_ssm.errors.invalid_document.InvalidDocument: <p>The specified SSM document doesn't exist.</p>
        capo_ssm.errors.invalid_filter_key.InvalidFilterKey: <p>The specified key isn't valid.</p>
        capo_ssm.errors.invalid_instance_id.InvalidInstanceId: <p>The following problems can cause this exception:</p> <ul> <li> <p>You don't have permission to access the managed node.</p> </li> <li> <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.</p> </li> <li> <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p> </li> <li> <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>, <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are: <code>Shutting-down</code> and <code>Terminated</code>.</p> </li> </ul>
        capo_ssm.errors.invalid_instance_property_filter_value.InvalidInstancePropertyFilterValue: <p>The specified filter value isn't valid.</p>
        capo_ssm.errors.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.describe_instance_properties_request.DescribeInstancePropertiesRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.describe_instance_properties_result.DescribeInstancePropertiesResult"
    ]:
        import capo_ssm._operations.amazon_ssm.describe_instance_properties

        output, http_response = (
            capo_ssm._operations.amazon_ssm.describe_instance_properties.describe_instance_properties(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ssm.types.describe_instance_properties_result.DescribeInstancePropertiesResult",
    ) -> dict[str, Any]:
        import capo_ssm.types.describe_instance_properties_result

        return capo_ssm.types.describe_instance_properties_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeInstanceProperties", redact_output=_redact_output
        ),
    )
    input_: capo_ssm.types.describe_instance_properties_request.DescribeInstancePropertiesRequest = {}
    if instance_property_filter_list is not None:
        input_["instance_property_filter_list"] = instance_property_filter_list
    if filters_with_operator is not None:
        input_["filters_with_operator"] = filters_with_operator
    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