CodeStarconnections / Client / get_resource_sync_status

get_resource_sync_status#

CodeStarconnections.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

Request Syntax

response = client.get_resource_sync_status(
    ResourceName='string',
    SyncType='CFN_STACK_SYNC'
)
Parameters:
  • ResourceName (string) –

    [REQUIRED]

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

  • SyncType (string) –

    [REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'DesiredState': {
        'Branch': 'string',
        'Directory': 'string',
        'OwnerId': 'string',
        'RepositoryName': 'string',
        'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab',
        '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',
            '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',
            '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',
            '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',
            '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

  • CodeStarconnections.Client.exceptions.AccessDeniedException

  • CodeStarconnections.Client.exceptions.InternalServerException

  • CodeStarconnections.Client.exceptions.InvalidInputException

  • CodeStarconnections.Client.exceptions.ResourceNotFoundException

  • CodeStarconnections.Client.exceptions.ThrottlingException