Show / Hide Table of Contents

Class Service

An individual service. A service contains a name and optional metadata.

To get more information about Service, see:

  • API documentation
  • How-to Guides
  • Configuring a service

Example Usage - Service Directory Service Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var exampleNamespace = new Gcp.ServiceDirectory.Namespace("exampleNamespace", new Gcp.ServiceDirectory.NamespaceArgs
    {
        NamespaceId = "example-namespace",
        Location = "us-central1",
    });
    var exampleService = new Gcp.ServiceDirectory.Service("exampleService", new Gcp.ServiceDirectory.ServiceArgs
    {
        ServiceId = "example-service",
        Namespace = exampleNamespace.Id,
        Metadata = 
        {
            { "stage", "prod" },
            { "region", "us-central1" },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Service
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.ServiceDirectory
Assembly: Pulumi.Gcp.dll
Syntax
public class Service : CustomResource

Constructors

View Source

Service(String, ServiceArgs, CustomResourceOptions)

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

Declaration
public Service(string name, ServiceArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ServiceArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Metadata

Metadata for the service. This data can be consumed by service clients. The entire metadata dictionary may contain up to 2000 characters, spread across all key-value pairs. Metadata that goes beyond any these limits will be rejected.

Declaration
public Output<ImmutableDictionary<string, string>> Metadata { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

Name

The resource name for the service in the format 'projects//locations//namespaces//services/'.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Namespace

The resource name of the namespace this service will belong to.

Declaration
public Output<string> Namespace { get; }
Property Value
Type Description
Output<System.String>
View Source

ServiceId

The Resource ID must be 1-63 characters long, including digits, lowercase letters or the hyphen character.

Declaration
public Output<string> ServiceId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ServiceState, CustomResourceOptions)

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

Declaration
public static Service Get(string name, Input<string> id, ServiceState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ServiceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Service
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.