SDK for PHP 3.x

Client: Aws\CloudControlApi\CloudControlApiClient
Service ID: cloudcontrol
Version: 2021-09-30

This page describes the parameters and results for the operations of the AWS Cloud Control API (2021-09-30), and shows how to use the Aws\CloudControlApi\CloudControlApiClient object to call the described operations. This documentation is specific to the 2021-09-30 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CancelResourceRequest ( array $params = [] )
Cancels the specified resource operation request.
CreateResource ( array $params = [] )
Creates the specified resource.
DeleteResource ( array $params = [] )
Deletes the specified resource.
GetResource ( array $params = [] )
Returns information about the current state of the specified resource.
GetResourceRequestStatus ( array $params = [] )
Returns the current status of a resource operation request.
ListResourceRequests ( array $params = [] )
Returns existing resource operation requests.
ListResources ( array $params = [] )
Returns information about the specified resources.
UpdateResource ( array $params = [] )
Updates the specified property values in the resource.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListResourceRequests
ListResources

Waiters

Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:

Waiter name API Operation Delay Max Attempts
ResourceRequestSuccess GetResourceRequestStatus 5 24

Operations

CancelResourceRequest

$result = $client->cancelResourceRequest([/* ... */]);
$promise = $client->cancelResourceRequestAsync([/* ... */]);

Cancels the specified resource operation request. For more information, see Canceling resource operation requests in the Amazon Web Services Cloud Control API User Guide.

Only resource operations requests with a status of PENDING or IN_PROGRESS can be canceled.

Parameter Syntax

