Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.spanner.getInstance
Explore with Pulumi AI
Get a spanner instance from Google Cloud by its name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foo = gcp.spanner.getInstance({
name: "bar",
});
import pulumi
import pulumi_gcp as gcp
foo = gcp.spanner.get_instance(name="bar")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/spanner"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := spanner.LookupInstance(ctx, &spanner.LookupInstanceArgs{
Name: "bar",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var foo = Gcp.Spanner.GetInstance.Invoke(new()
{
Name = "bar",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.spanner.SpannerFunctions;
import com.pulumi.gcp.spanner.inputs.GetInstanceArgs;
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) {
final var foo = SpannerFunctions.getInstance(GetInstanceArgs.builder()
.name("bar")
.build());
}
}
variables:
foo:
fn::invoke:
Function: gcp:spanner:getInstance
Arguments:
name: bar
Using getInstance
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 getInstance(args: GetInstanceArgs, opts?: InvokeOptions): Promise<GetInstanceResult>
function getInstanceOutput(args: GetInstanceOutputArgs, opts?: InvokeOptions): Output<GetInstanceResult>
def get_instance(config: Optional[str] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceResult
def get_instance_output(config: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceResult]
func LookupInstance(ctx *Context, args *LookupInstanceArgs, opts ...InvokeOption) (*LookupInstanceResult, error)
func LookupInstanceOutput(ctx *Context, args *LookupInstanceOutputArgs, opts ...InvokeOption) LookupInstanceResultOutput
> Note: This function is named LookupInstance
in the Go SDK.
public static class GetInstance
{
public static Task<GetInstanceResult> InvokeAsync(GetInstanceArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceResult> Invoke(GetInstanceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceResult> getInstance(GetInstanceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:spanner/getInstance:getInstance
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the spanner instance.
- Config string
- Display
Name string - Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Name string
- The name of the spanner instance.
- Config string
- Display
Name string - Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- name String
- The name of the spanner instance.
- config String
- display
Name String - project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- name string
- The name of the spanner instance.
- config string
- display
Name string - project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- name str
- The name of the spanner instance.
- config str
- display_
name str - project str
- The project in which the resource belongs. If it is not provided, the provider project is used.
- name String
- The name of the spanner instance.
- config String
- display
Name String - project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
getInstance Result
The following output properties are available:
- Autoscaling
Configs List<GetInstance Autoscaling Config> - Default
Backup stringSchedule Type - Edition string
- Effective
Labels Dictionary<string, string> - Force
Destroy bool - Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Name string
- Num
Nodes int - Processing
Units int - Pulumi
Labels Dictionary<string, string> - State string
- Config string
- Display
Name string - Project string
- Autoscaling
Configs []GetInstance Autoscaling Config - Default
Backup stringSchedule Type - Edition string
- Effective
Labels map[string]string - Force
Destroy bool - Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Name string
- Num
Nodes int - Processing
Units int - Pulumi
Labels map[string]string - State string
- Config string
- Display
Name string - Project string
- autoscaling
Configs List<GetInstance Autoscaling Config> - default
Backup StringSchedule Type - edition String
- effective
Labels Map<String,String> - force
Destroy Boolean - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- name String
- num
Nodes Integer - processing
Units Integer - pulumi
Labels Map<String,String> - state String
- config String
- display
Name String - project String
- autoscaling
Configs GetInstance Autoscaling Config[] - default
Backup stringSchedule Type - edition string
- effective
Labels {[key: string]: string} - force
Destroy boolean - id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- name string
- num
Nodes number - processing
Units number - pulumi
Labels {[key: string]: string} - state string
- config string
- display
Name string - project string
- autoscaling_
configs Sequence[GetInstance Autoscaling Config] - default_
backup_ strschedule_ type - edition str
- effective_
labels Mapping[str, str] - force_
destroy bool - id str
- The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- name str
- num_
nodes int - processing_
units int - pulumi_
labels Mapping[str, str] - state str
- config str
- display_
name str - project str
- autoscaling
Configs List<Property Map> - default
Backup StringSchedule Type - edition String
- effective
Labels Map<String> - force
Destroy Boolean - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- name String
- num
Nodes Number - processing
Units Number - pulumi
Labels Map<String> - state String
- config String
- display
Name String - project String
Supporting Types
GetInstanceAutoscalingConfig
- Asymmetric
Autoscaling List<GetOptions Instance Autoscaling Config Asymmetric Autoscaling Option> - Asymmetric autoscaling options for specific replicas.
- Autoscaling
Limits List<GetInstance Autoscaling Config Autoscaling Limit> - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
- Autoscaling
Targets List<GetInstance Autoscaling Config Autoscaling Target> - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
- Asymmetric
Autoscaling []GetOptions Instance Autoscaling Config Asymmetric Autoscaling Option - Asymmetric autoscaling options for specific replicas.
- Autoscaling
Limits []GetInstance Autoscaling Config Autoscaling Limit - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
- Autoscaling
Targets []GetInstance Autoscaling Config Autoscaling Target - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
- asymmetric
Autoscaling List<GetOptions Instance Autoscaling Config Asymmetric Autoscaling Option> - Asymmetric autoscaling options for specific replicas.
- autoscaling
Limits List<GetInstance Autoscaling Config Autoscaling Limit> - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
- autoscaling
Targets List<GetInstance Autoscaling Config Autoscaling Target> - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
- asymmetric
Autoscaling GetOptions Instance Autoscaling Config Asymmetric Autoscaling Option[] - Asymmetric autoscaling options for specific replicas.
- autoscaling
Limits GetInstance Autoscaling Config Autoscaling Limit[] - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
- autoscaling
Targets GetInstance Autoscaling Config Autoscaling Target[] - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
- asymmetric_
autoscaling_ Sequence[Getoptions Instance Autoscaling Config Asymmetric Autoscaling Option] - Asymmetric autoscaling options for specific replicas.
- autoscaling_
limits Sequence[GetInstance Autoscaling Config Autoscaling Limit] - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
- autoscaling_
targets Sequence[GetInstance Autoscaling Config Autoscaling Target] - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
- asymmetric
Autoscaling List<Property Map>Options - Asymmetric autoscaling options for specific replicas.
- autoscaling
Limits List<Property Map> - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
- autoscaling
Targets List<Property Map> - Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
GetInstanceAutoscalingConfigAsymmetricAutoscalingOption
- Overrides
List<Get
Instance Autoscaling Config Asymmetric Autoscaling Option Override> - A nested object resource.
- Replica
Selections List<GetInstance Autoscaling Config Asymmetric Autoscaling Option Replica Selection> - A nested object resource.
- Overrides
[]Get
Instance Autoscaling Config Asymmetric Autoscaling Option Override - A nested object resource.
- Replica
Selections []GetInstance Autoscaling Config Asymmetric Autoscaling Option Replica Selection - A nested object resource.
- overrides
List<Get
Instance Autoscaling Config Asymmetric Autoscaling Option Override> - A nested object resource.
- replica
Selections List<GetInstance Autoscaling Config Asymmetric Autoscaling Option Replica Selection> - A nested object resource.
- overrides
Get
Instance Autoscaling Config Asymmetric Autoscaling Option Override[] - A nested object resource.
- replica
Selections GetInstance Autoscaling Config Asymmetric Autoscaling Option Replica Selection[] - A nested object resource.
- overrides
Sequence[Get
Instance Autoscaling Config Asymmetric Autoscaling Option Override] - A nested object resource.
- replica_
selections Sequence[GetInstance Autoscaling Config Asymmetric Autoscaling Option Replica Selection] - A nested object resource.
- overrides List<Property Map>
- A nested object resource.
- replica
Selections List<Property Map> - A nested object resource.
GetInstanceAutoscalingConfigAsymmetricAutoscalingOptionOverride
- Autoscaling
Limits List<GetInstance Autoscaling Config Asymmetric Autoscaling Option Override Autoscaling Limit> - A nested object resource.
- Autoscaling
Limits []GetInstance Autoscaling Config Asymmetric Autoscaling Option Override Autoscaling Limit - A nested object resource.
- autoscaling
Limits List<GetInstance Autoscaling Config Asymmetric Autoscaling Option Override Autoscaling Limit> - A nested object resource.
- autoscaling
Limits GetInstance Autoscaling Config Asymmetric Autoscaling Option Override Autoscaling Limit[] - A nested object resource.
- autoscaling
Limits List<Property Map> - A nested object resource.
GetInstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrideAutoscalingLimit
GetInstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection
- Location string
- The location of the replica to apply asymmetric autoscaling options.
- Location string
- The location of the replica to apply asymmetric autoscaling options.
- location String
- The location of the replica to apply asymmetric autoscaling options.
- location string
- The location of the replica to apply asymmetric autoscaling options.
- location str
- The location of the replica to apply asymmetric autoscaling options.
- location String
- The location of the replica to apply asymmetric autoscaling options.
GetInstanceAutoscalingConfigAutoscalingLimit
- Max
Nodes int - Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
- Max
Processing intUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- Min
Nodes int - Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
- Min
Processing intUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- Max
Nodes int - Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
- Max
Processing intUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- Min
Nodes int - Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
- Min
Processing intUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max
Nodes Integer - Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
- max
Processing IntegerUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min
Nodes Integer - Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
- min
Processing IntegerUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max
Nodes number - Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
- max
Processing numberUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min
Nodes number - Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
- min
Processing numberUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max_
nodes int - Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
- max_
processing_ intunits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min_
nodes int - Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
- min_
processing_ intunits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max
Nodes Number - Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
- max
Processing NumberUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min
Nodes Number - Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
- min
Processing NumberUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
GetInstanceAutoscalingConfigAutoscalingTarget
- High
Priority intCpu Utilization Percent - Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
- Storage
Utilization intPercent - Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
- High
Priority intCpu Utilization Percent - Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
- Storage
Utilization intPercent - Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
- high
Priority IntegerCpu Utilization Percent - Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
- storage
Utilization IntegerPercent - Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
- high
Priority numberCpu Utilization Percent - Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
- storage
Utilization numberPercent - Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
- high_
priority_ intcpu_ utilization_ percent - Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
- storage_
utilization_ intpercent - Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
- high
Priority NumberCpu Utilization Percent - Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
- storage
Utilization NumberPercent - Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.