Module endpoints

@pulumi/gcp > endpoints

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

class Service

extends CustomResource

This resource creates and rolls out a Cloud Endpoints service using OpenAPI or gRPC. View the relevant docs for OpenAPI and gRPC.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as gcp from "@pulumi/gcp";

const grpcService = new gcp.endpoints.Service("grpcService", {
    grpcConfig: fs.readFileSync("service_spec.yml", "utf-8"),
    project: "project-id",
    protocOutputBase64: Buffer.from(fs.readFileSync("compiled_descriptor_file.pb", "utf-8")).toString("base64"),
    serviceName: "api-name.endpoints.project-id.cloud.goog",
});
const openapiService = new gcp.endpoints.Service("openapiService", {
    openapiConfig: fs.readFileSync("openapi_spec.yml", "utf-8"),
    project: "project-id",
    serviceName: "api-name.endpoints.project-id.cloud.goog",
});

The example in examples/endpoints_on_compute_engine shows the API from the quickstart running on a Compute Engine VM and reachable through Cloud Endpoints, which may also be useful.

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/endpoints_service.html.markdown.

constructor

new Service(name: string, args: ServiceArgs, opts?: pulumi.CustomResourceOptions)

Create a Service resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceState, opts?: pulumi.CustomResourceOptions): Service

Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Service. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property apis

public apis: pulumi.Output<{
    methods: {
        name: string;
        requestType: string;
        responseType: string;
        syntax: string;
    }[];
    name: string;
    syntax: string;
    version: string;
}[]>;

property configId

public configId: pulumi.Output<string>;

property dnsAddress

public dnsAddress: pulumi.Output<string>;

property endpoints

public endpoints: pulumi.Output<{
    address: string;
    name: string;
}[]>;

property grpcConfig

public grpcConfig: pulumi.Output<string | undefined>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property openapiConfig

public openapiConfig: pulumi.Output<string | undefined>;

property project

public project: pulumi.Output<string>;

property protocOutputBase64

public protocOutputBase64: pulumi.Output<string | undefined>;

property serviceName

public serviceName: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface ServiceArgs

The set of arguments for constructing a Service resource.

property grpcConfig

grpcConfig?: pulumi.Input<string>;

property openapiConfig

openapiConfig?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

property protocOutputBase64

protocOutputBase64?: pulumi.Input<string>;

property serviceName

serviceName: pulumi.Input<string>;

interface ServiceState

Input properties used for looking up and filtering Service resources.

property apis

apis?: pulumi.Input<pulumi.Input<{
    methods: pulumi.Input<pulumi.Input<{
        name: pulumi.Input<string>;
        requestType: pulumi.Input<string>;
        responseType: pulumi.Input<string>;
        syntax: pulumi.Input<string>;
    }>[]>;
    name: pulumi.Input<string>;
    syntax: pulumi.Input<string>;
    version: pulumi.Input<string>;
}>[]>;

property configId

configId?: pulumi.Input<string>;

property dnsAddress

dnsAddress?: pulumi.Input<string>;

property endpoints

endpoints?: pulumi.Input<pulumi.Input<{
    address: pulumi.Input<string>;
    name: pulumi.Input<string>;
}>[]>;

property grpcConfig

grpcConfig?: pulumi.Input<string>;

property openapiConfig

openapiConfig?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

property protocOutputBase64

protocOutputBase64?: pulumi.Input<string>;

property serviceName

serviceName?: pulumi.Input<string>;