syncResource method
Future<SyncResourceResponse>
syncResource({
- required String resource,
- required ResourceType resourceType,
Syncs the resource with current AppRegistry records.
Specifically, the resource’s AppRegistry system tags sync with its associated application. We remove the resource's AppRegistry system tags if it does not associate with the application. The caller must have permissions to read and update the resource.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resource :
An entity you can work with and specify with a name or ID. Examples
include an Amazon EC2 instance, an Amazon Web Services CloudFormation
stack, or an Amazon S3 bucket.
Parameter resourceType :
The type of resource of which the application will be associated.
Implementation
Future<SyncResourceResponse> syncResource({
required String resource,
required ResourceType resourceType,
}) async {
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri:
'/sync/${Uri.encodeComponent(resourceType.value)}/${Uri.encodeComponent(resource)}',
exceptionFnMap: _exceptionFns,
);
return SyncResourceResponse.fromJson(response);
}