createStudio method
- required AuthMode authMode,
- required String defaultS3Location,
- required String engineSecurityGroupId,
- required String name,
- required String serviceRole,
- required List<
String> subnetIds, - required String vpcId,
- required String workspaceSecurityGroupId,
- String? description,
- String? encryptionKeyArn,
- String? idcInstanceArn,
- IdcUserAssignment? idcUserAssignment,
- String? idpAuthUrl,
- String? idpRelayStateParameterName,
- List<
Tag> ? tags, - bool? trustedIdentityPropagationEnabled,
- String? userRole,
Creates a new Amazon EMR Studio.
May throw InternalServerException.
May throw InvalidRequestException.
Parameter authMode :
Specifies whether the Studio authenticates users using IAM or IAM Identity
Center.
Parameter defaultS3Location :
The Amazon S3 location to back up Amazon EMR Studio Workspaces and
notebook files.
Parameter engineSecurityGroupId :
The ID of the Amazon EMR Studio Engine security group. The Engine security
group allows inbound network traffic from the Workspace security group,
and it must be in the same VPC specified by VpcId.
Parameter name :
A descriptive name for the Amazon EMR Studio.
Parameter serviceRole :
The IAM role that the Amazon EMR Studio assumes. The service role provides
a way for Amazon EMR Studio to interoperate with other Amazon Web Services
services.
Parameter subnetIds :
A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can
have a maximum of 5 subnets. The subnets must belong to the VPC specified
by VpcId. Studio users can create a Workspace in any of the
specified subnets.
Parameter vpcId :
The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with
the Studio.
Parameter workspaceSecurityGroupId :
The ID of the Amazon EMR Studio Workspace security group. The Workspace
security group allows outbound network traffic to resources in the Engine
security group, and it must be in the same VPC specified by
VpcId.
Parameter description :
A detailed description of 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 idcInstanceArn :
The ARN of the IAM Identity Center instance to create the Studio
application.
Parameter idcUserAssignment :
Specifies whether IAM Identity Center user assignment is
REQUIRED or OPTIONAL. If the value is set to
REQUIRED, users must be explicitly assigned to the Studio
application to access the Studio.
Parameter idpAuthUrl :
The authentication endpoint of your identity provider (IdP). Specify this
value when you use IAM authentication and want to let federated users log
in to a Studio with the Studio URL and credentials from your IdP. Amazon
EMR Studio redirects users to this endpoint to enter credentials.
Parameter idpRelayStateParameterName :
The name that your identity provider (IdP) uses for its
RelayState parameter. For example, RelayState or
TargetSource. Specify this value when you use IAM
authentication and want to let federated users log in to a Studio using
the Studio URL. The RelayState parameter differs by IdP.
Parameter tags :
A list of tags to associate with the Amazon EMR Studio. Tags are
user-defined key-value pairs that consist of a required key string with a
maximum of 128 characters, and an optional value string with a maximum of
256 characters.
Parameter trustedIdentityPropagationEnabled :
A Boolean indicating whether to enable Trusted identity propagation for
the Studio. The default value is false.
Parameter userRole :
The IAM user role that users and groups assume when logged in to an Amazon
EMR Studio. Only specify a UserRole when you use IAM Identity
Center authentication. The permissions attached to the
UserRole can be scoped down for each user or group using
session policies.
Implementation
Future<CreateStudioOutput> createStudio({
required AuthMode authMode,
required String defaultS3Location,
required String engineSecurityGroupId,
required String name,
required String serviceRole,
required List<String> subnetIds,
required String vpcId,
required String workspaceSecurityGroupId,
String? description,
String? encryptionKeyArn,
String? idcInstanceArn,
IdcUserAssignment? idcUserAssignment,
String? idpAuthUrl,
String? idpRelayStateParameterName,
List<Tag>? tags,
bool? trustedIdentityPropagationEnabled,
String? userRole,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ElasticMapReduce.CreateStudio'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AuthMode': authMode.value,
'DefaultS3Location': defaultS3Location,
'EngineSecurityGroupId': engineSecurityGroupId,
'Name': name,
'ServiceRole': serviceRole,
'SubnetIds': subnetIds,
'VpcId': vpcId,
'WorkspaceSecurityGroupId': workspaceSecurityGroupId,
if (description != null) 'Description': description,
if (encryptionKeyArn != null) 'EncryptionKeyArn': encryptionKeyArn,
if (idcInstanceArn != null) 'IdcInstanceArn': idcInstanceArn,
if (idcUserAssignment != null)
'IdcUserAssignment': idcUserAssignment.value,
if (idpAuthUrl != null) 'IdpAuthUrl': idpAuthUrl,
if (idpRelayStateParameterName != null)
'IdpRelayStateParameterName': idpRelayStateParameterName,
if (tags != null) 'Tags': tags,
if (trustedIdentityPropagationEnabled != null)
'TrustedIdentityPropagationEnabled':
trustedIdentityPropagationEnabled,
if (userRole != null) 'UserRole': userRole,
},
);
return CreateStudioOutput.fromJson(jsonResponse.body);
}