Method: projects.locations.repositories.hooks.create

Creates a new hook in a given repository.

Host: Data Plane

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The repository in which to create the hook. Values are of the form projects/{project_number}/locations/{locationId}/repositories/{repositoryId}

Query parameters

Parameters
hookId

string

Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

Request body

The request body contains an instance of Hook.

Response body

If successful, the response body contains a newly created instance of Operation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • securesourcemanager.hooks.create

For more information, see the IAM documentation.