ListResourceRequests - AWS Cloud Control API

ListResourceRequests

Returns existing resource operation requests. This includes requests of all status types. For more information, see Listing active resource operation requests in the AWS Cloud Control API User Guide.

Note

Resource operation requests expire after 7 days.

Request Syntax

{ "MaxResults": number, "NextToken": "string", "ResourceRequestStatusFilter": { "Operations": [ "string" ], "OperationStatuses": [ "string" ] } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

MaxResults

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

The default is 20.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

NextToken

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [-A-Za-z0-9+/=]+

Required: No

ResourceRequestStatusFilter

The filter criteria to apply to the requests returned.

Type: ResourceRequestStatusFilter object

Required: No

Response Syntax

{ "NextToken": "string", "ResourceRequestStatusSummaries": [ { "ErrorCode": "string", "EventTime": number, "HooksRequestToken": "string", "Identifier": "string", "Operation": "string", "OperationStatus": "string", "RequestToken": "string", "ResourceModel": "string", "RetryAfter": number, "StatusMessage": "string", "TypeName": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListResources again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [-A-Za-z0-9+/=]+

ResourceRequestStatusSummaries

The requests that match the specified filter criteria.

Type: Array of ProgressEvent objects

Errors

For information about the errors that are common to all actions, see Common Errors.

Examples

ListResourceRequests

The following example returns all current resource requests. In this case, this includes a successful create and update of a resource, in addition to a create operation that failed because a resource of the specified name already exists.

Sample Request

https://cloudcontrolapi.us-east-1.amazonaws.com/ ?Action=ListResourceRequests &Version=2021-09-30 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=[Access key ID and scope] &X-Amz-Date=20160316T233349Z &X-Amz-SignedHeaders=content-type;host &X-Amz-Signature=[Signature]

Sample Response

<ListResourceRequestsResponse xmlns="http://cloudcontrol.amazonaws.com/doc/2021-09-30/"> <ListResourceRequestsResult> <RequestStatusSummaries> <member> <Identifier>LogGroupResourceExample2</Identifier> <OperationStatus>SUCCESS</OperationStatus> <TypeName>AWS::Logs::LogGroup</TypeName> <EventTime>2021-07-27T19:23:56.094Z</EventTime> <RequestToken>6233b409-a77d-4125-85ee-fd0123456789</RequestToken> <Operation>UPDATE</Operation> </member> <member> <Identifier>LogGroupResourceExample2</Identifier> <OperationStatus>SUCCESS</OperationStatus> <TypeName>AWS::Logs::LogGroup</TypeName> <EventTime>2021-07-27T18:01:42.788Z</EventTime> <RequestToken>71d8afe7-7e83-4136-92f6-420123456789</RequestToken> <Operation>CREATE</Operation> </member> <member> <Identifier>LogGroupResourceExample</Identifier> <OperationStatus>SUCCESS</OperationStatus> <TypeName>AWS::Logs::LogGroup</TypeName> <EventTime>2021-07-27T18:52:57.406Z</EventTime> <RequestToken>b4a1cc5a-a2ae-4dec-9e1e-150123456789</RequestToken> <Operation>CREATE</Operation> </member> <member> <Identifier>LogGroupResourceExample2</Identifier> <OperationStatus>FAILED</OperationStatus> <TypeName>AWS::Logs::LogGroup</TypeName> <EventTime>2021-07-27T18:07:17.005Z</EventTime> <ErrorCode>AlreadyExists</ErrorCode> <RequestToken>f2fcf5a1-7f17-4c7a-b67f-ab0123456789</RequestToken> <Operation>CREATE</Operation> <StatusMessage>Resource of type 'AWS::Logs::LogGroup' with identifier '{"/properties/LogGroupName":"LogGroupResourceExample2"}' already exists.</StatusMessage> </member> </RequestStatusSummaries> </ListResourceRequestsResult>

Filtering ListResourceRequests

The following example returns only the current resource requests for create and update operations that have failed.

Sample Request

https://cloudcontrolapi.us-east-1.amazonaws.com/ ?Action=ListResourceRequests &RequestStatusFilter.OperationStatuses.member.1=FAILED &RequestStatusFilter.Operations.member.1=CREATE &RequestStatusFilter.Operations.member.2=UPDATE &Version=2021-09-30 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=[Access key ID and scope] &X-Amz-Date=20160316T233349Z &X-Amz-SignedHeaders=content-type;host &X-Amz-Signature=[Signature]

Sample Response

<ListResourceRequestsResponse xmlns="http://cloudcontrol.amazonaws.com/doc/2021-09-30/"> <ListResourceRequestsResult> <RequestStatusSummaries> <member> <Identifier>LogGroupResourceExample</Identifier> <OperationStatus>FAILED</OperationStatus> <EventTime>2021-07-27T18:07:17.005Z</EventTime> <TypeName>AWS::Logs::LogGroup</TypeName> <ErrorCode>AlreadyExists</ErrorCode> <RequestToken>f2fcf5a1-7f17-4c7a-b67f-ab0123456789</RequestToken> <Operation>CREATE</Operation> <StatusMessage>Resource of type 'AWS::Logs::LogGroup' with identifier '{"/properties/LogGroupName":"LogGroupResourceExample"}' already exists.</StatusMessage> </member> </RequestStatusSummaries> </ListResourceRequestsResult> <ResponseMetadata> <RequestId>34748e01-2885-4410-90a6-870123456789</RequestId> </ResponseMetadata> </ListResourceRequestsResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: