deploySystemInstance method
Greengrass and Cloud Deployments
Deploys the system instance to the target specified in
CreateSystemInstance
.
Greengrass Deployments
If the system or any workflows and entities have been updated before this action is called, then the deployment will create a new Amazon Simple Storage Service resource file and then deploy it.
Since this action creates a Greengrass deployment on the caller's behalf, the calling identity must have write permissions to the specified Greengrass group. Otherwise, the call will fail with an authorization error.
For information about the artifacts that get added to your Greengrass core device when you use this API, see AWS IoT Things Graph and AWS IoT Greengrass.
May throw ResourceNotFoundException. May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceInUseException.
Parameter id
:
The ID of the system instance. This value is returned by the
CreateSystemInstance
action.
The ID should be in the following format.
urn:tdm:REGION/ACCOUNT ID/default:deployment:DEPLOYMENTNAME
Implementation
Future<DeploySystemInstanceResponse> deploySystemInstance({
String? id,
}) async {
_s.validateStringLength(
'id',
id,
0,
160,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'IotThingsGraphFrontEndService.DeploySystemInstance'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (id != null) 'id': id,
},
);
return DeploySystemInstanceResponse.fromJson(jsonResponse.body);
}