diff --git a/clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts b/clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts index cdeb1a2047749..3b970d590a365 100644 --- a/clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts +++ b/clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts @@ -181,6 +181,11 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _ * // buildType: "BUILD" || "BUILD_BATCH", * // manualCreation: true || false, * // lastModifiedSecret: new Date("TIMESTAMP"), + * // scopeConfiguration: { // ScopeConfiguration + * // name: "STRING_VALUE", // required + * // domain: "STRING_VALUE", + * // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required + * // }, * // }, * // vpcConfig: { // VpcConfig * // vpcId: "STRING_VALUE", diff --git a/clients/client-codebuild/src/commands/CreateProjectCommand.ts b/clients/client-codebuild/src/commands/CreateProjectCommand.ts index 12327674b921d..eb486313d7dd6 100644 --- a/clients/client-codebuild/src/commands/CreateProjectCommand.ts +++ b/clients/client-codebuild/src/commands/CreateProjectCommand.ts @@ -338,6 +338,11 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad * // buildType: "BUILD" || "BUILD_BATCH", * // manualCreation: true || false, * // lastModifiedSecret: new Date("TIMESTAMP"), + * // scopeConfiguration: { // ScopeConfiguration + * // name: "STRING_VALUE", // required + * // domain: "STRING_VALUE", + * // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required + * // }, * // }, * // vpcConfig: { // VpcConfig * // vpcId: "STRING_VALUE", diff --git a/clients/client-codebuild/src/commands/CreateWebhookCommand.ts b/clients/client-codebuild/src/commands/CreateWebhookCommand.ts index 1900d0f06346b..2b23c5016eee9 100644 --- a/clients/client-codebuild/src/commands/CreateWebhookCommand.ts +++ b/clients/client-codebuild/src/commands/CreateWebhookCommand.ts @@ -59,6 +59,11 @@ export interface CreateWebhookCommandOutput extends CreateWebhookOutput, __Metad * ], * buildType: "BUILD" || "BUILD_BATCH", * manualCreation: true || false, + * scopeConfiguration: { // ScopeConfiguration + * name: "STRING_VALUE", // required + * domain: "STRING_VALUE", + * scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required + * }, * }; * const command = new CreateWebhookCommand(input); * const response = await client.send(command); @@ -80,6 +85,11 @@ export interface CreateWebhookCommandOutput extends CreateWebhookOutput, __Metad * // buildType: "BUILD" || "BUILD_BATCH", * // manualCreation: true || false, * // lastModifiedSecret: new Date("TIMESTAMP"), + * // scopeConfiguration: { // ScopeConfiguration + * // name: "STRING_VALUE", // required + * // domain: "STRING_VALUE", + * // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required + * // }, * // }, * // }; * diff --git a/clients/client-codebuild/src/commands/UpdateProjectCommand.ts b/clients/client-codebuild/src/commands/UpdateProjectCommand.ts index cd18d73b5b2ec..6aa70302c8b00 100644 --- a/clients/client-codebuild/src/commands/UpdateProjectCommand.ts +++ b/clients/client-codebuild/src/commands/UpdateProjectCommand.ts @@ -338,6 +338,11 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad * // buildType: "BUILD" || "BUILD_BATCH", * // manualCreation: true || false, * // lastModifiedSecret: new Date("TIMESTAMP"), + * // scopeConfiguration: { // ScopeConfiguration + * // name: "STRING_VALUE", // required + * // domain: "STRING_VALUE", + * // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required + * // }, * // }, * // vpcConfig: { // VpcConfig * // vpcId: "STRING_VALUE", diff --git a/clients/client-codebuild/src/commands/UpdateWebhookCommand.ts b/clients/client-codebuild/src/commands/UpdateWebhookCommand.ts index 29133afecc8d9..07c98cce77f92 100644 --- a/clients/client-codebuild/src/commands/UpdateWebhookCommand.ts +++ b/clients/client-codebuild/src/commands/UpdateWebhookCommand.ts @@ -74,6 +74,11 @@ export interface UpdateWebhookCommandOutput extends UpdateWebhookOutput, __Metad * // buildType: "BUILD" || "BUILD_BATCH", * // manualCreation: true || false, * // lastModifiedSecret: new Date("TIMESTAMP"), + * // scopeConfiguration: { // ScopeConfiguration + * // name: "STRING_VALUE", // required + * // domain: "STRING_VALUE", + * // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required + * // }, * // }, * // }; * diff --git a/clients/client-codebuild/src/models/models_0.ts b/clients/client-codebuild/src/models/models_0.ts index 58f6a6cad95e4..7e20e5cb98152 100644 --- a/clients/client-codebuild/src/models/models_0.ts +++ b/clients/client-codebuild/src/models/models_0.ts @@ -3617,6 +3617,18 @@ export interface WebhookFilter { * * *
REPOSITORY_NAME
+ *A webhook triggers a build when the repository name matches the + * regular expression pattern.
+ *Works with GitHub global or organization webhooks only.
+ *WORKFLOW_NAME
*Contains configuration information about the scope for a webhook.
+ * @public + */ +export interface ScopeConfiguration { + /** + *The name of either the enterprise or organization that will send webhook events to CodeBuild, depending on if the webhook is a global or organization webhook respectively.
+ * @public + */ + name: string | undefined; + + /** + *The domain of the GitHub Enterprise organization. Note that this parameter is only required if your project's source type is GITHUB_ENTERPRISE
+ * @public + */ + domain?: string; + + /** + *The type of scope for a GitHub webhook.
+ * @public + */ + scope: WebhookScopeType | undefined; +} + /** *Information about a webhook that connects repository events to a build project in * CodeBuild.
@@ -3730,6 +3780,15 @@ export interface Webhook { * @public */ lastModifiedSecret?: Date; + + /** + *The scope configuration for global or organization webhooks.
+ *Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.
+ *The scope configuration for global or organization webhooks.
+ *Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.
+ *If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns payloadUrl
and \n secret
values for the webhook. The payloadUrl
and secret
values in the output can be \n used to manually create a webhook within GitHub.
\n manualCreation
is only available for GitHub webhooks.
The scope configuration for global or organization webhooks.
\nGlobal or organization webhooks are only available for GitHub and Github Enterprise webhooks.
\nThe scaling configuration output of a compute fleet.
" } }, + "com.amazonaws.codebuild#ScopeConfiguration": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.codebuild#String", + "traits": { + "smithy.api#documentation": "The name of either the enterprise or organization that will send webhook events to CodeBuild, depending on if the webhook is a global or organization webhook respectively.
", + "smithy.api#required": {} + } + }, + "domain": { + "target": "com.amazonaws.codebuild#String", + "traits": { + "smithy.api#documentation": "The domain of the GitHub Enterprise organization. Note that this parameter is only required if your project's source type is GITHUB_ENTERPRISE
" + } + }, + "scope": { + "target": "com.amazonaws.codebuild#WebhookScopeType", + "traits": { + "smithy.api#documentation": "The type of scope for a GitHub webhook.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains configuration information about the scope for a webhook.
" + } + }, "com.amazonaws.codebuild#SecurityGroupIds": { "type": "list", "member": { @@ -8981,6 +9015,12 @@ "traits": { "smithy.api#documentation": "A timestamp that indicates the last time a repository's secret token was modified.\n
" } + }, + "scopeConfiguration": { + "target": "com.amazonaws.codebuild#ScopeConfiguration", + "traits": { + "smithy.api#documentation": "The scope configuration for global or organization webhooks.
\nGlobal or organization webhooks are only available for GitHub and Github Enterprise webhooks.
\n The type of webhook filter. There are nine webhook filter types: EVENT
,\n ACTOR_ACCOUNT_ID
, HEAD_REF
, BASE_REF
,\n FILE_PATH
, COMMIT_MESSAGE
, TAG_NAME
, RELEASE_NAME
, \n and WORKFLOW_NAME
.
\n EVENT\n
\n A webhook event triggers a build when the provided pattern
\n matches one of nine event types: PUSH
,\n PULL_REQUEST_CREATED
, PULL_REQUEST_UPDATED
, \n PULL_REQUEST_CLOSED
, PULL_REQUEST_REOPENED
, \n PULL_REQUEST_MERGED
, RELEASED
, PRERELEASED
, \n and WORKFLOW_JOB_QUEUED
. The EVENT
patterns are\n specified as a comma-separated string. For example, PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED
filters all push, pull\n request created, and pull request updated events.
Types PULL_REQUEST_REOPENED
and WORKFLOW_JOB_QUEUED
\n work with GitHub and GitHub Enterprise only. Types RELEASED
and \n PRERELEASED
work with GitHub only.
ACTOR_ACCOUNT_ID
\n A webhook event triggers a build when a GitHub, GitHub Enterprise, or\n Bitbucket account ID matches the regular expression pattern
.\n
HEAD_REF
\n A webhook event triggers a build when the head reference matches the\n regular expression pattern
. For example,\n refs/heads/branch-name
and refs/tags/tag-name
.
Works with GitHub and GitHub Enterprise push, GitHub and GitHub\n Enterprise pull request, Bitbucket push, and Bitbucket pull request events.
\nBASE_REF
\n A webhook event triggers a build when the base reference matches the\n regular expression pattern
. For example,\n refs/heads/branch-name
.
Works with pull request events only.
\nFILE_PATH
\n A webhook triggers a build when the path of a changed file matches the\n regular expression pattern
.
Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.
\nCOMMIT_MESSAGE
\nA webhook triggers a build when the head commit message matches the\n regular expression pattern
.
Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.
\nTAG_NAME
\nA webhook triggers a build when the tag name of the release matches the \n regular expression pattern
.
Works with RELEASED
and PRERELEASED
events only.
RELEASE_NAME
\nA webhook triggers a build when the release name matches the \n regular expression pattern
.
Works with RELEASED
and PRERELEASED
events only.
WORKFLOW_NAME
\nA webhook triggers a build when the workflow name matches the \n regular expression pattern
.
Works with WORKFLOW_JOB_QUEUED
events only.
The type of webhook filter. There are nine webhook filter types: EVENT
,\n ACTOR_ACCOUNT_ID
, HEAD_REF
, BASE_REF
,\n FILE_PATH
, COMMIT_MESSAGE
, TAG_NAME
, RELEASE_NAME
, \n and WORKFLOW_NAME
.
\n EVENT\n
\n A webhook event triggers a build when the provided pattern
\n matches one of nine event types: PUSH
,\n PULL_REQUEST_CREATED
, PULL_REQUEST_UPDATED
, \n PULL_REQUEST_CLOSED
, PULL_REQUEST_REOPENED
, \n PULL_REQUEST_MERGED
, RELEASED
, PRERELEASED
, \n and WORKFLOW_JOB_QUEUED
. The EVENT
patterns are\n specified as a comma-separated string. For example, PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED
filters all push, pull\n request created, and pull request updated events.
Types PULL_REQUEST_REOPENED
and WORKFLOW_JOB_QUEUED
\n work with GitHub and GitHub Enterprise only. Types RELEASED
and \n PRERELEASED
work with GitHub only.
ACTOR_ACCOUNT_ID
\n A webhook event triggers a build when a GitHub, GitHub Enterprise, or\n Bitbucket account ID matches the regular expression pattern
.\n
HEAD_REF
\n A webhook event triggers a build when the head reference matches the\n regular expression pattern
. For example,\n refs/heads/branch-name
and refs/tags/tag-name
.
Works with GitHub and GitHub Enterprise push, GitHub and GitHub\n Enterprise pull request, Bitbucket push, and Bitbucket pull request events.
\nBASE_REF
\n A webhook event triggers a build when the base reference matches the\n regular expression pattern
. For example,\n refs/heads/branch-name
.
Works with pull request events only.
\nFILE_PATH
\n A webhook triggers a build when the path of a changed file matches the\n regular expression pattern
.
Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.
\nCOMMIT_MESSAGE
\nA webhook triggers a build when the head commit message matches the\n regular expression pattern
.
Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.
\nTAG_NAME
\nA webhook triggers a build when the tag name of the release matches the \n regular expression pattern
.
Works with RELEASED
and PRERELEASED
events only.
RELEASE_NAME
\nA webhook triggers a build when the release name matches the \n regular expression pattern
.
Works with RELEASED
and PRERELEASED
events only.
REPOSITORY_NAME
\nA webhook triggers a build when the repository name matches the \n regular expression pattern.
\nWorks with GitHub global or organization webhooks only.
\nWORKFLOW_NAME
\nA webhook triggers a build when the workflow name matches the \n regular expression pattern
.
Works with WORKFLOW_JOB_QUEUED
events only.