:doc:`SimSpaceWeaver <../../simspaceweaver>` / Client / start_simulation

****************
start_simulation
****************



.. py:method:: SimSpaceWeaver.Client.start_simulation(**kwargs)

  

  Starts a simulation with the given name. You must choose to start your simulation from a schema or from a snapshot. For more information about the schema, see the `schema reference <https://docs.aws.amazon.com/simspaceweaver/latest/userguide/schema-reference.html>`__ in the *SimSpace Weaver User Guide*. For more information about snapshots, see `Snapshots <https://docs.aws.amazon.com/simspaceweaver/latest/userguide/working-with_snapshots.html>`__ in the *SimSpace Weaver User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/simspaceweaver-2022-10-28/StartSimulation>`_  


  **Request Syntax**
  ::

    response = client.start_simulation(
        ClientToken='string',
        Description='string',
        MaximumDuration='string',
        Name='string',
        RoleArn='string',
        SchemaS3Location={
            'BucketName': 'string',
            'ObjectKey': 'string'
        },
        SnapshotS3Location={
            'BucketName': 'string',
            'ObjectKey': 'string'
        },
        Tags={
            'string': 'string'
        }
    )
    
  :type ClientToken: string
  :param ClientToken: 

    A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A ``ClientToken`` is also known as an *idempotency token*. A ``ClientToken`` expires after 24 hours.

    This field is autopopulated if not provided.

  
  :type Description: string
  :param Description: 

    The description of the simulation.

    

  
  :type MaximumDuration: string
  :param MaximumDuration: 

    The maximum running time of the simulation, specified as a number of minutes (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit. The maximum value is ``14D``, or its equivalent in the other units. The default value is ``14D``. A value equivalent to ``0`` makes the simulation immediately transition to ``Stopping`` as soon as it reaches ``Started``.

    

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

    The name of the simulation.

    

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

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference*. For more information about IAM roles, see `IAM roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html>`__ in the *Identity and Access Management User Guide*.

    

  
  :type SchemaS3Location: dict
  :param SchemaS3Location: 

    The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the `Amazon Simple Storage Service User Guide <https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html>`__.

     

    Provide a ``SchemaS3Location`` to start your simulation from a schema.

     

    If you provide a ``SchemaS3Location`` then you can't provide a ``SnapshotS3Location``.

    

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

      The name of an Amazon S3 bucket. For more information about buckets, see `Creating, configuring, and working with Amazon S3 buckets <https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html>`__ in the *Amazon Simple Storage Service User Guide*.

      

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

      The key name of an object in Amazon S3. For more information about Amazon S3 objects and object keys, see `Uploading, downloading, and working with objects in Amazon S3 <https://docs.aws.amazon.com/AmazonS3/latest/userguide/uploading-downloading-objects.html>`__ in the *Amazon Simple Storage Service User Guide*.

      

    
  
  :type SnapshotS3Location: dict
  :param SnapshotS3Location: 

    The location of the snapshot .zip file in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the `Amazon Simple Storage Service User Guide <https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html>`__.

     

    Provide a ``SnapshotS3Location`` to start your simulation from a snapshot.

     

    The Amazon S3 bucket must be in the same Amazon Web Services Region as the simulation.

     

    If you provide a ``SnapshotS3Location`` then you can't provide a ``SchemaS3Location``.

    

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

      The name of an Amazon S3 bucket. For more information about buckets, see `Creating, configuring, and working with Amazon S3 buckets <https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html>`__ in the *Amazon Simple Storage Service User Guide*.

      

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

      The key name of an object in Amazon S3. For more information about Amazon S3 objects and object keys, see `Uploading, downloading, and working with objects in Amazon S3 <https://docs.aws.amazon.com/AmazonS3/latest/userguide/uploading-downloading-objects.html>`__ in the *Amazon Simple Storage Service User Guide*.

      

    
  
  :type Tags: dict
  :param Tags: 

    A list of tags for the simulation. For more information about tags, see `Tagging Amazon Web Services resources <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html>`__ in the *Amazon Web Services General Reference*.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Arn': 'string',
          'CreationTime': datetime(2015, 1, 1),
          'ExecutionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the simulation. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference*.

        
      

      - **CreationTime** *(datetime) --* 

        The time when the simulation was created, expressed as the number of seconds and milliseconds in UTC since the Unix epoch (0:0:0.000, January 1, 1970).

        
      

      - **ExecutionId** *(string) --* 

        A universally unique identifier (UUID) for this simulation.

        
  
  **Exceptions**
  
  *   :py:class:`SimSpaceWeaver.Client.exceptions.InternalServerException`

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

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

  
  *   :py:class:`SimSpaceWeaver.Client.exceptions.ServiceQuotaExceededException`

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

  