Enrollment class
The Eventarc Enrollment resource
To get more information about Enrollment, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage
Eventarc Enrollment With Pipeline Destination
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 pulumi
import pulumi_gcp as gcp
pipeline = gcp.eventarc.Pipeline("pipeline",
location="us-central1",
pipeline_id="some-pipeline",
destinations=[{
"http_endpoint": {
"uri": "https://10.77.0.0:80/route",
},
"network_config": {
"network_attachment": "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment",
},
}])
primary = gcp.eventarc.Enrollment("primary",
location="us-central1",
enrollment_id="some-enrollment",
message_bus=primary_google_eventarc_message_bus["id"],
destination=pipeline.id,
cel_match="message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'")
message_bus = gcp.eventarc.MessageBus("message_bus",
location="us-central1",
message_bus_id="some-message-bus")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var pipeline = new Gcp.Eventarc.Pipeline("pipeline", new()
{
Location = "us-central1",
PipelineId = "some-pipeline",
Destinations = new[]
{
new Gcp.Eventarc.Inputs.PipelineDestinationArgs
{
HttpEndpoint = new Gcp.Eventarc.Inputs.PipelineDestinationHttpEndpointArgs
{
Uri = "https://10.77.0.0:80/route",
},
NetworkConfig = new Gcp.Eventarc.Inputs.PipelineDestinationNetworkConfigArgs
{
NetworkAttachment = "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment",
},
},
},
});
var primary = new Gcp.Eventarc.Enrollment("primary", new()
{
Location = "us-central1",
EnrollmentId = "some-enrollment",
MessageBus = primaryGoogleEventarcMessageBus.Id,
Destination = pipeline.Id,
CelMatch = "message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'",
});
var messageBus = new Gcp.Eventarc.MessageBus("message_bus", new()
{
Location = "us-central1",
MessageBusId = "some-message-bus",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/eventarc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pipeline, err := eventarc.NewPipeline(ctx, "pipeline", &eventarc.PipelineArgs{
Location: pulumi.String("us-central1"),
PipelineId: pulumi.String("some-pipeline"),
Destinations: eventarc.PipelineDestinationArray{
&eventarc.PipelineDestinationArgs{
HttpEndpoint: &eventarc.PipelineDestinationHttpEndpointArgs{
Uri: pulumi.String("https://10.77.0.0:80/route"),
},
NetworkConfig: &eventarc.PipelineDestinationNetworkConfigArgs{
NetworkAttachment: pulumi.String("projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment"),
},
},
},
})
if err != nil {
return err
}
_, err = eventarc.NewEnrollment(ctx, "primary", &eventarc.EnrollmentArgs{
Location: pulumi.String("us-central1"),
EnrollmentId: pulumi.String("some-enrollment"),
MessageBus: pulumi.Any(primaryGoogleEventarcMessageBus.Id),
Destination: pipeline.ID().ToIDOutput().ToStringOutput(),
CelMatch: pulumi.String("message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'"),
})
if err != nil {
return err
}
_, err = eventarc.NewMessageBus(ctx, "message_bus", &eventarc.MessageBusArgs{
Location: pulumi.String("us-central1"),
MessageBusId: pulumi.String("some-message-bus"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_eventarc_enrollment" "primary" {
location = "us-central1"
enrollment_id = "some-enrollment"
message_bus = primaryGoogleEventarcMessageBus.id
destination = gcp_eventarc_pipeline.pipeline.id
cel_match = "message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'"
}
resource "gcp_eventarc_pipeline" "pipeline" {
location = "us-central1"
pipeline_id = "some-pipeline"
destinations {
http_endpoint = {
uri = "https://10.77.0.0:80/route"
}
network_config = {
network_attachment = "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment"
}
}
}
resource "gcp_eventarc_messagebus" "message_bus" {
location = "us-central1"
message_bus_id = "some-message-bus"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.eventarc.Pipeline;
import com.pulumi.gcp.eventarc.PipelineArgs;
import com.pulumi.gcp.eventarc.inputs.PipelineDestinationArgs;
import com.pulumi.gcp.eventarc.inputs.PipelineDestinationHttpEndpointArgs;
import com.pulumi.gcp.eventarc.inputs.PipelineDestinationNetworkConfigArgs;
import com.pulumi.gcp.eventarc.Enrollment;
import com.pulumi.gcp.eventarc.EnrollmentArgs;
import com.pulumi.gcp.eventarc.MessageBus;
import com.pulumi.gcp.eventarc.MessageBusArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var pipeline = new Pipeline("pipeline", PipelineArgs.builder()
.location("us-central1")
.pipelineId("some-pipeline")
.destinations(PipelineDestinationArgs.builder()
.httpEndpoint(PipelineDestinationHttpEndpointArgs.builder()
.uri("https://10.77.0.0:80/route")
.build())
.networkConfig(PipelineDestinationNetworkConfigArgs.builder()
.networkAttachment("projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment")
.build())
.build())
.build());
var primary = new Enrollment("primary", EnrollmentArgs.builder()
.location("us-central1")
.enrollmentId("some-enrollment")
.messageBus(primaryGoogleEventarcMessageBus.get("id"))
.destination(pipeline.id())
.celMatch("message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'")
.build());
var messageBus = new MessageBus("messageBus", MessageBusArgs.builder()
.location("us-central1")
.messageBusId("some-message-bus")
.build());
}
}
resources:
primary:
type: gcp:eventarc:Enrollment
properties:
location: us-central1
enrollmentId: some-enrollment
messageBus: ${primaryGoogleEventarcMessageBus.id}
destination: ${pipeline.id}
celMatch: message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'
pipeline:
type: gcp:eventarc:Pipeline
properties:
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
messageBus:
type: gcp:eventarc:MessageBus
name: message_bus
properties:
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:
$ pulumi import gcp:eventarc/enrollment:Enrollment default projects/{{project}}/locations/{{location}}/enrollments/{{enrollment_id}}
$ pulumi import gcp:eventarc/enrollment:Enrollment default {{project}}/{{location}}/{{enrollment_id}}
$ pulumi import gcp:eventarc/enrollment:Enrollment default {{location}}/{{enrollment_id}}
Constructors
- Enrollment(String name, {EnrollmentArgs? args, CustomResourceOptions? options})
-
Creates a new Enrollment.
nameThe Pulumi resource name.argsArguments used to configure this Enrollment. The set of arguments for Enrollment.optionsResource options controlling this resource's behavior. - Enrollment.reference(String urn)
- Creates a typed reference to an existing Enrollment resource.
Properties
-
annotations
↔ Output<
Map< String, String> ?> -
Resource annotations.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effectiveAnnotationsfor all of the annotations present on the resource.latefinal -
celMatch
↔ Output<
String> -
A CEL expression identifying which messages this enrollment applies to.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTime
↔ Output<
String> -
The creation time.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
destination
↔ 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)"
latefinal
-
displayName
↔ Output<
String?> -
Resource display name.
latefinal
-
effectiveAnnotations
↔ Output<
Map< String, String> > -
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
latefinal
-
effectiveLabels
↔ Output<
Map< String, String> > -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
-
enrollmentId
↔ Output<
String> -
The user-provided ID to be assigned to the Enrollment. It should match the
format
^a-z?$.latefinal -
etag
↔ 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.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
labels
↔ Output<
Map< String, String> ?> -
Resource labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource.latefinal -
location
↔ Output<
String> -
Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.latefinal -
messageBus
↔ Output<
String> -
Resource name of the message bus identifying the source of the messages. It
matches the form
projects/{project}/locations/{location}/messageBuses/{messageBus}.
latefinal
-
name
↔ Output<
String> -
Resource name of the form
projects/{project}/locations/{location}/enrollments/{enrollment}
latefinal
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
pulumiLabels
↔ Output<
Map< String, String> > -
The combination of labels configured directly on the resource
and default labels configured on the provider.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
uid
↔ Output<
String> -
Server assigned unique identifier for the channel. The value is a UUID4
string and guaranteed to remain unchanged until the resource is deleted.
latefinal
-
updateTime
↔ Output<
String> -
The last-modified time.
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {EnrollmentState? state, CustomResourceOptions? options}) → Enrollment -
Gets an existing Enrollment resource's state with the given
nameandid.