@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
333 lines (332 loc) • 12.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The Eventarc Enrollment resource
*
* To get more information about Enrollment, see:
*
* * [API documentation](https://cloud.google.com/eventarc/docs/reference/rest/v1/projects.locations.enrollments)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/eventarc/advanced/docs/receive-events/create-enrollment)
*
* ## Example Usage
*
* ### Eventarc Enrollment With Pipeline Destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pipeline = new gcp.eventarc.Pipeline("pipeline", {
* location: "us-central1",
* pipelineId: "some-pipeline",
* destinations: [{
* httpEndpoint: {
* uri: "https://10.77.0.0:80/route",
* },
* networkConfig: {
* networkAttachment: "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment",
* },
* }],
* });
* const primary = new gcp.eventarc.Enrollment("primary", {
* location: "us-central1",
* enrollmentId: "some-enrollment",
* messageBus: primaryGoogleEventarcMessageBus.id,
* destination: pipeline.id,
* celMatch: "message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'",
* });
* const messageBus = new gcp.eventarc.MessageBus("message_bus", {
* location: "us-central1",
* messageBusId: "some-message-bus",
* });
* ```
*
* ## Import
*
* Enrollment can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/enrollments/{{enrollment_id}}`
*
* * `{{project}}/{{location}}/{{enrollment_id}}`
*
* * `{{location}}/{{enrollment_id}}`
*
* When using the `pulumi import` command, Enrollment can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:eventarc/enrollment:Enrollment default projects/{{project}}/locations/{{location}}/enrollments/{{enrollment_id}}
* ```
*
* ```sh
* $ pulumi import gcp:eventarc/enrollment:Enrollment default {{project}}/{{location}}/{{enrollment_id}}
* ```
*
* ```sh
* $ pulumi import gcp:eventarc/enrollment:Enrollment default {{location}}/{{enrollment_id}}
* ```
*/
export declare class Enrollment extends pulumi.CustomResource {
/**
* Get an existing Enrollment 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<pulumi.ID>, state?: EnrollmentState, opts?: pulumi.CustomResourceOptions): Enrollment;
/**
* Returns true if the given object is an instance of Enrollment. 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 Enrollment;
/**
* Resource annotations.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
readonly annotations: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A CEL expression identifying which messages this enrollment applies to.
*/
readonly celMatch: pulumi.Output<string>;
/**
* The creation time.
*/
readonly createTime: pulumi.Output<string>;
/**
* Destination is the Pipeline that the Enrollment is delivering to. It must
* point to the full resource name of a Pipeline. Format:
* "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
*/
readonly destination: pulumi.Output<string>;
/**
* Resource display name.
*/
readonly displayName: pulumi.Output<string | undefined>;
readonly effectiveAnnotations: pulumi.Output<{
[key: string]: string;
}>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The user-provided ID to be assigned to the Enrollment. It should match the
* format `^a-z?$`.
*/
readonly enrollmentId: pulumi.Output<string>;
/**
* This checksum is computed by the server based on the value of other
* fields, and might be sent only on update and delete requests to ensure that
* the client has an up-to-date value before proceeding.
*/
readonly etag: pulumi.Output<string>;
/**
* Resource labels.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
readonly location: pulumi.Output<string>;
/**
* Resource name of the message bus identifying the source of the messages. It
* matches the form
* projects/{project}/locations/{location}/messageBuses/{messageBus}.
*/
readonly messageBus: pulumi.Output<string>;
/**
* Resource name of the form
* projects/{project}/locations/{location}/enrollments/{enrollment}
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Server assigned unique identifier for the channel. The value is a UUID4
* string and guaranteed to remain unchanged until the resource is deleted.
*/
readonly uid: pulumi.Output<string>;
/**
* The last-modified time.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a Enrollment 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: EnrollmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Enrollment resources.
*/
export interface EnrollmentState {
/**
* Resource annotations.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A CEL expression identifying which messages this enrollment applies to.
*/
celMatch?: pulumi.Input<string>;
/**
* The creation time.
*/
createTime?: pulumi.Input<string>;
/**
* Destination is the Pipeline that the Enrollment is delivering to. It must
* point to the full resource name of a Pipeline. Format:
* "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
*/
destination?: pulumi.Input<string>;
/**
* Resource display name.
*/
displayName?: pulumi.Input<string>;
effectiveAnnotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The user-provided ID to be assigned to the Enrollment. It should match the
* format `^a-z?$`.
*/
enrollmentId?: pulumi.Input<string>;
/**
* This checksum is computed by the server based on the value of other
* fields, and might be sent only on update and delete requests to ensure that
* the client has an up-to-date value before proceeding.
*/
etag?: pulumi.Input<string>;
/**
* Resource labels.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location?: pulumi.Input<string>;
/**
* Resource name of the message bus identifying the source of the messages. It
* matches the form
* projects/{project}/locations/{location}/messageBuses/{messageBus}.
*/
messageBus?: pulumi.Input<string>;
/**
* Resource name of the form
* projects/{project}/locations/{location}/enrollments/{enrollment}
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Server assigned unique identifier for the channel. The value is a UUID4
* string and guaranteed to remain unchanged until the resource is deleted.
*/
uid?: pulumi.Input<string>;
/**
* The last-modified time.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Enrollment resource.
*/
export interface EnrollmentArgs {
/**
* Resource annotations.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A CEL expression identifying which messages this enrollment applies to.
*/
celMatch: pulumi.Input<string>;
/**
* Destination is the Pipeline that the Enrollment is delivering to. It must
* point to the full resource name of a Pipeline. Format:
* "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
*/
destination: pulumi.Input<string>;
/**
* Resource display name.
*/
displayName?: pulumi.Input<string>;
/**
* The user-provided ID to be assigned to the Enrollment. It should match the
* format `^a-z?$`.
*/
enrollmentId: pulumi.Input<string>;
/**
* Resource labels.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location: pulumi.Input<string>;
/**
* Resource name of the message bus identifying the source of the messages. It
* matches the form
* projects/{project}/locations/{location}/messageBuses/{messageBus}.
*/
messageBus: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}