AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Updates an association. You can update the association name and version, the document
version, schedule, parameters, and Amazon Simple Storage Service (Amazon S3) output.
When you call UpdateAssociation
, the system removes all optional parameters
from the request and overwrites the association with null values for those parameters.
This is by design. You must specify all optional parameters in the call, even if you
are not changing the parameters. This includes the Name
parameter. Before calling
this API action, we recommend that you call the DescribeAssociation API operation
and make a note of all optional parameters required for your UpdateAssociation
call.
In order to call this API operation, a user, group, or role must be granted permission
to call the DescribeAssociation API operation. If you don't have permission
to call DescribeAssociation
, then you receive the following error: An error
occurred (AccessDeniedException) when calling the UpdateAssociation operation: User:
When you update an association, the association immediately runs against the specified
targets. You can add the ApplyOnlyAtCronInterval
parameter to run the association
during the next schedule run.
This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginUpdateAssociation and EndUpdateAssociation.
Namespace: Amazon.SimpleSystemsManagement
Assembly: AWSSDK.SimpleSystemsManagement.dll
Version: 3.x.y.z
public virtual Task<UpdateAssociationResponse> UpdateAssociationAsync( UpdateAssociationRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the UpdateAssociation service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Exception | Condition |
---|---|
AssociationDoesNotExistException | The specified association doesn't exist. |
AssociationVersionLimitExceededException | You have reached the maximum number versions allowed for an association. Each association has a limit of 1,000 versions. |
InternalServerErrorException | An error occurred on the server side. |
InvalidAssociationVersionException | The version you specified isn't valid. Use ListAssociationVersions to view all versions of an association according to the association ID. Or, use the $LATEST parameter to view the latest version of the association. |
InvalidDocumentException | The specified SSM document doesn't exist. |
InvalidDocumentVersionException | The document version isn't valid or doesn't exist. |
InvalidOutputLocationException | The output location isn't valid or doesn't exist. |
InvalidParametersException | You must specify values for all required parameters in the Amazon Web Services Systems Manager document (SSM document). You can only supply values to parameters defined in the SSM document. |
InvalidScheduleException | The schedule is invalid. Verify your cron or rate expression and try again. |
InvalidTargetException | The target isn't valid or doesn't exist. It might not be configured for Systems Manager or you might not have permission to perform the operation. |
InvalidTargetMapsException | TargetMap parameter isn't valid. |
InvalidUpdateException | The update isn't valid. |
TooManyUpdatesException | There are concurrent updates for a resource that supports one update at a time. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5