updateStudio method

Future<void> updateStudio({
  1. required String studioId,
  2. String? defaultS3Location,
  3. String? description,
  4. String? encryptionKeyArn,
  5. String? name,
  6. List<String>? subnetIds,
})

Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.

May throw InternalServerException. May throw InvalidRequestException.

Parameter studioId : The ID of the Amazon EMR Studio to update.

Parameter defaultS3Location : The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.

Parameter description : A detailed description to assign to the Amazon EMR Studio.

Parameter encryptionKeyArn : The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.

Parameter name : A descriptive name for the Amazon EMR Studio.

Parameter subnetIds : A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.

Implementation

Future<void> updateStudio({
  required String studioId,
  String? defaultS3Location,
  String? description,
  String? encryptionKeyArn,
  String? name,
  List<String>? subnetIds,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.UpdateStudio'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'StudioId': studioId,
      if (defaultS3Location != null) 'DefaultS3Location': defaultS3Location,
      if (description != null) 'Description': description,
      if (encryptionKeyArn != null) 'EncryptionKeyArn': encryptionKeyArn,
      if (name != null) 'Name': name,
      if (subnetIds != null) 'SubnetIds': subnetIds,
    },
  );
}