import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Hook is a user-defined HTTP callback triggered by an event. * * To get more information about Hook, see: * * How-to Guides * * [Official Documentation](https://cloud.google.com/secure-source-manager/docs/overview) * * ## Example Usage * * ## Import * * Hook can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/hooks/{{hook_id}}` * * * `{{project}}/{{location}}/{{repository_id}}/{{hook_id}}` * * * `{{location}}/{{repository_id}}/{{hook_id}}` * * * `{{hook_id}}` * * When using the `pulumi import` command, Hook can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:securesourcemanager/hook:Hook default projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/hooks/{{hook_id}} * ``` * * ```sh * $ pulumi import gcp:securesourcemanager/hook:Hook default {{project}}/{{location}}/{{repository_id}}/{{hook_id}} * ``` * * ```sh * $ pulumi import gcp:securesourcemanager/hook:Hook default {{location}}/{{repository_id}}/{{hook_id}} * ``` * * ```sh * $ pulumi import gcp:securesourcemanager/hook:Hook default {{hook_id}} * ``` */ export declare class Hook extends pulumi.CustomResource { /** * Get an existing Hook resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: HookState, opts?: pulumi.CustomResourceOptions): Hook; /** * Returns true if the given object is an instance of Hook. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Hook; /** * Create timestamp. */ readonly createTime: pulumi.Output; /** * Determines if the hook disabled or not. * Set to true to stop sending traffic. */ readonly disabled: pulumi.Output; /** * The events that trigger hook on. * Each value may be one of: `PUSH`, `PULL_REQUEST`. */ readonly events: pulumi.Output; /** * The ID for the Hook. */ readonly hookId: pulumi.Output; /** * The location for the Repository. */ readonly location: pulumi.Output; /** * A unique identifier for a Hook. The name should be of the format: * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The trigger option for push events. * Structure is documented below. */ readonly pushOption: pulumi.Output; /** * The ID for the Repository. */ readonly repositoryId: pulumi.Output; /** * The sensitive query string to be appended to the target URI. * **Note**: This property is sensitive and will not be displayed in the plan. */ readonly sensitiveQueryString: pulumi.Output; /** * The target URI to which the payloads will be delivered. */ readonly targetUri: pulumi.Output; /** * Unique identifier of the hook. */ readonly uid: pulumi.Output; /** * Update timestamp. */ readonly updateTime: pulumi.Output; /** * Create a Hook resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: HookArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Hook resources. */ export interface HookState { /** * Create timestamp. */ createTime?: pulumi.Input; /** * Determines if the hook disabled or not. * Set to true to stop sending traffic. */ disabled?: pulumi.Input; /** * The events that trigger hook on. * Each value may be one of: `PUSH`, `PULL_REQUEST`. */ events?: pulumi.Input[]>; /** * The ID for the Hook. */ hookId?: pulumi.Input; /** * The location for the Repository. */ location?: pulumi.Input; /** * A unique identifier for a Hook. The name should be of the format: * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The trigger option for push events. * Structure is documented below. */ pushOption?: pulumi.Input; /** * The ID for the Repository. */ repositoryId?: pulumi.Input; /** * The sensitive query string to be appended to the target URI. * **Note**: This property is sensitive and will not be displayed in the plan. */ sensitiveQueryString?: pulumi.Input; /** * The target URI to which the payloads will be delivered. */ targetUri?: pulumi.Input; /** * Unique identifier of the hook. */ uid?: pulumi.Input; /** * Update timestamp. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Hook resource. */ export interface HookArgs { /** * Determines if the hook disabled or not. * Set to true to stop sending traffic. */ disabled?: pulumi.Input; /** * The events that trigger hook on. * Each value may be one of: `PUSH`, `PULL_REQUEST`. */ events?: pulumi.Input[]>; /** * The ID for the Hook. */ hookId: pulumi.Input; /** * The location for the Repository. */ location: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The trigger option for push events. * Structure is documented below. */ pushOption?: pulumi.Input; /** * The ID for the Repository. */ repositoryId: pulumi.Input; /** * The sensitive query string to be appended to the target URI. * **Note**: This property is sensitive and will not be displayed in the plan. */ sensitiveQueryString?: pulumi.Input; /** * The target URI to which the payloads will be delivered. */ targetUri: pulumi.Input; }