getAppEngineService

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:

Example Usage

Monitoring App Engine Service

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var bucket = new Gcp.Storage.Bucket("bucket", new()
    {
        Location = "US",
    });

    var @object = new Gcp.Storage.BucketObject("object", new()
    {
        Bucket = bucket.Name,
        Source = new FileAsset("./test-fixtures/appengine/hello-world.zip"),
    });

    var myapp = new Gcp.AppEngine.StandardAppVersion("myapp", new()
    {
        VersionId = "v1",
        Service = "myapp",
        Runtime = "nodejs10",
        Entrypoint = new Gcp.AppEngine.Inputs.StandardAppVersionEntrypointArgs
        {
            Shell = "node ./app.js",
        },
        Deployment = new Gcp.AppEngine.Inputs.StandardAppVersionDeploymentArgs
        {
            Zip = new Gcp.AppEngine.Inputs.StandardAppVersionDeploymentZipArgs
            {
                SourceUrl = Output.Tuple(bucket.Name, @object.Name).Apply(values =>
                {
                    var bucketName = values.Item1;
                    var objectName = values.Item2;
                    return $"https://storage.googleapis.com/{bucketName}/{objectName}";
                }),
            },
        },
        EnvVariables = 
        {
            { "port", "8080" },
        },
        DeleteServiceOnDestroy = false,
    });

    var srv = Gcp.Monitoring.GetAppEngineService.Invoke(new()
    {
        ModuleId = myapp.Service,
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/appengine"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/monitoring"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
			Location: pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		object, err := storage.NewBucketObject(ctx, "object", &storage.BucketObjectArgs{
			Bucket: bucket.Name,
			Source: pulumi.NewFileAsset("./test-fixtures/appengine/hello-world.zip"),
		})
		if err != nil {
			return err
		}
		myapp, err := appengine.NewStandardAppVersion(ctx, "myapp", &appengine.StandardAppVersionArgs{
			VersionId: pulumi.String("v1"),
			Service:   pulumi.String("myapp"),
			Runtime:   pulumi.String("nodejs10"),
			Entrypoint: &appengine.StandardAppVersionEntrypointArgs{
				Shell: pulumi.String("node ./app.js"),
			},
			Deployment: &appengine.StandardAppVersionDeploymentArgs{
				Zip: &appengine.StandardAppVersionDeploymentZipArgs{
					SourceUrl: pulumi.All(bucket.Name, object.Name).ApplyT(func(_args []interface{}) (string, error) {
						bucketName := _args[0].(string)
						objectName := _args[1].(string)
						return fmt.Sprintf("https://storage.googleapis.com/%v/%v", bucketName, objectName), nil
					}).(pulumi.StringOutput),
				},
			},
			EnvVariables: pulumi.StringMap{
				"port": pulumi.String("8080"),
			},
			DeleteServiceOnDestroy: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		_ = monitoring.GetAppEngineServiceOutput(ctx, monitoring.GetAppEngineServiceOutputArgs{
			ModuleId: myapp.Service,
		}, nil)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.appengine.StandardAppVersion;
import com.pulumi.gcp.appengine.StandardAppVersionArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionEntrypointArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionDeploymentArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionDeploymentZipArgs;
import com.pulumi.gcp.monitoring.MonitoringFunctions;
import com.pulumi.gcp.monitoring.inputs.GetAppEngineServiceArgs;
import com.pulumi.asset.FileAsset;
import java.util.List;
import java.util.ArrayList;
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 bucket = new Bucket("bucket", BucketArgs.builder()        
            .location("US")
            .build());

        var object = new BucketObject("object", BucketObjectArgs.builder()        
            .bucket(bucket.name())
            .source(new FileAsset("./test-fixtures/appengine/hello-world.zip"))
            .build());

        var myapp = new StandardAppVersion("myapp", StandardAppVersionArgs.builder()        
            .versionId("v1")
            .service("myapp")
            .runtime("nodejs10")
            .entrypoint(StandardAppVersionEntrypointArgs.builder()
                .shell("node ./app.js")
                .build())
            .deployment(StandardAppVersionDeploymentArgs.builder()
                .zip(StandardAppVersionDeploymentZipArgs.builder()
                    .sourceUrl(Output.tuple(bucket.name(), object.name()).applyValue(values -> {
                        var bucketName = values.t1;
                        var objectName = values.t2;
                        return String.format("https://storage.googleapis.com/%s/%s", bucketName,objectName);
                    }))
                    .build())
                .build())
            .envVariables(Map.of("port", "8080"))
            .deleteServiceOnDestroy(false)
            .build());

        final var srv = MonitoringFunctions.getAppEngineService(GetAppEngineServiceArgs.builder()
            .moduleId(myapp.service())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

bucket = gcp.storage.Bucket("bucket", location="US")
object = gcp.storage.BucketObject("object",
    bucket=bucket.name,
    source=pulumi.FileAsset("./test-fixtures/appengine/hello-world.zip"))
myapp = gcp.appengine.StandardAppVersion("myapp",
    version_id="v1",
    service="myapp",
    runtime="nodejs10",
    entrypoint=gcp.appengine.StandardAppVersionEntrypointArgs(
        shell="node ./app.js",
    ),
    deployment=gcp.appengine.StandardAppVersionDeploymentArgs(
        zip=gcp.appengine.StandardAppVersionDeploymentZipArgs(
            source_url=pulumi.Output.all(bucket.name, object.name).apply(lambda bucketName, objectName: f"https://storage.googleapis.com/{bucket_name}/{object_name}"),
        ),
    ),
    env_variables={
        "port": "8080",
    },
    delete_service_on_destroy=False)
srv = gcp.monitoring.get_app_engine_service_output(module_id=myapp.service)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const bucket = new gcp.storage.Bucket("bucket", {location: "US"});
const object = new gcp.storage.BucketObject("object", {
    bucket: bucket.name,
    source: new pulumi.asset.FileAsset("./test-fixtures/appengine/hello-world.zip"),
});
const myapp = new gcp.appengine.StandardAppVersion("myapp", {
    versionId: "v1",
    service: "myapp",
    runtime: "nodejs10",
    entrypoint: {
        shell: "node ./app.js",
    },
    deployment: {
        zip: {
            sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${bucket.name}/${object.name}`,
        },
    },
    envVariables: {
        port: "8080",
    },
    deleteServiceOnDestroy: false,
});
const srv = gcp.monitoring.getAppEngineServiceOutput({
    moduleId: myapp.service,
});
resources:
  myapp:
    type: gcp:appengine:StandardAppVersion
    properties:
      versionId: v1
      service: myapp
      runtime: nodejs10
      entrypoint:
        shell: node ./app.js
      deployment:
        zip:
          sourceUrl: https://storage.googleapis.com/${bucket.name}/${object.name}
      envVariables:
        port: '8080'
      deleteServiceOnDestroy: false
  bucket:
    type: gcp:storage:Bucket
    properties:
      location: US
  object:
    type: gcp:storage:BucketObject
    properties:
      bucket: ${bucket.name}
      source:
        fn::FileAsset: ./test-fixtures/appengine/hello-world.zip
variables:
  srv:
    fn::invoke:
      Function: gcp:monitoring:getAppEngineService
      Arguments:
        moduleId: ${myapp.service}

Using getAppEngineService

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAppEngineService(args: GetAppEngineServiceArgs, opts?: InvokeOptions): Promise<GetAppEngineServiceResult>
function getAppEngineServiceOutput(args: GetAppEngineServiceOutputArgs, opts?: InvokeOptions): Output<GetAppEngineServiceResult>
def get_app_engine_service(module_id: Optional[str] = None,
                           project: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAppEngineServiceResult
def get_app_engine_service_output(module_id: Optional[pulumi.Input[str]] = None,
                           project: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAppEngineServiceResult]
func GetAppEngineService(ctx *Context, args *GetAppEngineServiceArgs, opts ...InvokeOption) (*GetAppEngineServiceResult, error)
func GetAppEngineServiceOutput(ctx *Context, args *GetAppEngineServiceOutputArgs, opts ...InvokeOption) GetAppEngineServiceResultOutput

> Note: This function is named GetAppEngineService in the Go SDK.

public static class GetAppEngineService 
{
    public static Task<GetAppEngineServiceResult> InvokeAsync(GetAppEngineServiceArgs args, InvokeOptions? opts = null)
    public static Output<GetAppEngineServiceResult> Invoke(GetAppEngineServiceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppEngineServiceResult> getAppEngineService(GetAppEngineServiceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:monitoring/getAppEngineService:getAppEngineService
  arguments:
    # arguments dictionary

The following arguments are supported:

ModuleId string

The ID of the App Engine module underlying this service. Corresponds to the moduleId resource label in the gae_app monitored resource, or the service/module name.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ModuleId string

The ID of the App Engine module underlying this service. Corresponds to the moduleId resource label in the gae_app monitored resource, or the service/module name.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

moduleId String

The ID of the App Engine module underlying this service. Corresponds to the moduleId resource label in the gae_app monitored resource, or the service/module name.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

moduleId string

The ID of the App Engine module underlying this service. Corresponds to the moduleId resource label in the gae_app monitored resource, or the service/module name.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

module_id str

The ID of the App Engine module underlying this service. Corresponds to the moduleId resource label in the gae_app monitored resource, or the service/module name.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

moduleId String

The ID of the App Engine module underlying this service. Corresponds to the moduleId resource label in the gae_app monitored resource, or the service/module name.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

getAppEngineService Result

The following output properties are available:

DisplayName string
Id string

The provider-assigned unique ID for this managed resource.

ModuleId string
Name string
ServiceId string
Telemetries List<GetAppEngineServiceTelemetry>
UserLabels Dictionary<string, string>
Project string
DisplayName string
Id string

The provider-assigned unique ID for this managed resource.

ModuleId string
Name string
ServiceId string
Telemetries []GetAppEngineServiceTelemetry
UserLabels map[string]string
Project string
displayName String
id String

The provider-assigned unique ID for this managed resource.

moduleId String
name String
serviceId String
telemetries List<GetAppEngineServiceTelemetry>
userLabels Map<String,String>
project String
displayName string
id string

The provider-assigned unique ID for this managed resource.

moduleId string
name string
serviceId string
telemetries GetAppEngineServiceTelemetry[]
userLabels {[key: string]: string}
project string
display_name str
id str

The provider-assigned unique ID for this managed resource.

module_id str
name str
service_id str
telemetries Sequence[GetAppEngineServiceTelemetry]
user_labels Mapping[str, str]
project str
displayName String
id String

The provider-assigned unique ID for this managed resource.

moduleId String
name String
serviceId String
telemetries List<Property Map>
userLabels Map<String>
project String

Supporting Types

GetAppEngineServiceTelemetry

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.