$result = $client->cancelResourceRequest([
    'RequestToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
RequestToken
Required: Yes
Type: string

The RequestToken of the ProgressEvent object returned by the resource operation request.

Result Syntax

[
    'ProgressEvent' => [
        'ErrorCode' => 'NotUpdatable|InvalidRequest|AccessDenied|InvalidCredentials|AlreadyExists|NotFound|ResourceConflict|Throttling|ServiceLimitExceeded|NotStabilized|GeneralServiceException|ServiceInternalError|ServiceTimeout|NetworkFailure|InternalFailure',
        'EventTime' => <DateTime>,
        'Identifier' => '<string>',
        'Operation' => 'CREATE|DELETE|UPDATE',
        'OperationStatus' => 'PENDING|IN_PROGRESS|SUCCESS|FAILED|CANCEL_IN_PROGRESS|CANCEL_COMPLETE',
        'RequestToken' => '<string>',
        'ResourceModel' => '<string>',
        'RetryAfter' => <DateTime>,
        'StatusMessage' => '<string>',
        'TypeName' => '<string>',
    ],
]

Result Details

Members
ProgressEvent
Type: ProgressEvent structure

Represents the current status of a resource operation request. For more information, see Managing resource operation requests in the Amazon Web Services Cloud Control API User Guide.

Errors

ConcurrentModificationException:

The resource is currently being modified by another operation.

RequestTokenNotFoundException:

A resource operation with the specified request token can't be found.

CreateResource

$result = $client->createResource([/* ... */]);
$promise = $client->createResourceAsync([/* ... */]);

Creates the specified resource. For more information, see Creating a resource in the Amazon Web Services Cloud Control API User Guide.

After you have initiated a resource creation request, you can monitor the progress of your request by calling GetResourceRequestStatus using the RequestToken of the ProgressEvent type returned by CreateResource.

Parameter Syntax

$result = $client->createResource([
    'ClientToken' => '<string>',
    'DesiredState' => '<string>', // REQUIRED
    'RoleArn' => '<string>',
    'TypeName' => '<string>', // REQUIRED
    'TypeVersionId' => '<string>',
]);

Parameter Details

Members
ClientToken
Type: string

A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

If you do not specify a client token, one is generated for inclusion in the request.

For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

DesiredState
Required: Yes
Type: string

Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.

Cloud Control API currently supports JSON as a structured data format.

Specify the desired state as one of the following:

  • A JSON blob

  • A local path containing the desired state in JSON data format

For more information, see Composing the desired state of the resource in the Amazon Web Services Cloud Control API User Guide.

For more information about the properties of a specific resource, refer to the related topic for the resource in the Resource and property types reference in the CloudFormation Users Guide.

RoleArn
Type: string

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the handlers section of the resource type definition schema.

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

TypeName
Required: Yes
Type: string

The name of the resource type.

TypeVersionId
Type: string

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

Result Syntax

[
    'ProgressEvent' => [
        'ErrorCode' => 'NotUpdatable|InvalidRequest|AccessDenied|InvalidCredentials|AlreadyExists|NotFound|ResourceConflict|Throttling|ServiceLimitExceeded|NotStabilized|GeneralServiceException|ServiceInternalError|ServiceTimeout|NetworkFailure|InternalFailure',
        'EventTime' => <DateTime>,
        'Identifier' => '<string>',
        'Operation' => 'CREATE|DELETE|UPDATE',
        'OperationStatus' => 'PENDING|IN_PROGRESS|SUCCESS|FAILED|CANCEL_IN_PROGRESS|CANCEL_COMPLETE',
        'RequestToken' => '<string>',
        'ResourceModel' => '<string>',
        'RetryAfter' => <DateTime>,
        'StatusMessage' => '<string>',
        'TypeName' => '<string>',
    ],
]

Result Details

Members
ProgressEvent
Type: ProgressEvent structure

Represents the current status of the resource creation request.

After you have initiated a resource creation request, you can monitor the progress of your request by calling GetResourceRequestStatus using the RequestToken of the ProgressEvent returned by CreateResource.

Errors

AlreadyExistsException:

The resource with the name requested already exists.

HandlerInternalFailureException:

The resource handler has returned that an unexpected error occurred within the resource handler.

GeneralServiceException:

The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.

NotUpdatableException:

One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.

TypeNotFoundException:

The specified extension doesn't exist in the CloudFormation registry.

ConcurrentOperationException:

Another resource operation is currently being performed on this resource.

InvalidRequestException:

The resource handler has returned that invalid input from the user has generated a generic exception.

PrivateTypeException:

Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.

ResourceNotFoundException:

A resource with the specified identifier can't be found.

NetworkFailureException:

The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.

UnsupportedActionException:

The specified resource doesn't support this resource operation.

NotStabilizedException:

The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.

ServiceInternalErrorException:

The resource handler has returned that the downstream service returned an internal error, typically with a 5XX HTTP status code.

HandlerFailureException:

The resource handler has failed without a returning a more specific error code. This can include timeouts.

ServiceLimitExceededException:

The resource handler has returned that a non-transient resource limit was reached on the service side.

InvalidCredentialsException:

The resource handler has returned that the credentials provided by the user are invalid.

ResourceConflictException:

The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.

ClientTokenConflictException:

The specified client token has already been used in another resource request.

It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.

ThrottlingException:

The request was denied due to request throttling.

DeleteResource

$result = $client->deleteResource([/* ... */]);
$promise = $client->deleteResourceAsync([/* ... */]);

Deletes the specified resource. For details, see Deleting a resource in the Amazon Web Services Cloud Control API User Guide.

After you have initiated a resource deletion request, you can monitor the progress of your request by calling GetResourceRequestStatus using the RequestToken of the ProgressEvent returned by DeleteResource.

Parameter Syntax

$result = $client->deleteResource([
    'ClientToken' => '<string>',
    'Identifier' => '<string>', // REQUIRED
    'RoleArn' => '<string>',
    'TypeName' => '<string>', // REQUIRED
    'TypeVersionId' => '<string>',
]);

Parameter Details

Members
ClientToken
Type: string

A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

If you do not specify a client token, one is generated for inclusion in the request.

For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

Identifier
Required: Yes
Type: string

The identifier for the resource.

You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

RoleArn
Type: string

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the handlers section of the resource type definition schema.

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

TypeName
Required: Yes
Type: string

The name of the resource type.

TypeVersionId
Type: string

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

Result Syntax

[
    'ProgressEvent' => [
        'ErrorCode' => 'NotUpdatable|InvalidRequest|AccessDenied|InvalidCredentials|AlreadyExists|NotFound|ResourceConflict|Throttling|ServiceLimitExceeded|NotStabilized|GeneralServiceException|ServiceInternalError|ServiceTimeout|NetworkFailure|InternalFailure',
        'EventTime' => <DateTime>,
        'Identifier' => '<string>',
        'Operation' => 'CREATE|DELETE|UPDATE',
        'OperationStatus' => 'PENDING|IN_PROGRESS|SUCCESS|FAILED|CANCEL_IN_PROGRESS|CANCEL_COMPLETE',
        'RequestToken' => '<string>',
        'ResourceModel' => '<string>',
        'RetryAfter' => <DateTime>,
        'StatusMessage' => '<string>',
        'TypeName' => '<string>',
    ],
]

Result Details

Members
ProgressEvent
Type: ProgressEvent structure

Represents the current status of the resource deletion request.

After you have initiated a resource deletion request, you can monitor the progress of your request by calling GetResourceRequestStatus using the RequestToken of the ProgressEvent returned by DeleteResource.

Errors

AlreadyExistsException:

The resource with the name requested already exists.

HandlerInternalFailureException:

The resource handler has returned that an unexpected error occurred within the resource handler.

GeneralServiceException:

The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.

NotUpdatableException:

One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.

TypeNotFoundException:

The specified extension doesn't exist in the CloudFormation registry.

ConcurrentOperationException:

Another resource operation is currently being performed on this resource.

InvalidRequestException:

The resource handler has returned that invalid input from the user has generated a generic exception.

PrivateTypeException:

Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.

ResourceNotFoundException:

A resource with the specified identifier can't be found.

NetworkFailureException:

The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.

UnsupportedActionException:

The specified resource doesn't support this resource operation.

NotStabilizedException:

The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.

ServiceInternalErrorException:

The resource handler has returned that the downstream service returned an internal error, typically with a 5XX HTTP status code.

HandlerFailureException:

The resource handler has failed without a returning a more specific error code. This can include timeouts.

ServiceLimitExceededException:

The resource handler has returned that a non-transient resource limit was reached on the service side.

InvalidCredentialsException:

The resource handler has returned that the credentials provided by the user are invalid.

ResourceConflictException:

The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.

ClientTokenConflictException:

The specified client token has already been used in another resource request.

It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.

ThrottlingException:

The request was denied due to request throttling.

GetResource

$result = $client->getResource([/* ... */]);
$promise = $client->getResourceAsync([/* ... */]);

Returns information about the current state of the specified resource. For details, see Reading a resource's current state.

You can use this action to return information about an existing resource in your account and Amazon Web Services Region, whether those resources were provisioned using Cloud Control API.

Parameter Syntax

$result = $client->getResource([
    'Identifier' => '<string>', // REQUIRED
    'RoleArn' => '<string>',
    'TypeName' => '<string>', // REQUIRED
    'TypeVersionId' => '<string>',
]);

Parameter Details

Members
Identifier
Required: Yes
Type: string

The identifier for the resource.

You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

RoleArn
Type: string

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the handlers section of the resource type definition schema.

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

TypeName
Required: Yes
Type: string

The name of the resource type.

TypeVersionId
Type: string

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

Result Syntax

[
    'ResourceDescription' => [
        'Identifier' => '<string>',
        'Properties' => '<string>',
    ],
    'TypeName' => '<string>',
]

Result Details

Members
ResourceDescription
Type: ResourceDescription structure

Represents information about a provisioned resource.

TypeName
Type: string

The name of the resource type.

Errors

AlreadyExistsException:

The resource with the name requested already exists.

HandlerInternalFailureException:

The resource handler has returned that an unexpected error occurred within the resource handler.

GeneralServiceException:

The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.

NotUpdatableException:

One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.

TypeNotFoundException:

The specified extension doesn't exist in the CloudFormation registry.

InvalidRequestException:

The resource handler has returned that invalid input from the user has generated a generic exception.

PrivateTypeException:

Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.

ResourceNotFoundException:

A resource with the specified identifier can't be found.

NetworkFailureException:

The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.

UnsupportedActionException:

The specified resource doesn't support this resource operation.

NotStabilizedException:

The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.

ServiceInternalErrorException:

The resource handler has returned that the downstream service returned an internal error, typically with a 5XX HTTP status code.

HandlerFailureException:

The resource handler has failed without a returning a more specific error code. This can include timeouts.

ServiceLimitExceededException:

The resource handler has returned that a non-transient resource limit was reached on the service side.

InvalidCredentialsException:

The resource handler has returned that the credentials provided by the user are invalid.

ResourceConflictException:

The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.

ThrottlingException:

The request was denied due to request throttling.

GetResourceRequestStatus

$result = $client->getResourceRequestStatus([/* ... */]);
$promise = $client->getResourceRequestStatusAsync([/* ... */]);

Returns the current status of a resource operation request. For more information, see Tracking the progress of resource operation requests in the Amazon Web Services Cloud Control API User Guide.

Parameter Syntax

$result = $client->getResourceRequestStatus([
    'RequestToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
RequestToken
Required: Yes
Type: string

A unique token used to track the progress of the resource operation request.

Request tokens are included in the ProgressEvent type returned by a resource operation request.

Result Syntax

[
    'ProgressEvent' => [
        'ErrorCode' => 'NotUpdatable|InvalidRequest|AccessDenied|InvalidCredentials|AlreadyExists|NotFound|ResourceConflict|Throttling|ServiceLimitExceeded|NotStabilized|GeneralServiceException|ServiceInternalError|ServiceTimeout|NetworkFailure|InternalFailure',
        'EventTime' => <DateTime>,
        'Identifier' => '<string>',
        'Operation' => 'CREATE|DELETE|UPDATE',
        'OperationStatus' => 'PENDING|IN_PROGRESS|SUCCESS|FAILED|CANCEL_IN_PROGRESS|CANCEL_COMPLETE',
        'RequestToken' => '<string>',
        'ResourceModel' => '<string>',
        'RetryAfter' => <DateTime>,
        'StatusMessage' => '<string>',
        'TypeName' => '<string>',
    ],
]

Result Details

Members
ProgressEvent
Type: ProgressEvent structure

Represents the current status of the resource operation request.

Errors

RequestTokenNotFoundException:

A resource operation with the specified request token can't be found.

ListResourceRequests

$result = $client->listResourceRequests([/* ... */]);
$promise = $client->listResourceRequestsAsync([/* ... */]);

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

Resource operation requests expire after 7 days.

Parameter Syntax

$result = $client->listResourceRequests([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ResourceRequestStatusFilter' => [
        'OperationStatuses' => ['<string>', ...],
        'Operations' => ['<string>', ...],
    ],
]);

Parameter Details

Members
MaxResults
Type: int

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.

NextToken
Type: string

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.

ResourceRequestStatusFilter
Type: ResourceRequestStatusFilter structure

The filter criteria to apply to the requests returned.

Result Syntax

[
    'NextToken' => '<string>',
    'ResourceRequestStatusSummaries' => [
        [
            'ErrorCode' => 'NotUpdatable|InvalidRequest|AccessDenied|InvalidCredentials|AlreadyExists|NotFound|ResourceConflict|Throttling|ServiceLimitExceeded|NotStabilized|GeneralServiceException|ServiceInternalError|ServiceTimeout|NetworkFailure|InternalFailure',
            'EventTime' => <DateTime>,
            'Identifier' => '<string>',
            'Operation' => 'CREATE|DELETE|UPDATE',
            'OperationStatus' => 'PENDING|IN_PROGRESS|SUCCESS|FAILED|CANCEL_IN_PROGRESS|CANCEL_COMPLETE',
            'RequestToken' => '<string>',
            'ResourceModel' => '<string>',
            'RetryAfter' => <DateTime>,
            'StatusMessage' => '<string>',
            'TypeName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: string

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.

ResourceRequestStatusSummaries
Type: Array of ProgressEvent structures

The requests that match the specified filter criteria.

Errors

There are no errors described for this operation.

ListResources

$result = $client->listResources([/* ... */]);
$promise = $client->listResourcesAsync([/* ... */]);

Returns information about the specified resources. For more information, see Discovering resources in the Amazon Web Services Cloud Control API User Guide.

You can use this action to return information about existing resources in your account and Amazon Web Services Region, whether those resources were provisioned using Cloud Control API.

Parameter Syntax

$result = $client->listResources([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ResourceModel' => '<string>',
    'RoleArn' => '<string>',
    'TypeName' => '<string>', // REQUIRED
    'TypeVersionId' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

Reserved.

NextToken
Type: string

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.

ResourceModel
Type: string

The resource model to use to select the resources to return.

RoleArn
Type: string

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the handlers section of the resource type definition schema.

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

TypeName
Required: Yes
Type: string

The name of the resource type.

TypeVersionId
Type: string

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

Result Syntax

[
    'NextToken' => '<string>',
    'ResourceDescriptions' => [
        [
            'Identifier' => '<string>',
            'Properties' => '<string>',
        ],
        // ...
    ],
    'TypeName' => '<string>',
]

Result Details

Members
NextToken
Type: string

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.

ResourceDescriptions
Type: Array of ResourceDescription structures

Information about the specified resources, including primary identifier and resource model.

TypeName
Type: string

The name of the resource type.

Errors

AlreadyExistsException:

The resource with the name requested already exists.

HandlerInternalFailureException:

The resource handler has returned that an unexpected error occurred within the resource handler.

GeneralServiceException:

The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.

NotUpdatableException:

One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.

TypeNotFoundException:

The specified extension doesn't exist in the CloudFormation registry.

InvalidRequestException:

The resource handler has returned that invalid input from the user has generated a generic exception.

PrivateTypeException:

Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.

ResourceNotFoundException:

A resource with the specified identifier can't be found.

NetworkFailureException:

The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.

UnsupportedActionException:

The specified resource doesn't support this resource operation.

NotStabilizedException:

The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.

ServiceInternalErrorException:

The resource handler has returned that the downstream service returned an internal error, typically with a 5XX HTTP status code.

HandlerFailureException:

The resource handler has failed without a returning a more specific error code. This can include timeouts.

ServiceLimitExceededException:

The resource handler has returned that a non-transient resource limit was reached on the service side.

InvalidCredentialsException:

The resource handler has returned that the credentials provided by the user are invalid.

ResourceConflictException:

The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.

ThrottlingException:

The request was denied due to request throttling.

UpdateResource

$result = $client->updateResource([/* ... */]);
$promise = $client->updateResourceAsync([/* ... */]);

Updates the specified property values in the resource.

You specify your resource property updates as a list of patch operations contained in a JSON patch document that adheres to the RFC 6902 - JavaScript Object Notation (JSON) Patch standard.

For details on how Cloud Control API performs resource update operations, see Updating a resource in the Amazon Web Services Cloud Control API User Guide.

After you have initiated a resource update request, you can monitor the progress of your request by calling GetResourceRequestStatus using the RequestToken of the ProgressEvent returned by UpdateResource.

For more information about the properties of a specific resource, refer to the related topic for the resource in the Resource and property types reference in the CloudFormation Users Guide.

Parameter Syntax

$result = $client->updateResource([
    'ClientToken' => '<string>',
    'Identifier' => '<string>', // REQUIRED
    'PatchDocument' => '<string>', // REQUIRED
    'RoleArn' => '<string>',
    'TypeName' => '<string>', // REQUIRED
    'TypeVersionId' => '<string>',
]);

Parameter Details

Members
ClientToken
Type: string

A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.

A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.

If you do not specify a client token, one is generated for inclusion in the request.

For more information, see Ensuring resource operation requests are unique in the Amazon Web Services Cloud Control API User Guide.

Identifier
Required: Yes
Type: string

The identifier for the resource.

You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.

For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values in the order they are specified in the primary identifier definition, separated by |.

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

PatchDocument
Required: Yes
Type: string

A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see Composing the patch document in the Amazon Web Services Cloud Control API User Guide.

RoleArn
Type: string

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the handlers section of the resource type definition schema.

If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.

For more information, see Specifying credentials in the Amazon Web Services Cloud Control API User Guide.

TypeName
Required: Yes
Type: string

The name of the resource type.

TypeVersionId
Type: string

For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.

Result Syntax

[
    'ProgressEvent' => [
        'ErrorCode' => 'NotUpdatable|InvalidRequest|AccessDenied|InvalidCredentials|AlreadyExists|NotFound|ResourceConflict|Throttling|ServiceLimitExceeded|NotStabilized|GeneralServiceException|ServiceInternalError|ServiceTimeout|NetworkFailure|InternalFailure',
        'EventTime' => <DateTime>,
        'Identifier' => '<string>',
        'Operation' => 'CREATE|DELETE|UPDATE',
        'OperationStatus' => 'PENDING|IN_PROGRESS|SUCCESS|FAILED|CANCEL_IN_PROGRESS|CANCEL_COMPLETE',
        'RequestToken' => '<string>',
        'ResourceModel' => '<string>',
        'RetryAfter' => <DateTime>,
        'StatusMessage' => '<string>',
        'TypeName' => '<string>',
    ],
]

Result Details

Members
ProgressEvent
Type: ProgressEvent structure

Represents the current status of the resource update request.

Use the RequestToken of the ProgressEvent with GetResourceRequestStatus to return the current status of a resource operation request.

Errors

AlreadyExistsException:

The resource with the name requested already exists.

HandlerInternalFailureException:

The resource handler has returned that an unexpected error occurred within the resource handler.

GeneralServiceException:

The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.

NotUpdatableException:

One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.

TypeNotFoundException:

The specified extension doesn't exist in the CloudFormation registry.

ConcurrentOperationException:

Another resource operation is currently being performed on this resource.

InvalidRequestException:

The resource handler has returned that invalid input from the user has generated a generic exception.

PrivateTypeException:

Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.

ResourceNotFoundException:

A resource with the specified identifier can't be found.

NetworkFailureException:

The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.

UnsupportedActionException:

The specified resource doesn't support this resource operation.

NotStabilizedException:

The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.

ServiceInternalErrorException:

The resource handler has returned that the downstream service returned an internal error, typically with a 5XX HTTP status code.

HandlerFailureException:

The resource handler has failed without a returning a more specific error code. This can include timeouts.

ServiceLimitExceededException:

The resource handler has returned that a non-transient resource limit was reached on the service side.

InvalidCredentialsException:

The resource handler has returned that the credentials provided by the user are invalid.

ResourceConflictException:

The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.

ClientTokenConflictException:

The specified client token has already been used in another resource request.

It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.

ThrottlingException:

The request was denied due to request throttling.

Shapes

AlreadyExistsException

Description

The resource with the name requested already exists.

Members
Message
Type: string

ClientTokenConflictException

Description

The specified client token has already been used in another resource request.

It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.

Members
Message
Type: string

ConcurrentModificationException

Description

The resource is currently being modified by another operation.

Members
Message
Type: string

ConcurrentOperationException

Description

Another resource operation is currently being performed on this resource.

Members
Message
Type: string

GeneralServiceException

Description

The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.

Members
Message
Type: string

HandlerFailureException

Description

The resource handler has failed without a returning a more specific error code. This can include timeouts.

Members
Message
Type: string

HandlerInternalFailureException

Description

The resource handler has returned that an unexpected error occurred within the resource handler.

Members
Message
Type: string

InvalidCredentialsException

Description

The resource handler has returned that the credentials provided by the user are invalid.

Members
Message
Type: string

InvalidRequestException

Description

The resource handler has returned that invalid input from the user has generated a generic exception.

Members
Message
Type: string

NetworkFailureException

Description

The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.

Members
Message
Type: string

NotStabilizedException

Description

The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.

Members
Message
Type: string

NotUpdatableException

Description

One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.

Members
Message
Type: string

PrivateTypeException

Description

Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.

Members
Message
Type: string

ProgressEvent

Description

Represents the current status of a resource operation request. For more information, see Managing resource operation requests in the Amazon Web Services Cloud Control API User Guide.

Members
ErrorCode
Type: string

For requests with a status of FAILED, the associated error code.

For error code definitions, see Handler error codes in the CloudFormation Command Line Interface User Guide for Extension Development.

EventTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource operation request was initiated.

Identifier
Type: string

The primary identifier for the resource.

In some cases, the resource identifier may be available before the resource operation has reached a status of SUCCESS.

Operation
Type: string

The resource operation type.

OperationStatus
Type: string

The current status of the resource operation request.

  • PENDING: The resource operation hasn't yet started.

  • IN_PROGRESS: The resource operation is currently in progress.

  • SUCCESS: The resource operation has successfully completed.

  • FAILED: The resource operation has failed. Refer to the error code and status message for more information.

  • CANCEL_IN_PROGRESS: The resource operation is in the process of being canceled.

  • CANCEL_COMPLETE: The resource operation has been canceled.

RequestToken
Type: string

The unique token representing this resource operation request.

Use the RequestToken with GetResourceRequestStatus to return the current status of a resource operation request.

ResourceModel
Type: string

A JSON string containing the resource model, consisting of each resource property and its current value.

RetryAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

When to next request the status of this resource operation request.

StatusMessage
Type: string

Any message explaining the current status.

TypeName
Type: string

The name of the resource type used in the operation.

RequestTokenNotFoundException

Description

A resource operation with the specified request token can't be found.

Members
Message
Type: string

ResourceConflictException

Description

The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.

Members
Message
Type: string

ResourceDescription

Description

Represents information about a provisioned resource.

Members
Identifier
Type: string

The primary identifier for the resource.

For more information, see Identifying resources in the Amazon Web Services Cloud Control API User Guide.

Properties
Type: string

A list of the resource properties and their current values.

ResourceNotFoundException

Description

A resource with the specified identifier can't be found.

Members
Message
Type: string

ResourceRequestStatusFilter

Description

The filter criteria to use in determining the requests returned.

Members
OperationStatuses
Type: Array of strings

The operation statuses to include in the filter.

  • PENDING: The operation has been requested, but not yet initiated.

  • IN_PROGRESS: The operation is in progress.

  • SUCCESS: The operation completed.

  • FAILED: The operation failed.

  • CANCEL_IN_PROGRESS: The operation is in the process of being canceled.

  • CANCEL_COMPLETE: The operation has been canceled.

Operations
Type: Array of strings

The operation types to include in the filter.

ServiceInternalErrorException

Description

The resource handler has returned that the downstream service returned an internal error, typically with a 5XX HTTP status code.

Members
Message
Type: string

ServiceLimitExceededException

Description

The resource handler has returned that a non-transient resource limit was reached on the service side.

Members
Message
Type: string

ThrottlingException

Description

The request was denied due to request throttling.

Members
Message
Type: string

TypeNotFoundException

Description

The specified extension doesn't exist in the CloudFormation registry.

Members
Message
Type: string

UnsupportedActionException

Description

The specified resource doesn't support this resource operation.

Members
Message
Type: string