gcloud alpha source-manager hooks create

NAME
gcloud alpha source-manager hooks create - create a Secure Source Manager hook
SYNOPSIS
gcloud alpha source-manager hooks create (HOOK : --region=REGION --repository=REPOSITORY) --target-uri=TARGET_URI [--async] [--disabled] [--endpoint-mode=ENDPOINT_MODE] [--events=[EVENT,…]] [GCLOUD_WIDE_FLAG …]
DESCRIPTION
(ALPHA) Create a Secure Source Manager hook.
EXAMPLES
To create a hook my-hook in repository my-repo in location us-central1 targeting https://example.com/webhook, run the following command:
gcloud alpha source-manager hooks create my-hook --repository=my-repo --region=us-central1 --target-uri=https://example.com/webhook --events=PUSH,PULL_REQUEST
POSITIONAL ARGUMENTS
Hook resource - The Secure Source Manager hook to create. The arguments in this group can be used to specify the attributes of this resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.

To set the project attribute:

  • provide the argument hook on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

This must be specified.

HOOK
ID of the hook or fully qualified identifier for the hook.

To set the hook attribute:

  • provide the argument hook on the command line.

This positional argument must be specified if any of the other arguments in this group are specified.

--region=REGION
Secure Source Manager location.

To set the region attribute:

  • provide the argument hook on the command line with a fully specified name;
  • provide the argument --region on the command line.
--repository=REPOSITORY
Secure Source Manager repository.

To set the repository attribute:

  • provide the argument hook on the command line with a fully specified name;
  • provide the argument --repository on the command line.
REQUIRED FLAGS
--target-uri=TARGET_URI
The target URI to which the payloads will be delivered.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--disabled
Determines if the hook is disabled.
--endpoint-mode=ENDPOINT_MODE
Specifies endpoint mode for a given command. Regional endpoints provide enhanced data residency and reliability by ensuring your request is handled entirely within the specified Google Cloud region. This differs from global endpoints, which may process parts of the request outside the target region. Overrides the default regional/endpoint_mode property value for this command invocation. ENDPOINT_MODE must be one of:
global
(Default) Use global rather than regional endpoints.
regional
Only use regional endpoints. An error will be raised if a regional endpoint is not available for a given command.
regional-preferred
Use regional endpoints when available, otherwise use global endpoints. Recommended for most users.
--events=[EVENT,…]
The events that trigger hook on. Can be PUSH, PULL_REQUEST, or PULL_REQUEST_COMMENT. EVENT must be one of:
PULL_REQUEST
Pull request events are triggered when a pull request is opened, closed, reopened, or edited.
PULL_REQUEST_COMMENT
Triggers when a general comment is added, edited, or deleted on a pull request.
PUSH
Push events are triggered when pushing to the repository.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

NOTES
This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.