Lists delegation requests based on the specified criteria.
If a delegation request has no owner, even if it is assigned to a specific account, it will not be part of the ListDelegationRequests output for that account.
For more details, see Managing Permissions for Delegation Requests.
Parameters:
-
owner_id
(Optional[ownerIdType], default:
None
)
–
The owner ID to filter delegation requests by.
-
marker
(Optional[markerType], default:
None
)
–
Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.
-
max_items
(Optional[maxItemsType], default:
None
)
–
Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.
If you do not include this parameter, the number of items defaults to 100. Note that IAM may return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.
Raises:
-
InvalidInputException
–
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
NoSuchEntityException
–
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/iam.py
| def list_delegation_requests(
self,
*,
config_overrides: Optional[IAMClientConfig] = None,
owner_id: Optional["capo_iam.types.owner_id_type.ownerIdType"] = None,
marker: Optional["capo_iam.types.marker_type.markerType"] = None,
max_items: Optional["capo_iam.types.max_items_type.maxItemsType"] = None,
) -> "capo_iam.types.list_delegation_requests_response.ListDelegationRequestsResponse":
"""<p>Lists delegation requests based on the specified criteria.</p> <p>If a delegation request has no owner, even if it is assigned to a specific account, it will not be part of the <code>ListDelegationRequests</code> output for that account.</p> <p> For more details, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-temporary-delegation.html#temporary-delegation-managing-permissions"> Managing Permissions for Delegation Requests</a>. </p>
Args:
owner_id: <p>The owner ID to filter delegation requests by.</p>
marker: <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start. </p>
max_items: <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>. </p> <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM may return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from. </p>
Raises:
capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iam.types.list_delegation_requests_request.ListDelegationRequestsRequest]",
) -> OperationResponse[
"capo_iam.types.list_delegation_requests_response.ListDelegationRequestsResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.list_delegation_requests
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.list_delegation_requests.list_delegation_requests(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDelegationRequests")
)
input_: capo_iam.types.list_delegation_requests_request.ListDelegationRequestsRequest = {}
if owner_id is not None:
input_["owner_id"] = owner_id
if marker is not None:
input_["marker"] = marker
if max_items is not None:
input_["max_items"] = max_items
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|