1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. spanner
  5. getInstance
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.spanner.getInstance

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Get a spanner instance from Google Cloud by its name.

    Example Usage

    data "google_spanner_instance" "foo" {
      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
    DisplayName 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
    DisplayName 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
    displayName 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
    displayName 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
    displayName 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:

    AutoscalingConfigs List<GetInstanceAutoscalingConfig>
    EffectiveLabels Dictionary<string, string>
    ForceDestroy bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels Dictionary<string, string>
    Name string
    NumNodes int
    ProcessingUnits int
    PulumiLabels Dictionary<string, string>
    State string
    Config string
    DisplayName string
    Project string
    AutoscalingConfigs []GetInstanceAutoscalingConfig
    EffectiveLabels map[string]string
    ForceDestroy bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels map[string]string
    Name string
    NumNodes int
    ProcessingUnits int
    PulumiLabels map[string]string
    State string
    Config string
    DisplayName string
    Project string
    autoscalingConfigs List<GetInstanceAutoscalingConfig>
    effectiveLabels Map<String,String>
    forceDestroy Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String,String>
    name String
    numNodes Integer
    processingUnits Integer
    pulumiLabels Map<String,String>
    state String
    config String
    displayName String
    project String
    autoscalingConfigs GetInstanceAutoscalingConfig[]
    effectiveLabels {[key: string]: string}
    forceDestroy boolean
    id string
    The provider-assigned unique ID for this managed resource.
    labels {[key: string]: string}
    name string
    numNodes number
    processingUnits number
    pulumiLabels {[key: string]: string}
    state string
    config string
    displayName string
    project string
    autoscaling_configs Sequence[GetInstanceAutoscalingConfig]
    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
    autoscalingConfigs List<Property Map>
    effectiveLabels Map<String>
    forceDestroy Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String>
    name String
    numNodes Number
    processingUnits Number
    pulumiLabels Map<String>
    state String
    config String
    displayName String
    project String

    Supporting Types

    GetInstanceAutoscalingConfig

    AutoscalingLimits List<GetInstanceAutoscalingConfigAutoscalingLimit>
    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.
    AutoscalingTargets List<GetInstanceAutoscalingConfigAutoscalingTarget>
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
    AutoscalingLimits []GetInstanceAutoscalingConfigAutoscalingLimit
    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.
    AutoscalingTargets []GetInstanceAutoscalingConfigAutoscalingTarget
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
    autoscalingLimits List<GetInstanceAutoscalingConfigAutoscalingLimit>
    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.
    autoscalingTargets List<GetInstanceAutoscalingConfigAutoscalingTarget>
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
    autoscalingLimits GetInstanceAutoscalingConfigAutoscalingLimit[]
    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.
    autoscalingTargets GetInstanceAutoscalingConfigAutoscalingTarget[]
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
    autoscaling_limits Sequence[GetInstanceAutoscalingConfigAutoscalingLimit]
    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[GetInstanceAutoscalingConfigAutoscalingTarget]
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events
    autoscalingLimits 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.
    autoscalingTargets List<Property Map>
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events

    GetInstanceAutoscalingConfigAutoscalingLimit

    MaxNodes int
    Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
    MaxProcessingUnits int
    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.
    MinNodes int
    Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
    MinProcessingUnits int
    Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
    MaxNodes int
    Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
    MaxProcessingUnits int
    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.
    MinNodes int
    Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
    MinProcessingUnits int
    Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
    maxNodes Integer
    Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
    maxProcessingUnits Integer
    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.
    minNodes Integer
    Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
    minProcessingUnits Integer
    Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
    maxNodes number
    Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
    maxProcessingUnits number
    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.
    minNodes number
    Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
    minProcessingUnits number
    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_units int
    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_units int
    Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
    maxNodes Number
    Specifies maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
    maxProcessingUnits Number
    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.
    minNodes Number
    Specifies number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
    minProcessingUnits Number
    Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.

    GetInstanceAutoscalingConfigAutoscalingTarget

    HighPriorityCpuUtilizationPercent int
    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)..
    StorageUtilizationPercent int
    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).
    HighPriorityCpuUtilizationPercent int
    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)..
    StorageUtilizationPercent int
    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).
    highPriorityCpuUtilizationPercent Integer
    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)..
    storageUtilizationPercent Integer
    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).
    highPriorityCpuUtilizationPercent number
    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)..
    storageUtilizationPercent number
    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_cpu_utilization_percent int
    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_percent int
    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).
    highPriorityCpuUtilizationPercent Number
    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)..
    storageUtilizationPercent Number
    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.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi