:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / update_protect_configuration_country_rule_set

*********************************************
update_protect_configuration_country_rule_set
*********************************************



.. py:method:: PinpointSMSVoiceV2.Client.update_protect_configuration_country_rule_set(**kwargs)

  

  Update a country rule set to ``ALLOW``, ``BLOCK``, ``MONITOR``, or ``FILTER`` messages to be sent to the specified destination counties. You can update one or multiple countries at a time. The updates are only applied to the specified NumberCapability type.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/UpdateProtectConfigurationCountryRuleSet>`_  


  **Request Syntax**
  ::

    response = client.update_protect_configuration_country_rule_set(
        ProtectConfigurationId='string',
        NumberCapability='SMS'|'VOICE'|'MMS',
        CountryRuleSetUpdates={
            'string': {
                'ProtectStatus': 'ALLOW'|'BLOCK'|'MONITOR'|'FILTER'
            }
        }
    )
    
  :type ProtectConfigurationId: string
  :param ProtectConfigurationId: **[REQUIRED]** 

    The unique identifier for the protect configuration.

    

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

    The number capability to apply the CountryRuleSetUpdates updates to.

    

  
  :type CountryRuleSetUpdates: dict
  :param CountryRuleSetUpdates: **[REQUIRED]** 

    A map of ProtectConfigurationCountryRuleSetInformation objects that contain the details for the requested NumberCapability. The Key is the two-letter ISO country code. For a list of supported ISO country codes, see `Supported countries and regions (SMS channel) <https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html>`__ in the End User Messaging SMS User Guide.

     

    For example, to set the United States as allowed and Canada as blocked, the ``CountryRuleSetUpdates`` would be formatted as: ``"CountryRuleSetUpdates": { "US" : { "ProtectStatus": "ALLOW" } "CA" : { "ProtectStatus": "BLOCK" } }``

    

  
    - *(string) --* 

    
      - *(dict) --* 

        The types of statuses that can be used.

        

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

          The types of protection that can be used.

          

        
      


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

    
    ::

      {
          'ProtectConfigurationArn': 'string',
          'ProtectConfigurationId': 'string',
          'NumberCapability': 'SMS'|'VOICE'|'MMS',
          'CountryRuleSet': {
              'string': {
                  'ProtectStatus': 'ALLOW'|'BLOCK'|'MONITOR'|'FILTER'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ProtectConfigurationArn** *(string) --* 

        The Amazon Resource Name (ARN) of the protect configuration.

        
      

      - **ProtectConfigurationId** *(string) --* 

        The unique identifier for the protect configuration.

        
      

      - **NumberCapability** *(string) --* 

        The number capability that was updated

        
      

      - **CountryRuleSet** *(dict) --* 

        An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            The types of statuses that can be used.

            
            

            - **ProtectStatus** *(string) --* 

              The types of protection that can be used.

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

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

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

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

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

  