AWS CodeConnections

2024/09/19 - AWS CodeConnections - 4 updated api methods

Changes  This release adds the PullRequestComment field to CreateSyncConfiguration API input, UpdateSyncConfiguration API input, GetSyncConfiguration API output and ListSyncConfiguration API output

CreateSyncConfiguration (updated) Link ¶
Changes (request, response)
Request
{'PullRequestComment': 'ENABLED | DISABLED'}
Response
{'SyncConfiguration': {'PullRequestComment': 'ENABLED | DISABLED'}}

Creates a sync configuration which allows Amazon Web Services to sync content from a Git repository to update a specified Amazon Web Services resource. Parameters for the sync configuration are determined by the sync type.

See also: AWS API Documentation

Request Syntax

client.create_sync_configuration(
    Branch='string',
    ConfigFile='string',
    RepositoryLinkId='string',
    ResourceName='string',
    RoleArn='string',
    SyncType='CFN_STACK_SYNC',
    PublishDeploymentStatus='ENABLED'|'DISABLED',
    TriggerResourceUpdateOn='ANY_CHANGE'|'FILE_CHANGE',
    PullRequestComment='ENABLED'|'DISABLED'
)
type Branch

string

param Branch

[REQUIRED]

The branch in the repository from which changes will be synced.

type ConfigFile

string

param ConfigFile

[REQUIRED]

The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.

type RepositoryLinkId

string

param RepositoryLinkId

[REQUIRED]

The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

type ResourceName

string

param ResourceName

[REQUIRED]

The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.

type RoleArn

string

param RoleArn

[REQUIRED]

The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.

type SyncType

string

param SyncType

[REQUIRED]

The type of sync configuration.

type PublishDeploymentStatus

string

param PublishDeploymentStatus

Whether to enable or disable publishing of deployment status to source providers.

type TriggerResourceUpdateOn

string

param TriggerResourceUpdateOn

When to trigger Git sync to begin the stack update.

type PullRequestComment

string

param PullRequestComment

A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.

rtype

dict

returns

Response Syntax

