@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS CodeStar connections
@version 2019-12-01
@auth AWS SigV4
@endpoints 27
@hint download_for_search
@toc root(27)

@endpoint POST /
@desc Creates a connection that can then be given to other Amazon Web Services services like CodePipeline so that it can access third-party code repositories. The connection is in pending status until the third-party connection handshake is completed from the console.
@required {ConnectionName: str}
@optional {ProviderType: str, Tags: [Tag], HostArn: str}
@returns(200) {ConnectionArn: str, Tags: [Tag]?}

@endpoint POST /
@desc Creates a resource that represents the infrastructure where a third-party provider is installed. The host is used when you create connections to an installed third-party provider type, such as GitHub Enterprise Server. You create one host for all connections to that provider.  A host created through the CLI or the SDK is in `PENDING` status by default. You can make its status `AVAILABLE` by setting up the host in the console.
@required {Name: str, ProviderType: str, ProviderEndpoint: str}
@optional {VpcConfiguration: VpcConfiguration, Tags: [Tag]}
@returns(200) {HostArn: str?, Tags: [Tag]?}

@endpoint POST /
@desc Creates a link to a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.
@required {ConnectionArn: str, OwnerId: str, RepositoryName: str}
@optional {EncryptionKeyArn: str, Tags: [Tag]}
@returns(200) {RepositoryLinkInfo: RepositoryLinkInfo{ConnectionArn: str, EncryptionKeyArn: str?, OwnerId: str, ProviderType: str, RepositoryLinkArn: str, RepositoryLinkId: str, RepositoryName: str}}

@endpoint POST /
@desc 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.
@required {Branch: str, ConfigFile: str, RepositoryLinkId: str, ResourceName: str, RoleArn: str, SyncType: str}
@optional {PublishDeploymentStatus: str, TriggerResourceUpdateOn: str}
@returns(200) {SyncConfiguration: SyncConfiguration{Branch: str, ConfigFile: str?, OwnerId: str, ProviderType: str, RepositoryLinkId: str, RepositoryName: str, ResourceName: str, RoleArn: str, SyncType: str, PublishDeploymentStatus: str?, TriggerResourceUpdateOn: str?}}

@endpoint POST /
@desc The connection to be deleted.
@required {ConnectionArn: str}

@endpoint POST /
@desc The host to be deleted. Before you delete a host, all connections associated to the host must be deleted.  A host cannot be deleted if it is in the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
@required {HostArn: str}

@endpoint POST /
@desc Deletes the association between your connection and a specified external Git repository.
@required {RepositoryLinkId: str}

@endpoint POST /
@desc Deletes the sync configuration for a specified repository and connection.
@required {SyncType: str, ResourceName: str}

@endpoint POST /
@desc Returns the connection ARN and details such as status, owner, and provider type.
@required {ConnectionArn: str}
@returns(200) {Connection: Connection?{ConnectionName: str?, ConnectionArn: str?, ProviderType: str?, OwnerAccountId: str?, ConnectionStatus: str?, HostArn: str?}}

@endpoint POST /
@desc Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
@required {HostArn: str}
@returns(200) {Name: str?, Status: str?, ProviderType: str?, ProviderEndpoint: str?, VpcConfiguration: VpcConfiguration?{VpcId: str, SubnetIds: [str], SecurityGroupIds: [str], TlsCertificate: str?}}

@endpoint POST /
@desc Returns details about a repository link. A repository link allows Git sync to monitor and sync changes from files in a specified Git repository.
@required {RepositoryLinkId: str}
@returns(200) {RepositoryLinkInfo: RepositoryLinkInfo{ConnectionArn: str, EncryptionKeyArn: str?, OwnerId: str, ProviderType: str, RepositoryLinkArn: str, RepositoryLinkId: str, RepositoryName: str}}

@endpoint POST /
@desc Returns details about the sync status for a repository. A repository sync uses Git sync to push and pull changes from your remote repository.
@required {Branch: str, RepositoryLinkId: str, SyncType: str}
@returns(200) {LatestSync: RepositorySyncAttempt{StartedAt: str(timestamp), Status: str, Events: [RepositorySyncEvent]}}

