:doc:`CleanRoomsService <../../cleanrooms>` / Client / update_membership

*****************
update_membership
*****************



.. py:method:: CleanRoomsService.Client.update_membership(**kwargs)

  

  Updates a membership.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cleanrooms-2022-02-17/UpdateMembership>`_  


  **Request Syntax**
  ::

    response = client.update_membership(
        membershipIdentifier='string',
        queryLogStatus='ENABLED'|'DISABLED',
        jobLogStatus='ENABLED'|'DISABLED',
        defaultResultConfiguration={
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string',
                    'singleFileOutput': True|False
                }
            },
            'roleArn': 'string'
        },
        defaultJobResultConfiguration={
            'outputConfiguration': {
                's3': {
                    'bucket': 'string',
                    'keyPrefix': 'string'
                }
            },
            'roleArn': 'string'
        }
    )
    
  :type membershipIdentifier: string
  :param membershipIdentifier: **[REQUIRED]** 

    The unique identifier of the membership.

    

  
  :type queryLogStatus: string
  :param queryLogStatus: 

    An indicator as to whether query logging has been enabled or disabled for the membership.

     

    When ``ENABLED``, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is ``DISABLED``.

    

  
  :type jobLogStatus: string
  :param jobLogStatus: 

    An indicator as to whether job logging has been enabled or disabled for the collaboration.

     

    When ``ENABLED``, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is ``DISABLED``.

    

  
  :type defaultResultConfiguration: dict
  :param defaultResultConfiguration: 

    The default protected query result configuration as specified by the member who can receive results.

    

  
    - **outputConfiguration** *(dict) --* **[REQUIRED]** 

      Configuration for protected query results.

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

    
      - **s3** *(dict) --* 

        Contains the configuration to write the query results to S3.

        

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

          Intended file format of the result.

          

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

          The S3 bucket to unload the protected query results.

          

        
        - **keyPrefix** *(string) --* 

          The S3 prefix to unload the protected query results.

          

        
        - **singleFileOutput** *(boolean) --* 

          Indicates whether files should be output as a single file ( ``TRUE``) or output as multiple files ( ``FALSE``). This parameter is only supported for analyses with the Spark analytics engine.

          

        
      
    
    - **roleArn** *(string) --* 

      The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

      

    
  
  :type defaultJobResultConfiguration: dict
  :param defaultJobResultConfiguration: 

    The default job result configuration.

    

  
    - **outputConfiguration** *(dict) --* **[REQUIRED]** 

      The output configuration for a protected job result.

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

    
      - **s3** *(dict) --* 

        Contains the configuration to write the job results to S3.

        

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

          The S3 bucket for job output.

          

        
        - **keyPrefix** *(string) --* 

          The S3 prefix to unload the protected job results.

          

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

      The unique ARN for an IAM role that is used by Clean Rooms to write protected job results to the result location, given by the member who can receive results.

      

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

    
    ::

      {
          'membership': {
              'id': 'string',
              'arn': 'string',
              'collaborationArn': 'string',
              'collaborationId': 'string',
              'collaborationCreatorAccountId': 'string',
              'collaborationCreatorDisplayName': 'string',
              'collaborationName': 'string',
              'createTime': datetime(2015, 1, 1),
              'updateTime': datetime(2015, 1, 1),
              'status': 'ACTIVE'|'REMOVED'|'COLLABORATION_DELETED',
              'memberAbilities': [
                  'CAN_QUERY'|'CAN_RECEIVE_RESULTS'|'CAN_RUN_JOB',
              ],
              'mlMemberAbilities': {
                  'customMLMemberAbilities': [
                      'CAN_RECEIVE_MODEL_OUTPUT'|'CAN_RECEIVE_INFERENCE_OUTPUT',
                  ]
              },
              'queryLogStatus': 'ENABLED'|'DISABLED',
              'jobLogStatus': 'ENABLED'|'DISABLED',
              'defaultResultConfiguration': {
                  'outputConfiguration': {
                      's3': {
                          'resultFormat': 'CSV'|'PARQUET',
                          'bucket': 'string',
                          'keyPrefix': 'string',
                          'singleFileOutput': True|False
                      }
                  },
                  'roleArn': 'string'
              },
              'defaultJobResultConfiguration': {
                  'outputConfiguration': {
                      's3': {
                          'bucket': 'string',
                          'keyPrefix': 'string'
                      }
                  },
                  'roleArn': 'string'
              },
              'paymentConfiguration': {
                  'queryCompute': {
                      'isResponsible': True|False
                  },
                  'machineLearning': {
                      'modelTraining': {
                          'isResponsible': True|False
                      },
                      'modelInference': {
                          'isResponsible': True|False
                      },
                      'syntheticDataGeneration': {
                          'isResponsible': True|False
                      }
                  },
                  'jobCompute': {
                      'isResponsible': True|False
                  }
              },
              'isMetricsEnabled': True|False
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **membership** *(dict) --* 

        The membership object.

        
        

        - **id** *(string) --* 

          The unique ID of the membership.

          
        

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

          The unique ARN for the membership.

          
        

        - **collaborationArn** *(string) --* 

          The unique ARN for the membership's associated collaboration.

          
        

        - **collaborationId** *(string) --* 

          The unique ID for the membership's collaboration.

          
        

        - **collaborationCreatorAccountId** *(string) --* 

          The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.

          
        

        - **collaborationCreatorDisplayName** *(string) --* 

          The display name of the collaboration creator.

          
        

        - **collaborationName** *(string) --* 

          The name of the membership's collaboration.

          
        

        - **createTime** *(datetime) --* 

          The time when the membership was created.

          
        

        - **updateTime** *(datetime) --* 

          The time the membership metadata was last updated.

          
        

        - **status** *(string) --* 

          The status of the membership.

          
        

        - **memberAbilities** *(list) --* 

          The abilities granted to the collaboration member.

          
          

          - *(string) --* 
      
        

        - **mlMemberAbilities** *(dict) --* 

          Specifies the ML member abilities that are granted to a collaboration member.

          
          

          - **customMLMemberAbilities** *(list) --* 

            The custom ML member abilities for a collaboration member.

            
            

            - *(string) --* 
        
      
        

        - **queryLogStatus** *(string) --* 

          An indicator as to whether query logging has been enabled or disabled for the membership.

           

          When ``ENABLED``, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is ``DISABLED``.

          
        

        - **jobLogStatus** *(string) --* 

          An indicator as to whether job logging has been enabled or disabled for the collaboration.

           

          When ``ENABLED``, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is ``DISABLED``.

          
        

        - **defaultResultConfiguration** *(dict) --* 

          The default protected query result configuration as specified by the member who can receive results.

          
          

          - **outputConfiguration** *(dict) --* 

            Configuration for protected query results.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``s3``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **s3** *(dict) --* 

              Contains the configuration to write the query results to S3.

              
              

              - **resultFormat** *(string) --* 

                Intended file format of the result.

                
              

              - **bucket** *(string) --* 

                The S3 bucket to unload the protected query results.

                
              

              - **keyPrefix** *(string) --* 

                The S3 prefix to unload the protected query results.

                
              

              - **singleFileOutput** *(boolean) --* 

                Indicates whether files should be output as a single file ( ``TRUE``) or output as multiple files ( ``FALSE``). This parameter is only supported for analyses with the Spark analytics engine.

                
          
        
          

          - **roleArn** *(string) --* 

            The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

            
      
        

        - **defaultJobResultConfiguration** *(dict) --* 

          The default job result configuration for the membership.

          
          

          - **outputConfiguration** *(dict) --* 

            The output configuration for a protected job result.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``s3``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **s3** *(dict) --* 

              Contains the configuration to write the job results to S3.

              
              

              - **bucket** *(string) --* 

                The S3 bucket for job output.

                
              

              - **keyPrefix** *(string) --* 

                The S3 prefix to unload the protected job results.

                
          
        
          

          - **roleArn** *(string) --* 

            The unique ARN for an IAM role that is used by Clean Rooms to write protected job results to the result location, given by the member who can receive results.

            
      
        

        - **paymentConfiguration** *(dict) --* 

          The payment responsibilities accepted by the collaboration member.

          
          

          - **queryCompute** *(dict) --* 

            The payment responsibilities accepted by the collaboration member for query compute costs.

            
            

            - **isResponsible** *(boolean) --* 

              Indicates whether the collaboration member has accepted to pay for query compute costs ( ``TRUE``) or has not accepted to pay for query compute costs ( ``FALSE``).

               

              If the collaboration creator has not specified anyone to pay for query compute costs, then the member who can query is the default payer.

               

              An error message is returned for the following reasons:

               

              
              * If you set the value to ``FALSE`` but you are responsible to pay for query compute costs.
               
              * If you set the value to ``TRUE`` but you are not responsible to pay for query compute costs.
              

              
        
          

          - **machineLearning** *(dict) --* 

            The payment responsibilities accepted by the collaboration member for machine learning costs.

            
            

            - **modelTraining** *(dict) --* 

              The payment responsibilities accepted by the member for model training.

              
              

              - **isResponsible** *(boolean) --* 

                Indicates whether the collaboration member has accepted to pay for model training costs ( ``TRUE``) or has not accepted to pay for model training costs ( ``FALSE``).

                 

                If the collaboration creator has not specified anyone to pay for model training costs, then the member who can query is the default payer.

                 

                An error message is returned for the following reasons:

                 

                
                * If you set the value to ``FALSE`` but you are responsible to pay for model training costs.
                 
                * If you set the value to ``TRUE`` but you are not responsible to pay for model training costs.
                

                
          
            

            - **modelInference** *(dict) --* 

              The payment responsibilities accepted by the member for model inference.

              
              

              - **isResponsible** *(boolean) --* 

                Indicates whether the collaboration member has accepted to pay for model inference costs ( ``TRUE``) or has not accepted to pay for model inference costs ( ``FALSE``).

                 

                If the collaboration creator has not specified anyone to pay for model inference costs, then the member who can query is the default payer.

                 

                An error message is returned for the following reasons:

                 

                
                * If you set the value to ``FALSE`` but you are responsible to pay for model inference costs.
                 
                * If you set the value to ``TRUE`` but you are not responsible to pay for model inference costs.
                

                
          
            

            - **syntheticDataGeneration** *(dict) --* 

              The payment configuration for synthetic data generation for this machine learning membership.

              
              

              - **isResponsible** *(boolean) --* 

                Indicates if this membership is responsible for paying for synthetic data generation.

                
          
        
          

          - **jobCompute** *(dict) --* 

            The payment responsibilities accepted by the collaboration member for job compute costs.

            
            

            - **isResponsible** *(boolean) --* 

              Indicates whether the collaboration member has accepted to pay for job compute costs ( ``TRUE``) or has not accepted to pay for query and job compute costs ( ``FALSE``).

               

              There is only one member who pays for queries and jobs.

               

              An error message is returned for the following reasons:

               

              
              * If you set the value to ``FALSE`` but you are responsible to pay for query and job compute costs.
               
              * If you set the value to ``TRUE`` but you are not responsible to pay for query and job compute costs.
              

              
        
      
        

        - **isMetricsEnabled** *(boolean) --* 

          An indicator as to whether Amazon CloudWatch metrics are enabled for the membership.

           

          When ``true``, metrics about query execution are collected in Amazon CloudWatch.

          
    
  
  **Exceptions**
  
  *   :py:class:`CleanRoomsService.Client.exceptions.ConflictException`

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

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

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

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

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

  