UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

181 lines (180 loc) 6.12 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * A Monitoring Service is the root resource under which operational aspects of a * generic service are accessible. A service is some discrete, autonomous, and * network-accessible unit, designed to solve an individual concern * * An App Engine monitoring service is automatically created by GCP to monitor * App Engine services. * * To get more information about Service, see: * * * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services) * * How-to Guides * * [Service Monitoring](https://cloud.google.com/monitoring/service-monitoring) * * [Monitoring API Documentation](https://cloud.google.com/monitoring/api/v3/) * * ## Example Usage * * ### Monitoring App Engine Service * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bucket = new gcp.storage.Bucket("bucket", { * name: "appengine-static-content", * location: "US", * }); * const object = new gcp.storage.BucketObject("object", { * name: "hello-world.zip", * bucket: bucket.name, * source: new pulumi.asset.FileAsset("./test-fixtures/hello-world.zip"), * }); * const myapp = new gcp.appengine.StandardAppVersion("myapp", { * versionId: "v1", * service: "myapp", * runtime: "nodejs20", * entrypoint: { * shell: "node ./app.js", * }, * deployment: { * zip: { * sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${bucket.name}/${object.name}`, * }, * }, * envVariables: { * port: "8080", * }, * deleteServiceOnDestroy: false, * }); * // Monitors the default AppEngine service * const srv = gcp.monitoring.getAppEngineServiceOutput({ * moduleId: myapp.service, * }); * ``` */ export declare function getAppEngineService(args: GetAppEngineServiceArgs, opts?: pulumi.InvokeOptions): Promise<GetAppEngineServiceResult>; /** * A collection of arguments for invoking getAppEngineService. */ export interface GetAppEngineServiceArgs { /** * The ID of the App Engine module underlying this * service. Corresponds to the moduleId resource label in the [gaeApp](https://cloud.google.com/monitoring/api/resources#tag_gae_app) monitored resource, or the service/module name. * * - - - * * Other optional fields include: */ moduleId: string; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: string; } /** * A collection of values returned by getAppEngineService. */ export interface GetAppEngineServiceResult { /** * Name used for UI elements listing this (Monitoring) Service. */ readonly displayName: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly moduleId: string; /** * The full REST resource name for this channel. The syntax is: * `projects/[PROJECT_ID]/services/[SERVICE_ID]`. */ readonly name: string; readonly project?: string; readonly serviceId: string; /** * Configuration for how to query telemetry on the Service. Structure is documented below. */ readonly telemetries: outputs.monitoring.GetAppEngineServiceTelemetry[]; readonly userLabels: { [key: string]: string; }; } /** * A Monitoring Service is the root resource under which operational aspects of a * generic service are accessible. A service is some discrete, autonomous, and * network-accessible unit, designed to solve an individual concern * * An App Engine monitoring service is automatically created by GCP to monitor * App Engine services. * * To get more information about Service, see: * * * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services) * * How-to Guides * * [Service Monitoring](https://cloud.google.com/monitoring/service-monitoring) * * [Monitoring API Documentation](https://cloud.google.com/monitoring/api/v3/) * * ## Example Usage * * ### Monitoring App Engine Service * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bucket = new gcp.storage.Bucket("bucket", { * name: "appengine-static-content", * location: "US", * }); * const object = new gcp.storage.BucketObject("object", { * name: "hello-world.zip", * bucket: bucket.name, * source: new pulumi.asset.FileAsset("./test-fixtures/hello-world.zip"), * }); * const myapp = new gcp.appengine.StandardAppVersion("myapp", { * versionId: "v1", * service: "myapp", * runtime: "nodejs20", * entrypoint: { * shell: "node ./app.js", * }, * deployment: { * zip: { * sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${bucket.name}/${object.name}`, * }, * }, * envVariables: { * port: "8080", * }, * deleteServiceOnDestroy: false, * }); * // Monitors the default AppEngine service * const srv = gcp.monitoring.getAppEngineServiceOutput({ * moduleId: myapp.service, * }); * ``` */ export declare function getAppEngineServiceOutput(args: GetAppEngineServiceOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAppEngineServiceResult>; /** * A collection of arguments for invoking getAppEngineService. */ export interface GetAppEngineServiceOutputArgs { /** * The ID of the App Engine module underlying this * service. Corresponds to the moduleId resource label in the [gaeApp](https://cloud.google.com/monitoring/api/resources#tag_gae_app) monitored resource, or the service/module name. * * - - - * * Other optional fields include: */ moduleId: 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>; }