associateServiceRoleToAccount method

Future<AssociateServiceRoleToAccountResponse> associateServiceRoleToAccount({
  1. required String roleArn,
})

Associates a Greengrass service role with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. The role must include the AWSGreengrassResourceAccessRolePolicy managed policy or a custom policy that defines equivalent permissions for the IoT Greengrass features that you use. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.

May throw InternalServerException. May throw ValidationException.

Parameter roleArn : The Amazon Resource Name (ARN) of the service role to associate with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

Implementation

Future<AssociateServiceRoleToAccountResponse> associateServiceRoleToAccount({
  required String roleArn,
}) async {
  final $payload = <String, dynamic>{
    'RoleArn': roleArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/greengrass/servicerole',
    exceptionFnMap: _exceptionFns,
  );
  return AssociateServiceRoleToAccountResponse.fromJson(response);
}