createEnvironment method
- required ConnectivityInfo connectivityInfo,
- required List<
HostInfoForCreate> hosts, - required InitialVlans initialVlans,
- required List<
LicenseInfo> licenseInfo, - required String serviceAccessSubnetId,
- required String siteId,
- required bool termsAccepted,
- required VcfHostnames vcfHostnames,
- required VcfVersion vcfVersion,
- required String vpcId,
- String? clientToken,
- String? environmentName,
- String? kmsKeyId,
- ServiceAccessSecurityGroups? serviceAccessSecurityGroups,
- Map<
String, String> ? tags,
Creates an Amazon EVS environment that runs VCF software, such as SDDC Manager, NSX Manager, and vCenter Server.
During environment creation, Amazon EVS performs validations on DNS settings, provisions VLAN subnets and hosts, and deploys the supplied version of VCF.
It can take several hours to create an environment. After the deployment completes, you can configure VCF in the vSphere user interface according to your needs.
May throw ValidationException.
Parameter connectivityInfo :
The connectivity configuration for the environment. Amazon EVS requires
that you specify two route server peer IDs. During environment creation,
the route server endpoints peer with the NSX edges over the NSX uplink
subnet, providing BGP-based dynamic routing for overlay networks.
Parameter hosts :
The ESX hosts to add to the environment. Amazon EVS requires that you
provide details for a minimum of 4 hosts during environment creation.
For each host, you must provide the desired hostname, EC2 SSH keypair name, and EC2 instance type. Optionally, you can also provide a partition or cluster placement group to use, or use Amazon EC2 Dedicated Hosts.
Parameter initialVlans :
The initial VLAN subnets for the Amazon EVS environment.
Parameter licenseInfo :
The license information that Amazon EVS requires to create an environment.
Amazon EVS requires two license keys: a VCF solution key and a vSAN
license key. The VCF solution key must meet minimum core requirements, and
the vSAN license key must meet minimum capacity requirements for your
selected instance type.
For information about minimum license requirements, see the VCF subscriptions section in the Amazon EVS User Guide.
VCF licenses can be used for only one Amazon EVS environment. Amazon EVS does not support reuse of VCF licenses for multiple environments.
VCF license information can be retrieved from the Broadcom portal.
Parameter serviceAccessSubnetId :
The subnet that is used to establish connectivity between the Amazon EVS
control plane and VPC. Amazon EVS uses this subnet to validate mandatory
DNS records for your VCF appliances and hosts and create the environment.
Parameter siteId :
The Broadcom Site ID that is allocated to you as part of your electronic
software delivery. This ID allows customer access to the Broadcom portal,
and is provided to you by Broadcom at the close of your software contract
or contract renewal. Amazon EVS uses the Broadcom Site ID that you provide
to meet Broadcom VCF license usage reporting requirements for Amazon EVS.
Parameter termsAccepted :
Customer confirmation that the customer has purchased and will continue to
maintain the required number of VCF software licenses to cover all
physical processor cores in the Amazon EVS environment. Information about
your VCF software in Amazon EVS will be shared with Broadcom to verify
license compliance. Amazon EVS does not validate license keys. To validate
license keys, visit the Broadcom support portal.
Parameter vcfHostnames :
The DNS hostnames for the virtual machines that host the VCF management
appliances. Amazon EVS requires that you provide DNS hostnames for the
following appliances: vCenter, NSX Manager, SDDC Manager, and Cloud
Builder.
Parameter vcfVersion :
The VCF version to use for the environment.
Parameter vpcId :
A unique ID for the VPC that the environment is deployed inside.
Amazon EVS requires that all VPC subnets exist in a single Availability Zone in a Region where the service is available.
The VPC that you specify must have a valid DHCP option set with domain name, at least two DNS servers, and an NTP server. These settings are used to configure your VCF appliances and hosts. The VPC cannot be used with any other deployed Amazon EVS environment. Amazon EVS does not provide multi-VPC support for environments at this time.
Amazon EVS does not support the following Amazon Web Services networking options for NSX overlay connectivity: cross-Region VPC peering, Amazon S3 gateway endpoints, or Amazon Web Services Direct Connect virtual private gateway associations.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the environment creation request. If you do not specify a
client token, a randomly generated token is used for the request to ensure
idempotency.
Parameter environmentName :
The name to give to your environment. The name can contain only
alphanumeric characters (case-sensitive), hyphens, and underscores. It
must start with an alphanumeric character, and can't be longer than 100
characters. The name must be unique within the Amazon Web Services Region
and Amazon Web Services account that you're creating the environment in.
Parameter kmsKeyId :
A unique ID for the customer-managed KMS key that is used to encrypt the
VCF credential pairs for SDDC Manager, NSX Manager, and vCenter
appliances. These credentials are stored in Amazon Web Services Secrets
Manager.
Parameter serviceAccessSecurityGroups :
The security group that controls communication between the Amazon EVS
control plane and VPC. The default security group is used if a custom
security group isn't specified.
The security group should allow access to the following.
- TCP/UDP access to the DNS servers
- HTTPS/SSH access to the host management VLAN subnet
- HTTPS/SSH access to the Management VM VLAN subnet
Parameter tags :
Metadata that assists with categorization and organization. Each tag
consists of a key and an optional value. You define both. Tags don't
propagate to any other cluster or Amazon Web Services resources.
Implementation
Future<CreateEnvironmentResponse> createEnvironment({
required ConnectivityInfo connectivityInfo,
required List<HostInfoForCreate> hosts,
required InitialVlans initialVlans,
required List<LicenseInfo> licenseInfo,
required String serviceAccessSubnetId,
required String siteId,
required bool termsAccepted,
required VcfHostnames vcfHostnames,
required VcfVersion vcfVersion,
required String vpcId,
String? clientToken,
String? environmentName,
String? kmsKeyId,
ServiceAccessSecurityGroups? serviceAccessSecurityGroups,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AmazonElasticVMwareService.CreateEnvironment'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'connectivityInfo': connectivityInfo,
'hosts': hosts,
'initialVlans': initialVlans,
'licenseInfo': licenseInfo,
'serviceAccessSubnetId': serviceAccessSubnetId,
'siteId': siteId,
'termsAccepted': termsAccepted,
'vcfHostnames': vcfHostnames,
'vcfVersion': vcfVersion.value,
'vpcId': vpcId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (environmentName != null) 'environmentName': environmentName,
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (serviceAccessSecurityGroups != null)
'serviceAccessSecurityGroups': serviceAccessSecurityGroups,
if (tags != null) 'tags': tags,
},
);
return CreateEnvironmentResponse.fromJson(jsonResponse.body);
}