Skip to content

report_instance_status

report_instance_status(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    instances: Optional[InstanceIdStringList] = None,
    status: Optional[ReportStatusType] = None,
    start_time: Optional[DateTime] = None,
    end_time: Optional[DateTime] = None,
    reason_codes: Optional[ReasonCodesList] = None,
    description: Optional[ReportInstanceStatusRequestDescription] = None,
) -> None

Submits feedback about the status of an instance. The instance must be in the running state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus, use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

Use of this action does not change the value returned by DescribeInstanceStatus.

Parameters:

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

    Checks whether you have the required permissions for the operation, 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.

  • instances (Optional[InstanceIdStringList], default: None ) –

    The instances.

  • status (Optional[ReportStatusType], default: None ) –

    The status of all instances listed.

  • start_time (Optional[DateTime], default: None ) –

    The time at which the reported instance health state began.

  • end_time (Optional[DateTime], default: None ) –

    The time at which the reported instance health state ended.

  • reason_codes (Optional[ReasonCodesList], default: None ) –

    The reason codes that describe the health state of your instance.

    • instance-stuck-in-state: My instance is stuck in a state.

    • unresponsive: My instance is unresponsive.

    • not-accepting-credentials: My instance is not accepting my credentials.

    • password-not-available: A password is not available for my instance.

    • performance-network: My instance is experiencing performance problems that I believe are network related.

    • performance-instance-store: My instance is experiencing performance problems that I believe are related to the instance stores.

    • performance-ebs-volume: My instance is experiencing performance problems that I believe are related to an EBS volume.

    • performance-other: My instance is experiencing performance problems.

    • other: [explain using the description parameter]

  • description (Optional[ReportInstanceStatusRequestDescription], default: None ) –

    Descriptive text about the health state of your instance.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def report_instance_status(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    instances: Optional[
        "capo_ec2.types.instance_id_string_list.InstanceIdStringList"
    ] = None,
    status: Optional["capo_ec2.types.report_status_type.ReportStatusType"] = None,
    start_time: Optional["capo_ec2.types.date_time.DateTime"] = None,
    end_time: Optional["capo_ec2.types.date_time.DateTime"] = None,
    reason_codes: Optional[
        "capo_ec2.types.reason_codes_list.ReasonCodesList"
    ] = None,
    description: Optional[
        "capo_ec2.types.report_instance_status_request_description.ReportInstanceStatusRequestDescription"
    ] = None,
) -> None:
    """<p>Submits feedback about the status of an instance. The instance must be in the <code>running</code> state. If your experience with the instance differs from the instance status returned by <a>DescribeInstanceStatus</a>, use <a>ReportInstanceStatus</a> to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.</p> <p>Use of this action does not change the value returned by <a>DescribeInstanceStatus</a>.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the operation, 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>
        instances: <p>The instances.</p>
        status: <p>The status of all instances listed.</p>
        start_time: <p>The time at which the reported instance health state began.</p>
        end_time: <p>The time at which the reported instance health state ended.</p>
        reason_codes: <p>The reason codes that describe the health state of your instance.</p> <ul> <li> <p> <code>instance-stuck-in-state</code>: My instance is stuck in a state.</p> </li> <li> <p> <code>unresponsive</code>: My instance is unresponsive.</p> </li> <li> <p> <code>not-accepting-credentials</code>: My instance is not accepting my credentials.</p> </li> <li> <p> <code>password-not-available</code>: A password is not available for my instance.</p> </li> <li> <p> <code>performance-network</code>: My instance is experiencing performance problems that I believe are network related.</p> </li> <li> <p> <code>performance-instance-store</code>: My instance is experiencing performance problems that I believe are related to the instance stores.</p> </li> <li> <p> <code>performance-ebs-volume</code>: My instance is experiencing performance problems that I believe are related to an EBS volume.</p> </li> <li> <p> <code>performance-other</code>: My instance is experiencing performance problems.</p> </li> <li> <p> <code>other</code>: [explain using the description parameter]</p> </li> </ul>
        description: <p>Descriptive text about the health state of your instance.</p>

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

    def _handler(
        req: "OperationRequest[capo_ec2.types.report_instance_status_request.ReportInstanceStatusRequest]",
    ) -> OperationResponse[None]:
        import capo_ec2._operations.amazon_ec2.report_instance_status

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

    def _redact_input(
        input_: "capo_ec2.types.report_instance_status_request.ReportInstanceStatusRequest",
    ) -> dict[str, Any]:
        import capo_ec2.types.report_instance_status_request

        return capo_ec2.types.report_instance_status_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ReportInstanceStatus", redact_input=_redact_input),
    )
    input_: capo_ec2.types.report_instance_status_request.ReportInstanceStatusRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if instances is not None:
        input_["instances"] = instances
    if status is not None:
        input_["status"] = status
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if reason_codes is not None:
        input_["reason_codes"] = reason_codes
    if description is not None:
        input_["description"] = description

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