{
    'SyncConfiguration': {
        'Branch': 'string',
        'ConfigFile': 'string',
        'OwnerId': 'string',
        'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged',
        'RepositoryLinkId': 'string',
        'RepositoryName': 'string',
        'ResourceName': 'string',
        'RoleArn': 'string',
        'SyncType': 'CFN_STACK_SYNC',
        'PublishDeploymentStatus': 'ENABLED'|'DISABLED',
        'TriggerResourceUpdateOn': 'ANY_CHANGE'|'FILE_CHANGE',
        'PullRequestComment': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    • SyncConfiguration (dict) --

      The created sync configuration for the connection. A sync configuration allows Amazon Web Services to sync content from a Git repository to update a specified Amazon Web Services resource.

      • Branch (string) --

        The branch associated with a specific sync configuration.

      • ConfigFile (string) --

        The file path to the configuration file associated with a specific sync configuration. The path should point to an actual file in the sync configurations linked repository.

      • OwnerId (string) --

        The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub.

      • ProviderType (string) --

        The connection provider type associated with a specific sync configuration, such as GitHub.

      • RepositoryLinkId (string) --

        The ID of the repository link associated with a specific sync configuration.

      • RepositoryName (string) --

        The name of the repository associated with a specific sync configuration.

      • ResourceName (string) --

        The name of the connection resource associated with a specific sync configuration.

      • RoleArn (string) --

        The Amazon Resource Name (ARN) of the IAM role associated with a specific sync configuration.

      • SyncType (string) --

        The type of sync for a specific sync configuration.

      • PublishDeploymentStatus (string) --

        Whether to enable or disable publishing of deployment status to source providers.

      • TriggerResourceUpdateOn (string) --

        When to trigger Git sync to begin the stack update.

      • PullRequestComment (string) --

        A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.

GetSyncConfiguration (updated) Link ¶
Changes (response)
{'SyncConfiguration': {'PullRequestComment': 'ENABLED | DISABLED'}}

Returns details about a sync configuration, including the sync type and resource name. A sync configuration allows the configuration to sync (push and pull) changes from the remote repository for a specified branch in a Git repository.

See also: AWS API Documentation

Request Syntax

client.get_sync_configuration(
    SyncType='CFN_STACK_SYNC',
    ResourceName='string'
)
type SyncType

string

param SyncType

[REQUIRED]

The sync type for the sync configuration for which you want to retrieve information.

type ResourceName

string

param ResourceName

[REQUIRED]

The name of the Amazon Web Services resource for the sync configuration for which you want to retrieve information.

rtype

dict

returns

Response Syntax

{
    'SyncConfiguration': {
        'Branch': 'string',
        'ConfigFile': 'string',
        'OwnerId': 'string',
        'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged',
        'RepositoryLinkId': 'string',
        'RepositoryName': 'string',
        'ResourceName': 'string',
        'RoleArn': 'string',
        'SyncType': 'CFN_STACK_SYNC',
        'PublishDeploymentStatus': 'ENABLED'|'DISABLED',
        'TriggerResourceUpdateOn': 'ANY_CHANGE'|'FILE_CHANGE',
        'PullRequestComment': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    • SyncConfiguration (dict) --

      The details about the sync configuration for which you want to retrieve information.

      • Branch (string) --

        The branch associated with a specific sync configuration.

      • ConfigFile (string) --

        The file path to the configuration file associated with a specific sync configuration. The path should point to an actual file in the sync configurations linked repository.

      • OwnerId (string) --

        The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub.

      • ProviderType (string) --

        The connection provider type associated with a specific sync configuration, such as GitHub.

      • RepositoryLinkId (string) --

        The ID of the repository link associated with a specific sync configuration.

      • RepositoryName (string) --

        The name of the repository associated with a specific sync configuration.

      • ResourceName (string) --

        The name of the connection resource associated with a specific sync configuration.

      • RoleArn (string) --

        The Amazon Resource Name (ARN) of the IAM role associated with a specific sync configuration.

      • SyncType (string) --

        The type of sync for a specific sync configuration.

      • PublishDeploymentStatus (string) --

        Whether to enable or disable publishing of deployment status to source providers.

      • TriggerResourceUpdateOn (string) --

        When to trigger Git sync to begin the stack update.

      • PullRequestComment (string) --

        A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.

ListSyncConfigurations (updated) Link ¶
Changes (response)
{'SyncConfigurations': {'PullRequestComment': 'ENABLED | DISABLED'}}

Returns a list of sync configurations for a specified repository.

See also: AWS API Documentation

Request Syntax

client.list_sync_configurations(
    MaxResults=123,
    NextToken='string',
    RepositoryLinkId='string',
    SyncType='CFN_STACK_SYNC'
)
type MaxResults

integer

param MaxResults

A non-zero, non-negative integer used to limit the number of returned results.

type NextToken

string

param NextToken

An enumeration token that allows the operation to batch the results of the operation.

type RepositoryLinkId

string

param RepositoryLinkId

[REQUIRED]

The ID of the repository link for the requested list of sync configurations.

type SyncType

string

param SyncType

[REQUIRED]

The sync type for the requested list of sync configurations.

rtype

dict

returns

Response Syntax

{
    'SyncConfigurations': [
        {
            'Branch': 'string',
            'ConfigFile': 'string',
            'OwnerId': 'string',
            'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged',
            'RepositoryLinkId': 'string',
            'RepositoryName': 'string',
            'ResourceName': 'string',
            'RoleArn': 'string',
            'SyncType': 'CFN_STACK_SYNC',
            'PublishDeploymentStatus': 'ENABLED'|'DISABLED',
            'TriggerResourceUpdateOn': 'ANY_CHANGE'|'FILE_CHANGE',
            'PullRequestComment': 'ENABLED'|'DISABLED'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SyncConfigurations (list) --

      The list of repository sync definitions returned by the request.

      • (dict) --

        Information, such as repository, branch, provider, and resource names for a specific sync configuration.

        • Branch (string) --

          The branch associated with a specific sync configuration.

        • ConfigFile (string) --

          The file path to the configuration file associated with a specific sync configuration. The path should point to an actual file in the sync configurations linked repository.

        • OwnerId (string) --

          The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub.

        • ProviderType (string) --

          The connection provider type associated with a specific sync configuration, such as GitHub.

        • RepositoryLinkId (string) --

          The ID of the repository link associated with a specific sync configuration.

        • RepositoryName (string) --

          The name of the repository associated with a specific sync configuration.

        • ResourceName (string) --

          The name of the connection resource associated with a specific sync configuration.

        • RoleArn (string) --

          The Amazon Resource Name (ARN) of the IAM role associated with a specific sync configuration.

        • SyncType (string) --

          The type of sync for a specific sync configuration.

        • PublishDeploymentStatus (string) --

          Whether to enable or disable publishing of deployment status to source providers.

        • TriggerResourceUpdateOn (string) --

          When to trigger Git sync to begin the stack update.

        • PullRequestComment (string) --

          A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.

    • NextToken (string) --

      An enumeration token that allows the operation to batch the next results of the operation.

UpdateSyncConfiguration (updated) Link ¶
Changes (request, response)
Request
{'PullRequestComment': 'ENABLED | DISABLED'}
Response
{'SyncConfiguration': {'PullRequestComment': 'ENABLED | DISABLED'}}

Updates the sync configuration for your connection and a specified external Git repository.

See also: AWS API Documentation

Request Syntax

client.update_sync_configuration(
    Branch='string',
    ConfigFile='string',
    RepositoryLinkId='string',
    ResourceName='string',
    RoleArn='string',
    SyncType='CFN_STACK_SYNC',
    PublishDeploymentStatus='ENABLED'|'DISABLED',
    TriggerResourceUpdateOn='ANY_CHANGE'|'FILE_CHANGE',
    PullRequestComment='ENABLED'|'DISABLED'
)
type Branch

string

param Branch

The branch for the sync configuration to be updated.

type ConfigFile

string

param ConfigFile

The configuration file for the sync configuration to be updated.

type RepositoryLinkId

string

param RepositoryLinkId

The ID of the repository link for the sync configuration to be updated.

type ResourceName

string

param ResourceName

[REQUIRED]

The name of the Amazon Web Services resource for the sync configuration to be updated.

type RoleArn

string

param RoleArn

The ARN of the IAM role for the sync configuration to be updated.

type SyncType

string

param SyncType

[REQUIRED]

The sync type for the sync configuration to be updated.

type PublishDeploymentStatus

string

param PublishDeploymentStatus

Whether to enable or disable publishing of deployment status to source providers.

type TriggerResourceUpdateOn

string

param TriggerResourceUpdateOn

When to trigger Git sync to begin the stack update.

type PullRequestComment

string

param PullRequestComment

TA toggle that specifies whether to enable or disable pull request comments for the sync configuration to be updated.

rtype

dict

returns

Response Syntax

{
    'SyncConfiguration': {
        'Branch': 'string',
        'ConfigFile': 'string',
        'OwnerId': 'string',
        'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged',
        'RepositoryLinkId': 'string',
        'RepositoryName': 'string',
        'ResourceName': 'string',
        'RoleArn': 'string',
        'SyncType': 'CFN_STACK_SYNC',
        'PublishDeploymentStatus': 'ENABLED'|'DISABLED',
        'TriggerResourceUpdateOn': 'ANY_CHANGE'|'FILE_CHANGE',
        'PullRequestComment': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    • SyncConfiguration (dict) --

      The information returned for the sync configuration to be updated.

      • Branch (string) --

        The branch associated with a specific sync configuration.

      • ConfigFile (string) --

        The file path to the configuration file associated with a specific sync configuration. The path should point to an actual file in the sync configurations linked repository.

      • OwnerId (string) --

        The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub.

      • ProviderType (string) --

        The connection provider type associated with a specific sync configuration, such as GitHub.

      • RepositoryLinkId (string) --

        The ID of the repository link associated with a specific sync configuration.

      • RepositoryName (string) --

        The name of the repository associated with a specific sync configuration.

      • ResourceName (string) --

        The name of the connection resource associated with a specific sync configuration.

      • RoleArn (string) --

        The Amazon Resource Name (ARN) of the IAM role associated with a specific sync configuration.

      • SyncType (string) --

        The type of sync for a specific sync configuration.

      • PublishDeploymentStatus (string) --

        Whether to enable or disable publishing of deployment status to source providers.

      • TriggerResourceUpdateOn (string) --

        When to trigger Git sync to begin the stack update.

      • PullRequestComment (string) --

        A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.