import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * The Eventarc GoogleApiSource resource * * To get more information about GoogleApiSource, see: * * * [API documentation](https://cloud.google.com/eventarc/docs/reference/rest/v1/projects.locations.googleApiSources) * * How-to Guides * * [Official Documentation](https://cloud.google.com/eventarc/advanced/docs/publish-events/publish-events-google-sources) * * ## Example Usage * * ### Eventarc Google Api Source With Cmek * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testProject = gcp.organizations.getProject({ * projectId: "my-project-name", * }); * const testKeyRing = gcp.kms.getKMSKeyRing({ * name: "keyring", * location: "us-central1", * }); * const key = testKeyRing.then(testKeyRing => gcp.kms.getKMSCryptoKey({ * name: "key", * keyRing: testKeyRing.id, * })); * const keyMember = new gcp.kms.CryptoKeyIAMMember("key_member", { * cryptoKeyId: key.then(key => key.id), * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: testProject.then(testProject => `serviceAccount:service-${testProject.number}@gcp-sa-eventarc.iam.gserviceaccount.com`), * }); * const messageBus = new gcp.eventarc.MessageBus("message_bus", { * location: "us-central1", * messageBusId: "some-message-bus", * }); * const primary = new gcp.eventarc.GoogleApiSource("primary", { * location: "us-central1", * googleApiSourceId: "some-google-api-source", * destination: messageBus.id, * cryptoKeyName: key.then(key => key.id), * }, { * dependsOn: [keyMember], * }); * ``` * * ## Import * * GoogleApiSource can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/googleApiSources/{{google_api_source_id}}` * * * `{{project}}/{{location}}/{{google_api_source_id}}` * * * `{{location}}/{{google_api_source_id}}` * * When using the `pulumi import` command, GoogleApiSource can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:eventarc/googleApiSource:GoogleApiSource default projects/{{project}}/locations/{{location}}/googleApiSources/{{google_api_source_id}} * ``` * * ```sh * $ pulumi import gcp:eventarc/googleApiSource:GoogleApiSource default {{project}}/{{location}}/{{google_api_source_id}} * ``` * * ```sh * $ pulumi import gcp:eventarc/googleApiSource:GoogleApiSource default {{location}}/{{google_api_source_id}} * ``` */ export declare class GoogleApiSource extends pulumi.CustomResource { /** * Get an existing GoogleApiSource 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?: GoogleApiSourceState, opts?: pulumi.CustomResourceOptions): GoogleApiSource; /** * Returns true if the given object is an instance of GoogleApiSource. 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 GoogleApiSource; /** * 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>; /** * The creation time. */ readonly createTime: pulumi.Output; /** * Resource name of a KMS crypto key (managed by the user) used to * encrypt/decrypt their event data. * It must match the pattern * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. */ readonly cryptoKeyName: pulumi.Output; /** * Destination is the message bus that the GoogleApiSource is delivering to. * It must be point to the full resource name of a MessageBus. Format: * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID) */ readonly destination: pulumi.Output; /** * Resource display name. */ readonly displayName: pulumi.Output; 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; }>; /** * 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; /** * The user-provided ID to be assigned to the GoogleApiSource. It should match * the format `^a-z?$`. */ readonly googleApiSourceId: pulumi.Output; /** * 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; /** * The configuration for Platform Telemetry logging for Eventarc Advanced * resources. * Structure is documented below. */ readonly loggingConfig: pulumi.Output; /** * Resource name of the form * projects/{project}/locations/{location}/googleApiSources/{google_api_source} */ 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 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; /** * The last-modified time. */ readonly updateTime: pulumi.Output; /** * Create a GoogleApiSource 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: GoogleApiSourceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GoogleApiSource resources. */ export interface GoogleApiSourceState { /** * 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; }>; /** * The creation time. */ createTime?: pulumi.Input; /** * Resource name of a KMS crypto key (managed by the user) used to * encrypt/decrypt their event data. * It must match the pattern * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. */ cryptoKeyName?: pulumi.Input; /** * Destination is the message bus that the GoogleApiSource is delivering to. * It must be point to the full resource name of a MessageBus. Format: * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID) */ destination?: pulumi.Input; /** * Resource display name. */ displayName?: pulumi.Input; effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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; }>; /** * 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; /** * The user-provided ID to be assigned to the GoogleApiSource. It should match * the format `^a-z?$`. */ googleApiSourceId?: pulumi.Input; /** * 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; }>; /** * 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; /** * The configuration for Platform Telemetry logging for Eventarc Advanced * resources. * Structure is documented below. */ loggingConfig?: pulumi.Input; /** * Resource name of the form * projects/{project}/locations/{location}/googleApiSources/{google_api_source} */ 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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; /** * The last-modified time. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a GoogleApiSource resource. */ export interface GoogleApiSourceArgs { /** * 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; }>; /** * Resource name of a KMS crypto key (managed by the user) used to * encrypt/decrypt their event data. * It must match the pattern * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. */ cryptoKeyName?: pulumi.Input; /** * Destination is the message bus that the GoogleApiSource is delivering to. * It must be point to the full resource name of a MessageBus. Format: * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID) */ destination: pulumi.Input; /** * Resource display name. */ displayName?: pulumi.Input; /** * The user-provided ID to be assigned to the GoogleApiSource. It should match * the format `^a-z?$`. */ googleApiSourceId: pulumi.Input; /** * 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; }>; /** * 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; /** * The configuration for Platform Telemetry logging for Eventarc Advanced * resources. * Structure is documented below. */ loggingConfig?: 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; }