Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 Amazon Web Services CloudFormation Users Guide.
Synopsis
- data UpdateResource = UpdateResource' {
- clientToken :: Maybe Text
- typeVersionId :: Maybe Text
- roleArn :: Maybe Text
- typeName :: Text
- identifier :: Text
- patchDocument :: Sensitive Text
- newUpdateResource :: Text -> Text -> Text -> UpdateResource
- updateResource_clientToken :: Lens' UpdateResource (Maybe Text)
- updateResource_typeVersionId :: Lens' UpdateResource (Maybe Text)
- updateResource_roleArn :: Lens' UpdateResource (Maybe Text)
- updateResource_typeName :: Lens' UpdateResource Text
- updateResource_identifier :: Lens' UpdateResource Text
- updateResource_patchDocument :: Lens' UpdateResource Text
- data UpdateResourceResponse = UpdateResourceResponse' {}
- newUpdateResourceResponse :: Int -> UpdateResourceResponse
- updateResourceResponse_progressEvent :: Lens' UpdateResourceResponse (Maybe ProgressEvent)
- updateResourceResponse_httpStatus :: Lens' UpdateResourceResponse Int
Creating a Request
data UpdateResource Source #
See: newUpdateResource
smart constructor.
UpdateResource' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> UpdateResource |
Create a value of UpdateResource
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientToken:UpdateResource'
, updateResource_clientToken
- 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.
$sel:typeVersionId:UpdateResource'
, updateResource_typeVersionId
- 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.
$sel:roleArn:UpdateResource'
, updateResource_roleArn
- The Amazon Resource Name (ARN) of the Identity and Access Management
(IAM) 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.
$sel:typeName:UpdateResource'
, updateResource_typeName
- The name of the resource type.
$sel:identifier:UpdateResource'
, updateResource_identifier
- 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.
$sel:patchDocument:UpdateResource'
, updateResource_patchDocument
- 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.
Request Lenses
updateResource_clientToken :: Lens' UpdateResource (Maybe Text) Source #
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.
updateResource_typeVersionId :: Lens' UpdateResource (Maybe Text) Source #
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.
updateResource_roleArn :: Lens' UpdateResource (Maybe Text) Source #
The Amazon Resource Name (ARN) of the Identity and Access Management
(IAM) 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.
updateResource_typeName :: Lens' UpdateResource Text Source #
The name of the resource type.
updateResource_identifier :: Lens' UpdateResource Text Source #
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.
updateResource_patchDocument :: Lens' UpdateResource Text Source #
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.
Destructuring the Response
data UpdateResourceResponse Source #
See: newUpdateResourceResponse
smart constructor.
UpdateResourceResponse' | |
|
Instances
newUpdateResourceResponse Source #
Create a value of UpdateResourceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:progressEvent:UpdateResourceResponse'
, updateResourceResponse_progressEvent
- 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.
$sel:httpStatus:UpdateResourceResponse'
, updateResourceResponse_httpStatus
- The response's http status code.
Response Lenses
updateResourceResponse_progressEvent :: Lens' UpdateResourceResponse (Maybe ProgressEvent) Source #
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.
updateResourceResponse_httpStatus :: Lens' UpdateResourceResponse Int Source #
The response's http status code.