Skip to content

aws.codeconnections.get_resource_sync_status

Example SQL Queries

SELECT * FROM
aws.codeconnections.get_resource_sync_status
WHERE
"resource_name" = 'VALUE'
AND "sync_type" = 'VALUE';

Description

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

Table Definition

Column NameColumn Data Type
resource_name Required Input Column

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

VARCHAR
sync_type Required Input Column

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

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

desired_state

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

STRUCT(
"branch" VARCHAR,
"directory" VARCHAR,
"owner_id" VARCHAR,
"repository_name" VARCHAR,
"provider_type" VARCHAR,
"sha" VARCHAR
)
Show child fields
desired_state.branch

The branch name for a specific revision.

desired_state.directory

The directory, if any, for a specific revision.

desired_state.owner_id

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

desired_state.provider_type

The provider type for a revision, such as GitHub.

desired_state.repository_name

The repository name for a specific revision.

desired_state.sha

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

latest_successful_sync

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

STRUCT(
"events" STRUCT(
"event" VARCHAR,
"external_id" VARCHAR,
"time" TIMESTAMP_S,
"type" VARCHAR
)[],
"initial_revision" STRUCT(
"branch" VARCHAR,
"directory" VARCHAR,
"owner_id" VARCHAR,
"repository_name" VARCHAR,
"provider_type" VARCHAR,
"sha" VARCHAR
),
"started_at" TIMESTAMP_S,
"status" VARCHAR,
"target_revision" STRUCT(
"branch" VARCHAR,
"directory" VARCHAR,
"owner_id" VARCHAR,
"repository_name" VARCHAR,
"provider_type" VARCHAR,
"sha" VARCHAR
),
"target" VARCHAR
)
Show child fields
latest_successful_sync.events[]
Show child fields
latest_successful_sync.events[].event

The event for a resource sync event.

latest_successful_sync.events[].external_id

The ID for a resource sync event.

latest_successful_sync.events[].time

The time that a resource sync event occurred.

latest_successful_sync.events[].type

The type of resource sync event.

latest_successful_sync.initial_revision

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

Show child fields
latest_successful_sync.initial_revision.branch

The branch name for a specific revision.

latest_successful_sync.initial_revision.directory

The directory, if any, for a specific revision.

latest_successful_sync.initial_revision.owner_id

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

latest_successful_sync.initial_revision.provider_type

The provider type for a revision, such as GitHub.

latest_successful_sync.initial_revision.repository_name

The repository name for a specific revision.

latest_successful_sync.initial_revision.sha

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

latest_successful_sync.started_at

The start time for a resource sync attempt.

latest_successful_sync.status

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.

latest_successful_sync.target

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

latest_successful_sync.target_revision

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.

Show child fields
latest_successful_sync.target_revision.branch

The branch name for a specific revision.

latest_successful_sync.target_revision.directory

The directory, if any, for a specific revision.

latest_successful_sync.target_revision.owner_id

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

latest_successful_sync.target_revision.provider_type

The provider type for a revision, such as GitHub.

latest_successful_sync.target_revision.repository_name

The repository name for a specific revision.

latest_successful_sync.target_revision.sha

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

latest_sync

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

STRUCT(
"events" STRUCT(
"event" VARCHAR,
"external_id" VARCHAR,
"time" TIMESTAMP_S,
"type" VARCHAR
)[],
"initial_revision" STRUCT(
"branch" VARCHAR,
"directory" VARCHAR,
"owner_id" VARCHAR,
"repository_name" VARCHAR,
"provider_type" VARCHAR,
"sha" VARCHAR
),
"started_at" TIMESTAMP_S,
"status" VARCHAR,
"target_revision" STRUCT(
"branch" VARCHAR,
"directory" VARCHAR,
"owner_id" VARCHAR,
"repository_name" VARCHAR,
"provider_type" VARCHAR,
"sha" VARCHAR
),
"target" VARCHAR
)
Show child fields
latest_sync.events[]
Show child fields
latest_sync.events[].event

The event for a resource sync event.

latest_sync.events[].external_id

The ID for a resource sync event.

latest_sync.events[].time

The time that a resource sync event occurred.

latest_sync.events[].type

The type of resource sync event.

latest_sync.initial_revision

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

Show child fields
latest_sync.initial_revision.branch

The branch name for a specific revision.

latest_sync.initial_revision.directory

The directory, if any, for a specific revision.

latest_sync.initial_revision.owner_id

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

latest_sync.initial_revision.provider_type

The provider type for a revision, such as GitHub.

latest_sync.initial_revision.repository_name

The repository name for a specific revision.

latest_sync.initial_revision.sha

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

latest_sync.started_at

The start time for a resource sync attempt.

latest_sync.status

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.

latest_sync.target

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

latest_sync.target_revision

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.

Show child fields
latest_sync.target_revision.branch

The branch name for a specific revision.

latest_sync.target_revision.directory

The directory, if any, for a specific revision.

latest_sync.target_revision.owner_id

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

latest_sync.target_revision.provider_type

The provider type for a revision, such as GitHub.

latest_sync.target_revision.repository_name

The repository name for a specific revision.

latest_sync.target_revision.sha

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