:doc:`MainframeModernization <../../m2>` / Client / create_environment

******************
create_environment
******************



.. py:method:: MainframeModernization.Client.create_environment(**kwargs)

  

  Creates a runtime environment for a given runtime engine.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/m2-2021-04-28/CreateEnvironment>`_  


  **Request Syntax**
  ::

    response = client.create_environment(
        clientToken='string',
        description='string',
        engineType='microfocus'|'bluage',
        engineVersion='string',
        highAvailabilityConfig={
            'desiredCapacity': 123
        },
        instanceType='string',
        kmsKeyId='string',
        name='string',
        networkType='ipv4'|'dual',
        preferredMaintenanceWindow='string',
        publiclyAccessible=True|False,
        securityGroupIds=[
            'string',
        ],
        storageConfigurations=[
            {
                'efs': {
                    'fileSystemId': 'string',
                    'mountPoint': 'string'
                },
                'fsx': {
                    'fileSystemId': 'string',
                    'mountPoint': 'string'
                }
            },
        ],
        subnetIds=[
            'string',
        ],
        tags={
            'string': 'string'
        }
    )
    
  :type clientToken: string
  :param clientToken: 

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create an environment. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.

    This field is autopopulated if not provided.

  
  :type description: string
  :param description: 

    The description of the runtime environment.

    

  
  :type engineType: string
  :param engineType: **[REQUIRED]** 

    The engine type for the runtime environment.

    

  
  :type engineVersion: string
  :param engineVersion: 

    The version of the engine type for the runtime environment.

    

  
  :type highAvailabilityConfig: dict
  :param highAvailabilityConfig: 

    The details of a high availability configuration for this runtime environment.

    

  
    - **desiredCapacity** *(integer) --* **[REQUIRED]** 

      The number of instances in a high availability configuration. The minimum possible value is 1 and the maximum is 100.

      

    
  
  :type instanceType: string
  :param instanceType: **[REQUIRED]** 

    The type of instance for the runtime environment.

    

  
  :type kmsKeyId: string
  :param kmsKeyId: 

    The identifier of a customer managed key.

    

  
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the runtime environment. Must be unique within the account.

    

  
  :type networkType: string
  :param networkType: 

    The network type required for the runtime environment.

    

  
  :type preferredMaintenanceWindow: string
  :param preferredMaintenanceWindow: 

    Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format ``ddd:hh24:mi-ddd:hh24:mi`` and must be less than 24 hours. The following two examples are valid maintenance windows: ``sun:23:45-mon:00:15`` or ``sat:01:00-sat:03:00``.

     

    If you do not provide a value, a random system-generated value will be assigned.

    

  
  :type publiclyAccessible: boolean
  :param publiclyAccessible: 

    Specifies whether the runtime environment is publicly accessible.

    

  
  :type securityGroupIds: list
  :param securityGroupIds: 

    The list of security groups for the VPC associated with this runtime environment.

    

  
    - *(string) --* 

    

  :type storageConfigurations: list
  :param storageConfigurations: 

    Optional. The storage configurations for this runtime environment.

    

  
    - *(dict) --* 

      Defines the storage configuration for a runtime environment.

      .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``efs``, ``fsx``. 

    
      - **efs** *(dict) --* 

        Defines the storage configuration for an Amazon EFS file system.

        

      
        - **fileSystemId** *(string) --* **[REQUIRED]** 

          The file system identifier.

          

        
        - **mountPoint** *(string) --* **[REQUIRED]** 

          The mount point for the file system.

          

        
      
      - **fsx** *(dict) --* 

        Defines the storage configuration for an Amazon FSx file system.

        

      
        - **fileSystemId** *(string) --* **[REQUIRED]** 

          The file system identifier.

          

        
        - **mountPoint** *(string) --* **[REQUIRED]** 

          The mount point for the file system.

          

        
      
    

  :type subnetIds: list
  :param subnetIds: 

    The list of subnets associated with the VPC for this runtime environment.

    

  
    - *(string) --* 

    

  :type tags: dict
  :param tags: 

    The tags for the runtime environment.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'environmentId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **environmentId** *(string) --* 

        The unique identifier of the runtime environment.

        
  
  **Exceptions**
  
  *   :py:class:`MainframeModernization.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`MainframeModernization.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MainframeModernization.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`MainframeModernization.Client.exceptions.ConflictException`

  
  *   :py:class:`MainframeModernization.Client.exceptions.ValidationException`

  
  *   :py:class:`MainframeModernization.Client.exceptions.InternalServerException`

  