:doc:`Greengrass <../../greengrass>` / Client / create_group

************
create_group
************



.. py:method:: Greengrass.Client.create_group(**kwargs)

  Creates a group. You may provide the initial version of the group or use ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or command-line application to create and deploy Greengrass groups.

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroup>`_  


  **Request Syntax**
  ::

    response = client.create_group(
        AmznClientToken='string',
        InitialVersion={
            'ConnectorDefinitionVersionArn': 'string',
            'CoreDefinitionVersionArn': 'string',
            'DeviceDefinitionVersionArn': 'string',
            'FunctionDefinitionVersionArn': 'string',
            'LoggerDefinitionVersionArn': 'string',
            'ResourceDefinitionVersionArn': 'string',
            'SubscriptionDefinitionVersionArn': 'string'
        },
        Name='string',
        tags={
            'string': 'string'
        }
    )
    
  :type AmznClientToken: string
  :param AmznClientToken: A client token used to correlate requests and responses.

  
  :type InitialVersion: dict
  :param InitialVersion: Information about the initial version of the group.

  
    - **ConnectorDefinitionVersionArn** *(string) --* The ARN of the connector definition version for this group.

    
    - **CoreDefinitionVersionArn** *(string) --* The ARN of the core definition version for this group.

    
    - **DeviceDefinitionVersionArn** *(string) --* The ARN of the device definition version for this group.

    
    - **FunctionDefinitionVersionArn** *(string) --* The ARN of the function definition version for this group.

    
    - **LoggerDefinitionVersionArn** *(string) --* The ARN of the logger definition version for this group.

    
    - **ResourceDefinitionVersionArn** *(string) --* The ARN of the resource definition version for this group.

    
    - **SubscriptionDefinitionVersionArn** *(string) --* The ARN of the subscription definition version for this group.

    
  
  :type Name: string
  :param Name: **[REQUIRED]** The name of the group.

  
  :type tags: dict
  :param tags: Tag(s) to add to the new resource.

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Arn': 'string',
          'CreationTimestamp': 'string',
          'Id': 'string',
          'LastUpdatedTimestamp': 'string',
          'LatestVersion': 'string',
          'LatestVersionArn': 'string',
          'Name': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* Success. The group was created.
      

      - **Arn** *(string) --* The ARN of the definition.
      

      - **CreationTimestamp** *(string) --* The time, in milliseconds since the epoch, when the definition was created.
      

      - **Id** *(string) --* The ID of the definition.
      

      - **LastUpdatedTimestamp** *(string) --* The time, in milliseconds since the epoch, when the definition was last updated.
      

      - **LatestVersion** *(string) --* The ID of the latest version associated with the definition.
      

      - **LatestVersionArn** *(string) --* The ARN of the latest version associated with the definition.
      

      - **Name** *(string) --* The name of the definition.
  
  **Exceptions**
  
  *   :py:class:`Greengrass.Client.exceptions.BadRequestException`

  