Show / Hide Table of Contents

Class Instance

An isolated set of Cloud Spanner resources on which databases can be hosted.

To get more information about Instance, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Spanner Instance Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var example = new Gcp.Spanner.Instance("example", new Gcp.Spanner.InstanceArgs
    {
        Config = "regional-us-central1",
        DisplayName = "Test Spanner Instance",
        Labels = 
        {
            { "foo", "bar" },
        },
        NumNodes = 2,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Instance
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.Spanner
Assembly: Pulumi.Gcp.dll
Syntax
public class Instance : CustomResource

Constructors

View Source

Instance(String, InstanceArgs, CustomResourceOptions)

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

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

The unique name of the resource

InstanceArgs 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

Config

The name of the instance's configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.

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

DisplayName

The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.

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

Labels

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

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

Name

A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length.

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

NumNodes

The number of nodes allocated to this instance.

Declaration
public Output<int?> NumNodes { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Project

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

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

State

Instance status: 'CREATING' or 'READY'.

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

Methods

View Source

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

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

Declaration
public static Instance Get(string name, Input<string> id, InstanceState 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.

InstanceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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