:doc:`IoT <../../iot>` / Client / create_scheduled_audit

**********************
create_scheduled_audit
**********************



.. py:method:: IoT.Client.create_scheduled_audit(**kwargs)

  

  Creates a scheduled audit that is run at a specified time interval.

   

  Requires permission to access the `CreateScheduledAudit <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/CreateScheduledAudit>`_  


  **Request Syntax**
  ::

    response = client.create_scheduled_audit(
        frequency='DAILY'|'WEEKLY'|'BIWEEKLY'|'MONTHLY',
        dayOfMonth='string',
        dayOfWeek='SUN'|'MON'|'TUE'|'WED'|'THU'|'FRI'|'SAT',
        targetCheckNames=[
            'string',
        ],
        scheduledAuditName='string',
        tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type frequency: string
  :param frequency: **[REQUIRED]** 

    How often the scheduled audit takes place, either ``DAILY``, ``WEEKLY``, ``BIWEEKLY`` or ``MONTHLY``. The start time of each audit is determined by the system.

    

  
  :type dayOfMonth: string
  :param dayOfMonth: 

    The day of the month on which the scheduled audit takes place. This can be "1" through "31" or "LAST". This field is required if the "frequency" parameter is set to ``MONTHLY``. If days 29 to 31 are specified, and the month doesn't have that many days, the audit takes place on the ``LAST`` day of the month.

    

  
  :type dayOfWeek: string
  :param dayOfWeek: 

    The day of the week on which the scheduled audit takes place, either ``SUN``, ``MON``, ``TUE``, ``WED``, ``THU``, ``FRI``, or ``SAT``. This field is required if the ``frequency`` parameter is set to ``WEEKLY`` or ``BIWEEKLY``.

    

  
  :type targetCheckNames: list
  :param targetCheckNames: **[REQUIRED]** 

    Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use ``DescribeAccountAuditConfiguration`` to see the list of all checks, including those that are enabled or use ``UpdateAccountAuditConfiguration`` to select which checks are enabled.)

    

  
    - *(string) --* 

      An audit check name. Checks must be enabled for your account. (Use ``DescribeAccountAuditConfiguration`` to see the list of all checks, including those that are enabled or use ``UpdateAccountAuditConfiguration`` to select which checks are enabled.)

      

    

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

    The name you want to give to the scheduled audit. (Max. 128 chars)

    

  
  :type tags: list
  :param tags: 

    Metadata that can be used to manage the scheduled audit.

    

  
    - *(dict) --* 

      A set of key/value pairs that are used to manage the resource.

      

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

        The tag's key.

        

      
      - **Value** *(string) --* 

        The tag's value.

        

      
    

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

    
    ::

      {
          'scheduledAuditArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **scheduledAuditArn** *(string) --* 

        The ARN of the scheduled audit.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.ResourceAlreadyExistsException`

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

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoT.Client.exceptions.LimitExceededException`

  