putApplicationAccessScope method

Future<void> putApplicationAccessScope({
  1. required String applicationArn,
  2. required String scope,
  3. List<String>? authorizedTargets,
})

Adds or updates the list of authorized targets for an IAM Identity Center access scope for an application.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter applicationArn : Specifies the ARN of the application with the access scope with the targets to add or update.

Parameter scope : Specifies the name of the access scope to be associated with the specified targets.

Parameter authorizedTargets : Specifies an array list of ARNs that represent the authorized targets for this access scope.

Implementation

Future<void> putApplicationAccessScope({
  required String applicationArn,
  required String scope,
  List<String>? authorizedTargets,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SWBExternalService.PutApplicationAccessScope'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationArn': applicationArn,
      'Scope': scope,
      if (authorizedTargets != null) 'AuthorizedTargets': authorizedTargets,
    },
  );
}