:doc:`PrometheusService <../../amp>` / Client / put_rule_groups_namespace

*************************
put_rule_groups_namespace
*************************



.. py:method:: PrometheusService.Client.put_rule_groups_namespace(**kwargs)

  

  Updates an existing rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces.

   

  .. warning::

     

    The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes.

     

   

  Use this operation only to update existing rule groups namespaces. To create a new rule groups namespace, use ``CreateRuleGroupsNamespace``.

   

  You can't use this operation to add tags to an existing rule groups namespace. Instead, use ``TagResource``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutRuleGroupsNamespace>`_  


  **Request Syntax**
  ::

    response = client.put_rule_groups_namespace(
        workspaceId='string',
        name='string',
        data=b'bytes',
        clientToken='string'
    )
    
  :type workspaceId: string
  :param workspaceId: **[REQUIRED]** 

    The ID of the workspace where you are updating the rule groups namespace.

    

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

    The name of the rule groups namespace that you are updating.

    

  
  :type data: bytes
  :param data: **[REQUIRED]** 

    The new rules file to use in the namespace. A base64-encoded version of the YAML rule groups file.

     

    For details about the rule groups namespace structure, see `RuleGroupsNamespaceData <https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-RuleGroupsNamespaceData.html>`__.

    

  
  :type clientToken: string
  :param clientToken: 

    A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'name': 'string',
          'arn': 'string',
          'status': {
              'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
              'statusReason': 'string'
          },
          'tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a ``PutRuleGroupsNamespace`` operation.

      
      

      - **name** *(string) --* 

        The name of the rule groups namespace that was updated.

        
      

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

        The ARN of the rule groups namespace.

        
      

      - **status** *(dict) --* 

        A structure that includes the current status of the rule groups namespace.

        
        

        - **statusCode** *(string) --* 

          The current status of the namespace.

          
        

        - **statusReason** *(string) --* 

          The reason for the failure, if any.

          
    
      

      - **tags** *(dict) --* 

        The list of tag keys and values that are associated with the namespace.

        
        

        - *(string) --* 

          The key of the tag. Must not begin with ``aws:``.

          
          

          - *(string) --* 

            The value of the tag.

            
    
  
  
  **Exceptions**
  
  *   :py:class:`PrometheusService.Client.exceptions.ThrottlingException`

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

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

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

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

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

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

  