updatePermissionSet method

Future<void> updatePermissionSet({
  1. required String instanceArn,
  2. required String permissionSetArn,
  3. String? description,
  4. String? relayState,
  5. String? sessionDuration,
})

Updates an existing permission set.

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

Parameter instanceArn : The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

Parameter permissionSetArn : The ARN of the permission set.

Parameter description : The description of the PermissionSet.

Parameter relayState : Used to redirect users within the application during the federation authentication process.

Parameter sessionDuration : The length of time that the application user sessions are valid for in the ISO-8601 standard.

Implementation

Future<void> updatePermissionSet({
  required String instanceArn,
  required String permissionSetArn,
  String? description,
  String? relayState,
  String? sessionDuration,
}) async {
  ArgumentError.checkNotNull(instanceArn, 'instanceArn');
  _s.validateStringLength(
    'instanceArn',
    instanceArn,
    10,
    1224,
    isRequired: true,
  );
  ArgumentError.checkNotNull(permissionSetArn, 'permissionSetArn');
  _s.validateStringLength(
    'permissionSetArn',
    permissionSetArn,
    10,
    1224,
    isRequired: true,
  );
  _s.validateStringLength(
    'description',
    description,
    1,
    700,
  );
  _s.validateStringLength(
    'relayState',
    relayState,
    1,
    240,
  );
  _s.validateStringLength(
    'sessionDuration',
    sessionDuration,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SWBExternalService.UpdatePermissionSet'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InstanceArn': instanceArn,
      'PermissionSetArn': permissionSetArn,
      if (description != null) 'Description': description,
      if (relayState != null) 'RelayState': relayState,
      if (sessionDuration != null) 'SessionDuration': sessionDuration,
    },
  );
}