Skip to content

describe_mac_modification_tasks

describe_mac_modification_tasks(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    mac_modification_task_ids: Optional[MacModificationTaskIdList] = None,
    max_results: Optional[DescribeMacModificationTasksMaxResults] = None,
    next_token: Optional[String] = None,
) -> DescribeMacModificationTasksResult

Describes a System Integrity Protection (SIP) modification task or volume ownership delegation task for an Amazon EC2 Mac instance. For more information, see Configure SIP for Amazon EC2 instances in the Amazon EC2 User Guide.

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.

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

    Specifies one or more filters for the request:

    • instance-id - The ID of the instance for which the task was created.

    • task-state - The state of the task (successful | failed | in-progress | pending).

    • mac-system-integrity-protection-configuration.sip-status - The overall SIP state requested in the task (enabled | disabled).

    • start-time - The date and time the task was created.

    • task-type - The type of task (sip-modification | volume-ownership-delegation).

  • mac_modification_task_ids (Optional[MacModificationTaskIdList], default: None ) –

    The ID of task.

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

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

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

    The token to use to retrieve the next page of results.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def describe_mac_modification_tasks(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    mac_modification_task_ids: Optional[
        "capo_ec2.types.mac_modification_task_id_list.MacModificationTaskIdList"
    ] = None,
    max_results: Optional[
        "capo_ec2.types.describe_mac_modification_tasks_max_results.DescribeMacModificationTasksMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.describe_mac_modification_tasks_result.DescribeMacModificationTasksResult":
    """<p>Describes a System Integrity Protection (SIP) modification task or volume ownership delegation task for an Amazon EC2 Mac instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mac-sip-settings.html#mac-sip-configure">Configure SIP for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</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>
        filters: <p>Specifies one or more filters for the request:</p> <ul> <li> <p> <code>instance-id</code> - The ID of the instance for which the task was created.</p> </li> <li> <p> <code>task-state</code> - The state of the task (<code>successful</code> | <code>failed</code> | <code>in-progress</code> | <code>pending</code>).</p> </li> <li> <p> <code>mac-system-integrity-protection-configuration.sip-status</code> - The overall SIP state requested in the task (<code>enabled</code> | <code>disabled</code>).</p> </li> <li> <p> <code>start-time</code> - The date and time the task was created.</p> </li> <li> <p> <code>task-type</code> - The type of task (<code>sip-modification</code> | <code>volume-ownership-delegation</code>).</p> </li> </ul>
        mac_modification_task_ids: <p>The ID of task.</p>
        max_results: <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
        next_token: <p>The token to use to retrieve 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_mac_modification_tasks_request.DescribeMacModificationTasksRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_mac_modification_tasks_result.DescribeMacModificationTasksResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_mac_modification_tasks

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeMacModificationTasks")
    )
    input_: capo_ec2.types.describe_mac_modification_tasks_request.DescribeMacModificationTasksRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if filters is not None:
        input_["filters"] = filters
    if mac_modification_task_ids is not None:
        input_["mac_modification_task_ids"] = mac_modification_task_ids
    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