createEnvironment method

Future<CreateEnvironmentOutput> createEnvironment({
  1. required String domainIdentifier,
  2. required String name,
  3. required String projectIdentifier,
  4. int? deploymentOrder,
  5. String? description,
  6. String? environmentAccountIdentifier,
  7. String? environmentAccountRegion,
  8. String? environmentBlueprintIdentifier,
  9. String? environmentConfigurationId,
  10. String? environmentConfigurationName,
  11. String? environmentProfileIdentifier,
  12. List<String>? glossaryTerms,
  13. List<EnvironmentParameter>? userParameters,
})

Create an Amazon DataZone environment.

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

Parameter domainIdentifier : The identifier of the Amazon DataZone domain in which the environment is created.

Parameter name : The name of the Amazon DataZone environment.

Parameter projectIdentifier : The identifier of the Amazon DataZone project in which this environment is created.

Parameter deploymentOrder : The deployment order of the environment.

Parameter description : The description of the Amazon DataZone environment.

Parameter environmentAccountIdentifier : The ID of the account in which the environment is being created.

Parameter environmentAccountRegion : The region of the account in which the environment is being created.

Parameter environmentBlueprintIdentifier : The ID of the blueprint with which the environment is being created.

Parameter environmentConfigurationId : The configuration ID of the environment.

Parameter environmentConfigurationName : The configuration name of the environment.

Parameter environmentProfileIdentifier : The identifier of the environment profile that is used to create this Amazon DataZone environment.

Parameter glossaryTerms : The glossary terms that can be used in this Amazon DataZone environment.

Parameter userParameters : The user parameters of this Amazon DataZone environment.

Implementation

Future<CreateEnvironmentOutput> createEnvironment({
  required String domainIdentifier,
  required String name,
  required String projectIdentifier,
  int? deploymentOrder,
  String? description,
  String? environmentAccountIdentifier,
  String? environmentAccountRegion,
  String? environmentBlueprintIdentifier,
  String? environmentConfigurationId,
  String? environmentConfigurationName,
  String? environmentProfileIdentifier,
  List<String>? glossaryTerms,
  List<EnvironmentParameter>? userParameters,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'projectIdentifier': projectIdentifier,
    if (deploymentOrder != null) 'deploymentOrder': deploymentOrder,
    if (description != null) 'description': description,
    if (environmentAccountIdentifier != null)
      'environmentAccountIdentifier': environmentAccountIdentifier,
    if (environmentAccountRegion != null)
      'environmentAccountRegion': environmentAccountRegion,
    if (environmentBlueprintIdentifier != null)
      'environmentBlueprintIdentifier': environmentBlueprintIdentifier,
    if (environmentConfigurationId != null)
      'environmentConfigurationId': environmentConfigurationId,
    if (environmentConfigurationName != null)
      'environmentConfigurationName': environmentConfigurationName,
    if (environmentProfileIdentifier != null)
      'environmentProfileIdentifier': environmentProfileIdentifier,
    if (glossaryTerms != null) 'glossaryTerms': glossaryTerms,
    if (userParameters != null) 'userParameters': userParameters,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/environments',
    exceptionFnMap: _exceptionFns,
  );
  return CreateEnvironmentOutput.fromJson(response);
}