@endpoint POST /
@desc Returns the status of the sync with the Git repository for a specific Amazon Web Services resource.
@required {ResourceName: str, SyncType: str}
@returns(200) {DesiredState: Revision?{Branch: str, Directory: str, OwnerId: str, RepositoryName: str, ProviderType: str, Sha: str}, LatestSuccessfulSync: ResourceSyncAttempt?{Events: [ResourceSyncEvent], InitialRevision: Revision{Branch: str, Directory: str, OwnerId: str, RepositoryName: str, ProviderType: str, Sha: str}, StartedAt: str(timestamp), Status: str, TargetRevision: Revision{Branch: str, Directory: str, OwnerId: str, RepositoryName: str, ProviderType: str, Sha: str}, Target: str}, LatestSync: ResourceSyncAttempt{Events: [ResourceSyncEvent], InitialRevision: Revision{Branch: str, Directory: str, OwnerId: str, RepositoryName: str, ProviderType: str, Sha: str}, StartedAt: str(timestamp), Status: str, TargetRevision: Revision{Branch: str, Directory: str, OwnerId: str, RepositoryName: str, ProviderType: str, Sha: str}, Target: str}}

@endpoint POST /
@desc Returns a list of the most recent sync blockers.
@required {SyncType: str, ResourceName: str}
@returns(200) {SyncBlockerSummary: SyncBlockerSummary{ResourceName: str, ParentResourceName: str?, LatestBlockers: [SyncBlocker]?}}

@endpoint POST /
@desc 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.
@required {SyncType: str, ResourceName: str}
@returns(200) {SyncConfiguration: SyncConfiguration{Branch: str, ConfigFile: str?, OwnerId: str, ProviderType: str, RepositoryLinkId: str, RepositoryName: str, ResourceName: str, RoleArn: str, SyncType: str, PublishDeploymentStatus: str?, TriggerResourceUpdateOn: str?}}

@endpoint POST /
@desc Lists the connections associated with your account.
@optional {ProviderTypeFilter: str, HostArnFilter: str, MaxResults: int, NextToken: str}
@returns(200) {Connections: [Connection]?, NextToken: str?}

@endpoint POST /
@desc Lists the hosts associated with your account.
@optional {MaxResults: int, NextToken: str}
@returns(200) {Hosts: [Host]?, NextToken: str?}

@endpoint POST /
@desc Lists the repository links created for connections in your account.
@optional {MaxResults: int, NextToken: str}
@returns(200) {RepositoryLinks: [RepositoryLinkInfo], NextToken: str?}

@endpoint POST /
@desc Lists the repository sync definitions for repository links in your account.
@required {RepositoryLinkId: str, SyncType: str}
@returns(200) {RepositorySyncDefinitions: [RepositorySyncDefinition], NextToken: str?}

@endpoint POST /
@desc Returns a list of sync configurations for a specified repository.
@required {RepositoryLinkId: str, SyncType: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {SyncConfigurations: [SyncConfiguration], NextToken: str?}

@endpoint POST /
@desc Gets the set of key-value pairs (metadata) that are used to manage the resource.
@required {ResourceArn: str}
@returns(200) {Tags: [Tag]?}

@endpoint POST /
@desc Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
@required {ResourceArn: str, Tags: [Tag]}

@endpoint POST /
@desc Removes tags from an Amazon Web Services resource.
@required {ResourceArn: str, TagKeys: [str]}

@endpoint POST /
@desc Updates a specified host with the provided configurations.
@required {HostArn: str}
@optional {ProviderEndpoint: str, VpcConfiguration: VpcConfiguration}

@endpoint POST /
@desc Updates the association between your connection and a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.
@required {RepositoryLinkId: str}
@optional {ConnectionArn: str, EncryptionKeyArn: str}
@returns(200) {RepositoryLinkInfo: RepositoryLinkInfo{ConnectionArn: str, EncryptionKeyArn: str?, OwnerId: str, ProviderType: str, RepositoryLinkArn: str, RepositoryLinkId: str, RepositoryName: str}}

@endpoint POST /
@desc Allows you to update the status of a sync blocker, resolving the blocker and allowing syncing to continue.
@required {Id: str, SyncType: str, ResourceName: str, ResolvedReason: str}
@returns(200) {ResourceName: str, ParentResourceName: str?, SyncBlocker: SyncBlocker{Id: str, Type: str, Status: str, CreatedReason: str, CreatedAt: str(timestamp), Contexts: [SyncBlockerContext]?, ResolvedReason: str?, ResolvedAt: str(timestamp)?}}

@endpoint POST /
@desc Updates the sync configuration for your connection and a specified external Git repository.
@required {ResourceName: str, SyncType: str}
@optional {Branch: str, ConfigFile: str, RepositoryLinkId: str, RoleArn: str, PublishDeploymentStatus: str, TriggerResourceUpdateOn: str}
@returns(200) {SyncConfiguration: SyncConfiguration{Branch: str, ConfigFile: str?, OwnerId: str, ProviderType: str, RepositoryLinkId: str, RepositoryName: str, ResourceName: str, RoleArn: str, SyncType: str, PublishDeploymentStatus: str?, TriggerResourceUpdateOn: str?}}

@end
