getControl method
Returns details about a specific control, most notably a list of Amazon
Web Services Regions where this control is supported. Input a value for
the ControlArn parameter, in ARN form. GetControl
accepts controltower or controlcatalog control ARNs as
input. Returns a controlcatalog ARN format.
In the API response, controls that have the value GLOBAL in
the Scope field do not show the
DeployableRegions field, because it does not apply. Controls
that have the value REGIONAL in the Scope field
return a value for the DeployableRegions field, as shown in
the example.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter controlArn :
The Amazon Resource Name (ARN) of the control. It has one of the following
formats:
Global format
arn:{PARTITION}:controlcatalog:::control/{CONTROL_CATALOG_OPAQUE_ID}
Or Regional format
arn:{PARTITION}:controltower:{REGION}::control/{CONTROL_TOWER_OPAQUE_ID}
Here is a more general pattern that covers Amazon Web Services Control Tower and Control Catalog ARNs:
^arn:(aws(?:[-a-z])?):(controlcatalog|controltower):[a-zA-Z0-9-]::control/[0-9a-zA-Z_\-]+$
Implementation
Future<GetControlResponse> getControl({
required String controlArn,
}) async {
final $payload = <String, dynamic>{
'ControlArn': controlArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/get-control',
exceptionFnMap: _exceptionFns,
);
return GetControlResponse.fromJson(response);
}