:doc:`CodeConnections <../../codeconnections>` / Client / get_resource_sync_status

************************
get_resource_sync_status
************************



.. py:method:: CodeConnections.Client.get_resource_sync_status(**kwargs)

  

  Returns the status of the sync with the Git repository for a specific Amazon Web Services resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeconnections-2023-12-01/GetResourceSyncStatus>`_  


  **Request Syntax**
  ::

    response = client.get_resource_sync_status(
        ResourceName='string',
        SyncType='CFN_STACK_SYNC'
    )
    
  :type ResourceName: string
  :param ResourceName: **[REQUIRED]** 

    The name of the Amazon Web Services resource for the sync status with the Git repository.

    

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

    The sync type for the sync status with the Git repository.

    

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

    
    ::

      {
          'DesiredState': {
              'Branch': 'string',
              'Directory': 'string',
              'OwnerId': 'string',
              'RepositoryName': 'string',
              'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged'|'AzureDevOps',
              'Sha': 'string'
          },
          'LatestSuccessfulSync': {
              'Events': [
                  {
                      'Event': 'string',
                      'ExternalId': 'string',
                      'Time': datetime(2015, 1, 1),
                      'Type': 'string'
                  },
              ],
              'InitialRevision': {
                  'Branch': 'string',
                  'Directory': 'string',
                  'OwnerId': 'string',
                  'RepositoryName': 'string',
                  'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged'|'AzureDevOps',
                  'Sha': 'string'
              },
              'StartedAt': datetime(2015, 1, 1),
              'Status': 'FAILED'|'INITIATED'|'IN_PROGRESS'|'SUCCEEDED',
              'TargetRevision': {
                  'Branch': 'string',
                  'Directory': 'string',
                  'OwnerId': 'string',
                  'RepositoryName': 'string',
                  'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged'|'AzureDevOps',
                  'Sha': 'string'
              },
              'Target': 'string'
          },
          'LatestSync': {
              'Events': [
                  {
                      'Event': 'string',
                      'ExternalId': 'string',
                      'Time': datetime(2015, 1, 1),
                      'Type': 'string'
                  },
              ],
              'InitialRevision': {
                  'Branch': 'string',
                  'Directory': 'string',
                  'OwnerId': 'string',
                  'RepositoryName': 'string',
                  'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged'|'AzureDevOps',
                  'Sha': 'string'
              },
              'StartedAt': datetime(2015, 1, 1),
              'Status': 'FAILED'|'INITIATED'|'IN_PROGRESS'|'SUCCEEDED',
              'TargetRevision': {
                  'Branch': 'string',
                  'Directory': 'string',
                  'OwnerId': 'string',
                  'RepositoryName': 'string',
                  'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged'|'AzureDevOps',
                  'Sha': 'string'
              },
              'Target': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DesiredState** *(dict) --* 

        The desired state of the Amazon Web Services resource for the sync status with the Git repository.

        
        

        - **Branch** *(string) --* 

          The branch name for a specific revision.

          
        

        - **Directory** *(string) --* 

          The directory, if any, for a specific revision.

          
        

        - **OwnerId** *(string) --* 

          The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.

          
        

        - **RepositoryName** *(string) --* 

          The repository name for a specific revision.

          
        

        - **ProviderType** *(string) --* 

          The provider type for a revision, such as GitHub.

          
        

        - **Sha** *(string) --* 

          The SHA, such as the commit ID, for a specific revision.

          
    
      

      - **LatestSuccessfulSync** *(dict) --* 

        The latest successful sync for the sync status with the Git repository.

        
        

        - **Events** *(list) --* 

          The events related to a resource sync attempt.

          
          

          - *(dict) --* 

            Information about a resource sync event for the resource associated with a sync configuration.

            
            

            - **Event** *(string) --* 

              The event for a resource sync event.

              
            

            - **ExternalId** *(string) --* 

              The ID for a resource sync event.

              
            

            - **Time** *(datetime) --* 

              The time that a resource sync event occurred.

              
            

            - **Type** *(string) --* 

              The type of resource sync event.

              
        
      
        

        - **InitialRevision** *(dict) --* 

          The current state of the resource as defined in the resource's ``config-file`` in the linked repository.

          
          

          - **Branch** *(string) --* 

            The branch name for a specific revision.

            
          

          - **Directory** *(string) --* 

            The directory, if any, for a specific revision.

            
          

          - **OwnerId** *(string) --* 

            The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.

            
          

          - **RepositoryName** *(string) --* 

            The repository name for a specific revision.

            
          

          - **ProviderType** *(string) --* 

            The provider type for a revision, such as GitHub.

            
          

          - **Sha** *(string) --* 

            The SHA, such as the commit ID, for a specific revision.

            
      
        

        - **StartedAt** *(datetime) --* 

          The start time for a resource sync attempt.

          
        

        - **Status** *(string) --* 

          The status for a resource sync attempt. The follow are valid statuses:

           

          
          * SYNC-INITIATED - A resource sync attempt has been created and will begin soon.
           
          * SYNCING - Syncing has started and work is being done to reconcile state.
           
          * SYNCED - Syncing has completed successfully.
           
          * SYNC_FAILED - A resource sync attempt has failed.
          

          
        

        - **TargetRevision** *(dict) --* 

          The desired state of the resource as defined in the resource's ``config-file`` in the linked repository. Git sync attempts to update the resource to this state.

          
          

          - **Branch** *(string) --* 

            The branch name for a specific revision.

            
          

          - **Directory** *(string) --* 

            The directory, if any, for a specific revision.

            
          

          - **OwnerId** *(string) --* 

            The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.

            
          

          - **RepositoryName** *(string) --* 

            The repository name for a specific revision.

            
          

          - **ProviderType** *(string) --* 

            The provider type for a revision, such as GitHub.

            
          

          - **Sha** *(string) --* 

            The SHA, such as the commit ID, for a specific revision.

            
      
        

        - **Target** *(string) --* 

          The name of the Amazon Web Services resource that is attempted to be synchronized.

          
    
      

      - **LatestSync** *(dict) --* 

        The latest sync for the sync status with the Git repository, whether successful or not.

        
        

        - **Events** *(list) --* 

          The events related to a resource sync attempt.

          
          

          - *(dict) --* 

            Information about a resource sync event for the resource associated with a sync configuration.

            
            

            - **Event** *(string) --* 

              The event for a resource sync event.

              
            

            - **ExternalId** *(string) --* 

              The ID for a resource sync event.

              
            

            - **Time** *(datetime) --* 

              The time that a resource sync event occurred.

              
            

            - **Type** *(string) --* 

              The type of resource sync event.

              
        
      
        

        - **InitialRevision** *(dict) --* 

          The current state of the resource as defined in the resource's ``config-file`` in the linked repository.

          
          

          - **Branch** *(string) --* 

            The branch name for a specific revision.

            
          

          - **Directory** *(string) --* 

            The directory, if any, for a specific revision.

            
          

          - **OwnerId** *(string) --* 

            The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.

            
          

          - **RepositoryName** *(string) --* 

            The repository name for a specific revision.

            
          

          - **ProviderType** *(string) --* 

            The provider type for a revision, such as GitHub.

            
          

          - **Sha** *(string) --* 

            The SHA, such as the commit ID, for a specific revision.

            
      
        

        - **StartedAt** *(datetime) --* 

          The start time for a resource sync attempt.

          
        

        - **Status** *(string) --* 

          The status for a resource sync attempt. The follow are valid statuses:

           

          
          * SYNC-INITIATED - A resource sync attempt has been created and will begin soon.
           
          * SYNCING - Syncing has started and work is being done to reconcile state.
           
          * SYNCED - Syncing has completed successfully.
           
          * SYNC_FAILED - A resource sync attempt has failed.
          

          
        

        - **TargetRevision** *(dict) --* 

          The desired state of the resource as defined in the resource's ``config-file`` in the linked repository. Git sync attempts to update the resource to this state.

          
          

          - **Branch** *(string) --* 

            The branch name for a specific revision.

            
          

          - **Directory** *(string) --* 

            The directory, if any, for a specific revision.

            
          

          - **OwnerId** *(string) --* 

            The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.

            
          

          - **RepositoryName** *(string) --* 

            The repository name for a specific revision.

            
          

          - **ProviderType** *(string) --* 

            The provider type for a revision, such as GitHub.

            
          

          - **Sha** *(string) --* 

            The SHA, such as the commit ID, for a specific revision.

            
      
        

        - **Target** *(string) --* 

          The name of the Amazon Web Services resource that is attempted to be synchronized.

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

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

  
  *   :py:class:`CodeConnections.Client.exceptions.InvalidInputException`

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

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

  