Skip to content

list_entity_coverages

list_entity_coverages(
    entity_arn: Arn,
    *,
    config_overrides: Optional[NetworkSecurityManagerClientConfig] = None,
    resource_owner_account_id: Optional[AccountId] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListEntityCoveragesOutput

Lists the protected resources that the specified Network Security Manager entity covers. You can filter the results to the resources owned by a single account and page through them. You must call this operation from the administrator account that owns the Network Security Manager entity.

Parameters:

  • entity_arn (Arn) –

    The Amazon Resource Name (ARN) of the Network Security Manager entity to list covered resources for. The ARN must not include a :DRAFT qualifier.

  • resource_owner_account_id (Optional[AccountId], default: None ) –

    Filters the results to the protected resources owned by the specified AWS account.

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

    The maximum number of results to return in a single call. Valid range: 1–100. The default value is 100. To retrieve the remaining results, use the returned nextToken value in a subsequent call.

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

    The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.

Raises:

  • AccessDeniedException –

    You do not have sufficient permissions to perform this action.

  • InternalServerException –

    The request processing failed because of an internal error in the service. This is a retryable error.

  • ThrottlingException –

    The request was denied because of request throttling. Reduce your request rate and try again.

  • ValidationException –

    The request failed validation. For details, see the reason and fieldList members of the response.

  • UnknownServiceError –

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

Source code in docs_src/capo_network_security_manager/_services/network_security_manager.py
def list_entity_coverages(
    self,
    entity_arn: "capo_network_security_manager.types.arn.Arn",
    *,
    config_overrides: Optional[NetworkSecurityManagerClientConfig] = None,
    resource_owner_account_id: Optional[
        "capo_network_security_manager.types.account_id.AccountId"
    ] = None,
    max_results: Optional[
        "capo_network_security_manager.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_network_security_manager.types.next_token.NextToken"
    ] = None,
) -> "capo_network_security_manager.types.list_entity_coverages_output.ListEntityCoveragesOutput":
    """<p>Lists the protected resources that the specified Network Security Manager entity covers. You can filter the results to the resources owned by a single account and page through them. You must call this operation from the administrator account that owns the Network Security Manager entity.</p>

    Args:
        entity_arn: <p>The Amazon Resource Name (ARN) of the Network Security Manager entity to list covered resources for. The ARN must not include a <code>:DRAFT</code> qualifier.</p>
        resource_owner_account_id: <p>Filters the results to the protected resources owned by the specified AWS account.</p>
        max_results: <p>The maximum number of results to return in a single call. Valid range: 1–100. The default value is 100. To retrieve the remaining results, use the returned <code>nextToken</code> value in a subsequent call.</p>
        next_token: <p>The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.</p>

    Raises:
        capo_network_security_manager.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_network_security_manager.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an internal error in the service. This is a retryable error.</p>
        capo_network_security_manager.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling. Reduce your request rate and try again.</p>
        capo_network_security_manager.errors.validation_exception.ValidationException: <p>The request failed validation. For details, see the <code>reason</code> and <code>fieldList</code> members of the response.</p>
        capo_network_security_manager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_network_security_manager.types.list_entity_coverages_input.ListEntityCoveragesInput]",
    ) -> OperationResponse[
        "capo_network_security_manager.types.list_entity_coverages_output.ListEntityCoveragesOutput"
    ]:
        import capo_network_security_manager._operations.piccolo_customer_api_service.list_entity_coverages

        output, http_response = (
            capo_network_security_manager._operations.piccolo_customer_api_service.list_entity_coverages.list_entity_coverages(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEntityCoverages")
    )
    input_: capo_network_security_manager.types.list_entity_coverages_input.ListEntityCoveragesInput = {
        "entity_arn": entity_arn
    }
    if resource_owner_account_id is not None:
        input_["resource_owner_account_id"] = resource_owner_account_id
    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