Skip to content

create_environment async

create_environment(
    vpc_id: VpcId,
    service_access_subnet_id: SubnetId,
    vcf_version: VcfVersion,
    terms_accepted: bool,
    initial_vlans: InitialVlans,
    *,
    config_overrides: Optional[AsyncevsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    environment_name: Optional[EnvironmentName] = None,
    kms_key_id: Optional[str] = None,
    tags: Optional[RequestTagMap] = None,
    service_access_security_groups: Optional[ServiceAccessSecurityGroups] = None,
    connectivity_info: Optional[ConnectivityInfo] = None,
    license_info: Optional[LicenseInfoList] = None,
    hosts: Optional[HostInfoForCreateList] = None,
    vcf_hostnames: Optional[VcfHostnames] = None,
    site_id: Optional[str] = None,
) -> CreateEnvironmentResponse

Creates an Amazon EVS environment that runs VCF software, such as SDDC Manager, NSX Manager, and vCenter Server.

When you specify SELF_DEPLOYED for vcfVersion, Amazon EVS provisions only the VLAN subnets; no hosts are added and no VCF installation is performed. After the environment is created, you can add hosts with CreateEnvironmentHost and install VCF yourself. The licenseInfo, hosts, vcfHostnames, siteId, and connectivityInfo parameters are not supported in this mode.

When you specify any other VCF version, Amazon EVS installs and configures VCF for you. For more information, see Self-deployed mode in the Amazon EVS User Guide.

When Amazon EVS installs VCF, the default ESX version for the selected VCF version will be used. After a host is added with a specific ESX version, it can only be upgraded using vCenter Lifecycle Manager.

You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironment action. This results in a ValidationException response.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.

    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.

  • environment_name (Optional[EnvironmentName], default: None ) –

    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.

  • kms_key_id (Optional[str], default: None ) –

    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.

  • tags (Optional[RequestTagMap], default: None ) –

    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.

  • service_access_security_groups (Optional[ServiceAccessSecurityGroups], default: None ) –

    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

    You should avoid modifying the security group rules after deployment, as this can break the persistent connection between the Amazon EVS control plane and VPC. This can cause future environment actions like adding or removing hosts to fail.

  • vpc_id (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.

    Ensure that you specify a VPC that is adequately sized to accommodate the Amazon EVS subnets.

  • service_access_subnet_id (SubnetId) –

    The subnet that is used to establish connectivity between the Amazon EVS control plane and VPC. The Amazon EVS control plane uses this subnet to interface with your environment. This includes validating DNS records and enabling Amazon EVS Connectors.

  • vcf_version (VcfVersion) –

    The VCF version to use for the environment.

    • SELF_DEPLOYED: You install VCF yourself. The licenseInfo, hosts, vcfHostnames, siteId, and connectivityInfo parameters are not supported.

    • Any other valid value: Amazon EVS installs and configures VCF for you in the version you specify.

  • terms_accepted (bool) –

    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.

  • initial_vlans (InitialVlans) –

    The initial VLAN subnets for the Amazon EVS environment.

    For each Amazon EVS VLAN subnet, you must specify a non-overlapping CIDR block. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.

  • connectivity_info (Optional[ConnectivityInfo], default: None ) –

    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.

    Not supported when vcfVersion is SELF_DEPLOYED.

  • license_info (Optional[LicenseInfoList], default: None ) –

    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.

    Not supported when vcfVersion is SELF_DEPLOYED.

  • hosts (Optional[HostInfoForCreateList], default: None ) –

    The ESX hosts to add to the environment. For each host, provide the desired hostname, EC2 SSH keypair name, and EC2 instance type. Optionally, provide a partition or cluster placement group, or use Amazon EC2 Dedicated Hosts.

    Not supported when vcfVersion is SELF_DEPLOYED. In that case, you can add hosts using CreateEnvironmentHost after the environment is created.

  • vcf_hostnames (Optional[VcfHostnames], default: None ) –

    The DNS hostnames for the virtual machines that host the VCF management appliances. Provide hostnames for vCenter, NSX Manager, SDDC Manager, and Cloud Builder.

    Not supported when vcfVersion is SELF_DEPLOYED.

  • site_id (Optional[str], default: None ) –

    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.

    Not supported when vcfVersion is SELF_DEPLOYED.

Raises:

  • ValidationException –

    The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_evs/_services/async_evs.py
async def create_environment(
    self,
    vpc_id: "capo_evs.types.vpc_id.VpcId",
    service_access_subnet_id: "capo_evs.types.subnet_id.SubnetId",
    vcf_version: "capo_evs.types.vcf_version.VcfVersion",
    terms_accepted: bool,
    initial_vlans: "capo_evs.types.initial_vlans.InitialVlans",
    *,
    config_overrides: Optional[AsyncevsClientConfig] = None,
    client_token: Optional["capo_evs.types.client_token.ClientToken"] = None,
    environment_name: Optional[
        "capo_evs.types.environment_name.EnvironmentName"
    ] = None,
    kms_key_id: Optional[str] = None,
    tags: Optional["capo_evs.types.request_tag_map.RequestTagMap"] = None,
    service_access_security_groups: Optional[
        "capo_evs.types.service_access_security_groups.ServiceAccessSecurityGroups"
    ] = None,
    connectivity_info: Optional[
        "capo_evs.types.connectivity_info.ConnectivityInfo"
    ] = None,
    license_info: Optional[
        "capo_evs.types.license_info_list.LicenseInfoList"
    ] = None,
    hosts: Optional[
        "capo_evs.types.host_info_for_create_list.HostInfoForCreateList"
    ] = None,
    vcf_hostnames: Optional["capo_evs.types.vcf_hostnames.VcfHostnames"] = None,
    site_id: Optional[str] = None,
) -> "capo_evs.types.create_environment_response.CreateEnvironmentResponse":
    """<p>Creates an Amazon EVS environment that runs VCF software, such as SDDC Manager, NSX Manager, and vCenter Server.</p> <note> <p>When you specify <code>SELF_DEPLOYED</code> for <code>vcfVersion</code>, Amazon EVS provisions only the VLAN subnets; no hosts are added and no VCF installation is performed. After the environment is created, you can add hosts with <code>CreateEnvironmentHost</code> and install VCF yourself. The <code>licenseInfo</code>, <code>hosts</code>, <code>vcfHostnames</code>, <code>siteId</code>, and <code>connectivityInfo</code> parameters are not supported in this mode.</p> </note> <p>When you specify any other VCF version, Amazon EVS installs and configures VCF for you. For more information, see <a href="https://docs.aws.amazon.com/evs/latest/userguide/getting-started-self-deployed.html">Self-deployed mode</a> in the <i>Amazon EVS User Guide</i>.</p> <important> <p>When Amazon EVS installs VCF, the default ESX version for the selected VCF version will be used. After a host is added with a specific ESX version, it can only be upgraded using vCenter Lifecycle Manager.</p> </important> <note> <p>You cannot use the <code>dedicatedHostId</code> and <code>placementGroupId</code> parameters together in the same <code>CreateEnvironment</code> action. This results in a <code>ValidationException</code> response.</p> </note>

    Args:
        client_token: <note> <p>This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.</p> </note> <p>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.</p>
        environment_name: <p>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.</p>
        kms_key_id: <p>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.</p>
        tags: <p>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.</p>
        service_access_security_groups: <p>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.</p> <p>The security group should allow access to the following.</p> <ul> <li> <p>TCP/UDP access to the DNS servers</p> </li> <li> <p>HTTPS/SSH access to the host management VLAN subnet</p> </li> <li> <p>HTTPS/SSH access to the Management VM VLAN subnet</p> </li> </ul> <p>You should avoid modifying the security group rules after deployment, as this can break the persistent connection between the Amazon EVS control plane and VPC. This can cause future environment actions like adding or removing hosts to fail.</p>
        vpc_id: <p>A unique ID for the VPC that the environment is deployed inside.</p> <p>Amazon EVS requires that all VPC subnets exist in a single Availability Zone in a Region where the service is available.</p> <p>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.</p> <p>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.</p> <note> <p>Ensure that you specify a VPC that is adequately sized to accommodate the Amazon EVS subnets.</p> </note>
        service_access_subnet_id: <p>The subnet that is used to establish connectivity between the Amazon EVS control plane and VPC. The Amazon EVS control plane uses this subnet to interface with your environment. This includes validating DNS records and enabling Amazon EVS Connectors.</p>
        vcf_version: <p>The VCF version to use for the environment.</p> <ul> <li> <p> <code>SELF_DEPLOYED</code>: You install VCF yourself. The <code>licenseInfo</code>, <code>hosts</code>, <code>vcfHostnames</code>, <code>siteId</code>, and <code>connectivityInfo</code> parameters are not supported.</p> </li> <li> <p>Any other valid value: Amazon EVS installs and configures VCF for you in the version you specify.</p> </li> </ul>
        terms_accepted: <p>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.</p>
        initial_vlans: <p>The initial VLAN subnets for the Amazon EVS environment.</p> <note> <p>For each Amazon EVS VLAN subnet, you must specify a non-overlapping CIDR block. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.</p> </note>
        connectivity_info: <p>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.</p> <note> <p>Not supported when <code>vcfVersion</code> is <code>SELF_DEPLOYED</code>.</p> </note>
        license_info: <p>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.</p> <p>For information about minimum license requirements, see <a href="https://docs.aws.amazon.com/evs/latest/userguide/vcf-license-mgmt.html">the VCF subscriptions section</a> in the <i>Amazon EVS User Guide</i>.</p> <p>VCF licenses can be used for only one Amazon EVS environment. Amazon EVS does not support reuse of VCF licenses for multiple environments.</p> <p>VCF license information can be retrieved from the Broadcom portal.</p> <note> <p>Not supported when <code>vcfVersion</code> is <code>SELF_DEPLOYED</code>.</p> </note>
        hosts: <p>The ESX hosts to add to the environment. For each host, provide the desired hostname, EC2 SSH keypair name, and EC2 instance type. Optionally, provide a partition or cluster placement group, or use Amazon EC2 Dedicated Hosts.</p> <note> <p>Not supported when <code>vcfVersion</code> is <code>SELF_DEPLOYED</code>. In that case, you can add hosts using <code>CreateEnvironmentHost</code> after the environment is created.</p> </note>
        vcf_hostnames: <p>The DNS hostnames for the virtual machines that host the VCF management appliances. Provide hostnames for vCenter, NSX Manager, SDDC Manager, and Cloud Builder.</p> <note> <p>Not supported when <code>vcfVersion</code> is <code>SELF_DEPLOYED</code>.</p> </note>
        site_id: <p>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.</p> <note> <p>Not supported when <code>vcfVersion</code> is <code>SELF_DEPLOYED</code>.</p> </note>

    Raises:
        capo_evs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</p>
        capo_evs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_evs.types.create_environment_request.CreateEnvironmentRequest]",
    ) -> AsyncOperationResponse[
        "capo_evs.types.create_environment_response.CreateEnvironmentResponse"
    ]:
        import capo_evs._operations.amazon_elastic_v_mware_service.create_environment

        (
            output,
            http_response,
        ) = await capo_evs._operations.amazon_elastic_v_mware_service.create_environment.async_create_environment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_evs.types.create_environment_request.CreateEnvironmentRequest",
    ) -> dict[str, Any]:
        import capo_evs.types.create_environment_request

        return capo_evs.types.create_environment_request.redact_sensitive(input_)

    def _redact_output(
        output: "capo_evs.types.create_environment_response.CreateEnvironmentResponse",
    ) -> dict[str, Any]:
        import capo_evs.types.create_environment_response

        return capo_evs.types.create_environment_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateEnvironment",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_evs.types.create_environment_request.CreateEnvironmentRequest = {
        "vpc_id": vpc_id,
        "service_access_subnet_id": service_access_subnet_id,
        "vcf_version": vcf_version,
        "terms_accepted": terms_accepted,
        "initial_vlans": initial_vlans,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if environment_name is not None:
        input_["environment_name"] = environment_name
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if tags is not None:
        input_["tags"] = tags
    if service_access_security_groups is not None:
        input_["service_access_security_groups"] = service_access_security_groups
    if connectivity_info is not None:
        input_["connectivity_info"] = connectivity_info
    if license_info is not None:
        input_["license_info"] = license_info
    if hosts is not None:
        input_["hosts"] = hosts
    if vcf_hostnames is not None:
        input_["vcf_hostnames"] = vcf_hostnames
    if site_id is not None:
        input_["site_id"] = site_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output