Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

CustomService

A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern (Wikipedia). In Cloud Monitoring, a Service acts as the root resource under which operational aspects of the service are accessible

To get more information about Service, see:

Example Usage

Monitoring Service Custom

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var custom = new Gcp.Monitoring.CustomService("custom", new Gcp.Monitoring.CustomServiceArgs
        {
            DisplayName = "My Custom Service custom-srv",
            ServiceId = "custom-srv",
            Telemetry = new Gcp.Monitoring.Inputs.CustomServiceTelemetryArgs
            {
                ResourceName = "//product.googleapis.com/foo/foo/services/test",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/monitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := monitoring.NewCustomService(ctx, "custom", &monitoring.CustomServiceArgs{
			DisplayName: pulumi.String("My Custom Service custom-srv"),
			ServiceId:   pulumi.String("custom-srv"),
			Telemetry: &monitoring.CustomServiceTelemetryArgs{
				ResourceName: pulumi.String("//product.googleapis.com/foo/foo/services/test"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var custom = new CustomService("custom", CustomServiceArgs.builder()        
            .displayName("My Custom Service custom-srv")
            .serviceId("custom-srv")
            .telemetry(CustomServiceTelemetry.builder()
                .resourceName("//product.googleapis.com/foo/foo/services/test")
                .build())
            .build());

        }
}
import pulumi
import pulumi_gcp as gcp

custom = gcp.monitoring.CustomService("custom",
    display_name="My Custom Service custom-srv",
    service_id="custom-srv",
    telemetry=gcp.monitoring.CustomServiceTelemetryArgs(
        resource_name="//product.googleapis.com/foo/foo/services/test",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const custom = new gcp.monitoring.CustomService("custom", {
    displayName: "My Custom Service custom-srv",
    serviceId: "custom-srv",
    telemetry: {
        resourceName: "//product.googleapis.com/foo/foo/services/test",
    },
});
resources:
  custom:
    type: gcp:monitoring:CustomService
    properties:
      displayName: My Custom Service custom-srv
      serviceId: custom-srv
      telemetry:
        resourceName: //product.googleapis.com/foo/foo/services/test

Create a CustomService Resource

new CustomService(name: string, args?: CustomServiceArgs, opts?: CustomResourceOptions);
@overload
def CustomService(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  display_name: Optional[str] = None,
                  project: Optional[str] = None,
                  service_id: Optional[str] = None,
                  telemetry: Optional[CustomServiceTelemetryArgs] = None)
@overload
def CustomService(resource_name: str,
                  args: Optional[CustomServiceArgs] = None,
                  opts: Optional[ResourceOptions] = None)
func NewCustomService(ctx *Context, name string, args *CustomServiceArgs, opts ...ResourceOption) (*CustomService, error)
public CustomService(string name, CustomServiceArgs? args = null, CustomResourceOptions? opts = null)
public CustomService(String name, CustomServiceArgs args)
public CustomService(String name, CustomServiceArgs args, CustomResourceOptions options)
type: gcp:monitoring:CustomService
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CustomServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args CustomServiceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CustomServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CustomServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CustomServiceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CustomService Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The CustomService resource accepts the following input properties:

DisplayName string

Name used for UI elements listing this Service.

Project string

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

ServiceId string

An optional service ID to use. If not given, the server will generate a service ID.

Telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

DisplayName string

Name used for UI elements listing this Service.

Project string

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

ServiceId string

An optional service ID to use. If not given, the server will generate a service ID.

Telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

displayName String

Name used for UI elements listing this Service.

project String

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

serviceId String

An optional service ID to use. If not given, the server will generate a service ID.

telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

displayName string

Name used for UI elements listing this Service.

project string

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

serviceId string

An optional service ID to use. If not given, the server will generate a service ID.

telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

display_name str

Name used for UI elements listing this Service.

project str

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

service_id str

An optional service ID to use. If not given, the server will generate a service ID.

telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

displayName String

Name used for UI elements listing this Service.

project String

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

serviceId String

An optional service ID to use. If not given, the server will generate a service ID.

telemetry Property Map

Configuration for how to query telemetry on a Service. Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomService resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

Id string

The provider-assigned unique ID for this managed resource.

Name string

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

id String

The provider-assigned unique ID for this managed resource.

name String

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

id string

The provider-assigned unique ID for this managed resource.

name string

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

id str

The provider-assigned unique ID for this managed resource.

name str

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

id String

The provider-assigned unique ID for this managed resource.

name String

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

Look up an Existing CustomService Resource

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

public static get(name: string, id: Input<ID>, state?: CustomServiceState, opts?: CustomResourceOptions): CustomService
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        display_name: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        service_id: Optional[str] = None,
        telemetry: Optional[CustomServiceTelemetryArgs] = None) -> CustomService
func GetCustomService(ctx *Context, name string, id IDInput, state *CustomServiceState, opts ...ResourceOption) (*CustomService, error)
public static CustomService Get(string name, Input<string> id, CustomServiceState? state, CustomResourceOptions? opts = null)
public static CustomService get(String name, Output<String> id, CustomServiceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DisplayName string

Name used for UI elements listing this Service.

Name string

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

Project string

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

ServiceId string

An optional service ID to use. If not given, the server will generate a service ID.

Telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

DisplayName string

Name used for UI elements listing this Service.

Name string

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

Project string

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

ServiceId string

An optional service ID to use. If not given, the server will generate a service ID.

Telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

displayName String

Name used for UI elements listing this Service.

name String

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

project String

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

serviceId String

An optional service ID to use. If not given, the server will generate a service ID.

telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

displayName string

Name used for UI elements listing this Service.

name string

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

project string

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

serviceId string

An optional service ID to use. If not given, the server will generate a service ID.

telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

display_name str

Name used for UI elements listing this Service.

name str

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

project str

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

service_id str

An optional service ID to use. If not given, the server will generate a service ID.

telemetry CustomServiceTelemetryArgs

Configuration for how to query telemetry on a Service. Structure is documented below.

displayName String

Name used for UI elements listing this Service.

name String

The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].

project String

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

serviceId String

An optional service ID to use. If not given, the server will generate a service ID.

telemetry Property Map

Configuration for how to query telemetry on a Service. Structure is documented below.

Supporting Types

CustomServiceTelemetry

ResourceName string

The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.

ResourceName string

The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.

resourceName String

The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.

resourceName string

The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.

resource_name str

The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.

resourceName String

The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.

Import

Service can be imported using any of these accepted formats

 $ pulumi import gcp:monitoring/customService:CustomService default {{name}}

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.