:doc:`CodeArtifact <../../codeartifact>` / Client / create_package_group

********************
create_package_group
********************



.. py:method:: CodeArtifact.Client.create_package_group(**kwargs)

  

  Creates a package group. For more information about creating package groups, including example CLI commands, see `Create a package group <https://docs.aws.amazon.com/codeartifact/latest/ug/create-package-group.html>`__ in the *CodeArtifact User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/CreatePackageGroup>`_  


  **Request Syntax**
  ::

    response = client.create_package_group(
        domain='string',
        domainOwner='string',
        packageGroup='string',
        contactInfo='string',
        description='string',
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type domain: string
  :param domain: **[REQUIRED]** 

    The name of the domain in which you want to create a package group.

    

  
  :type domainOwner: string
  :param domainOwner: 

    The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

    

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

    The pattern of the package group to create. The pattern is also the identifier of the package group.

    

  
  :type contactInfo: string
  :param contactInfo: 

    The contact information for the created package group.

    

  
  :type description: string
  :param description: 

    A description of the package group.

    

  
  :type tags: list
  :param tags: 

    One or more tag key-value pairs for the package group.

    

  
    - *(dict) --* 

      A tag is a key-value pair that can be used to manage, search for, or filter resources in CodeArtifact.

      

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

        The tag key.

        

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

        The tag value.

        

      
    

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

    
    ::

      {
          'packageGroup': {
              'arn': 'string',
              'pattern': 'string',
              'domainName': 'string',
              'domainOwner': 'string',
              'createdTime': datetime(2015, 1, 1),
              'contactInfo': 'string',
              'description': 'string',
              'originConfiguration': {
                  'restrictions': {
                      'string': {
                          'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                          'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                          'inheritedFrom': {
                              'arn': 'string',
                              'pattern': 'string'
                          },
                          'repositoriesCount': 123
                      }
                  }
              },
              'parent': {
                  'arn': 'string',
                  'pattern': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **packageGroup** *(dict) --* 

        Information about the created package group after processing the request.

        
        

        - **arn** *(string) --* 

          The ARN of the package group.

          
        

        - **pattern** *(string) --* 

          The pattern of the package group. The pattern determines which packages are associated with the package group.

          
        

        - **domainName** *(string) --* 

          The name of the domain that contains the package group.

          
        

        - **domainOwner** *(string) --* 

          The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

          
        

        - **createdTime** *(datetime) --* 

          A timestamp that represents the date and time the package group was created.

          
        

        - **contactInfo** *(string) --* 

          The contact information of the package group.

          
        

        - **description** *(string) --* 

          The description of the package group.

          
        

        - **originConfiguration** *(dict) --* 

          The package group origin configuration that determines how package versions can enter repositories.

          
          

          - **restrictions** *(dict) --* 

            The origin configuration settings that determine how package versions can enter repositories.

            
            

            - *(string) --* 
              

              - *(dict) --* 

                Contains information about the configured restrictions of the origin controls of a package group.

                
                

                - **mode** *(string) --* 

                  The package group origin restriction setting. If the value of ``mode`` is ``ALLOW``, ``ALLOW_SPECIFIC_REPOSITORIES``, or ``BLOCK``, then the value of ``effectiveMode`` is the same. Otherwise, when the value is ``INHERIT``, then the value of ``effectiveMode`` is the value of ``mode`` of the first parent group which does not have a value of ``INHERIT``.

                  
                

                - **effectiveMode** *(string) --* 

                  The effective package group origin restriction setting. If the value of ``mode`` is ``ALLOW``, ``ALLOW_SPECIFIC_REPOSITORIES``, or ``BLOCK``, then the value of ``effectiveMode`` is the same. Otherwise, when the value of ``mode`` is ``INHERIT``, then the value of ``effectiveMode`` is the value of ``mode`` of the first parent group which does not have a value of ``INHERIT``.

                  
                

                - **inheritedFrom** *(dict) --* 

                  The parent package group that the package group origin restrictions are inherited from.

                  
                  

                  - **arn** *(string) --* 

                    The ARN of the package group.

                    
                  

                  - **pattern** *(string) --* 

                    The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

                    
              
                

                - **repositoriesCount** *(integer) --* 

                  The number of repositories in the allowed repository list.

                  
            
        
      
      
        

        - **parent** *(dict) --* 

          The direct parent package group of the package group.

          
          

          - **arn** *(string) --* 

            The ARN of the package group.

            
          

          - **pattern** *(string) --* 

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`CodeArtifact.Client.exceptions.AccessDeniedException`

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

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

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

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

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

  
  *   :py:class:`CodeArtifact.Client.exceptions.ResourceNotFoundException`

  