Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getInstances

This data source provides the Sddp Instances of the current Alibaba Cloud user.

NOTE: Available in v1.136.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Sddp.GetInstances.InvokeAsync());
        this.SddpInstanceId = @default.Apply(@default => @default.Instances?[0]);
    }

    [Output("sddpInstanceId")]
    public Output<string> SddpInstanceId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sddp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := sddp.GetInstances(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("sddpInstanceId", _default.Instances[0])
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sddp.SddpFunctions;
import com.pulumi.alicloud.actiontrail.inputs.GetInstancesArgs;
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 default = SddpFunctions.getInstances();

        ctx.export("sddpInstanceId", default_.instances()[0]);
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.sddp.get_instances()
pulumi.export("sddpInstanceId", default.instances[0])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.sddp.getInstances({});
export const sddpInstanceId = _default.then(_default => _default.instances?[0]);
variables:
  default:
    Fn::Invoke:
      Function: alicloud:sddp:getInstances
      Arguments: {}
outputs:
  sddpInstanceId: ${default.instances[0]}

Using getInstances

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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
def get_instances(output_file: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetInstancesResult
def get_instances_output(output_file: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput

> Note: This function is named GetInstances in the Go SDK.

public static class GetInstances 
{
    public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:sddp/getInstances:getInstances
  arguments:
    # arguments dictionary

The following arguments are supported:

OutputFile string
OutputFile string
outputFile String
outputFile string
outputFile String

getInstances Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Instances List<Pulumi.AliCloud.Sddp.Outputs.GetInstancesInstance>
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Instances []GetInstancesInstance
OutputFile string
id String

The provider-assigned unique ID for this managed resource.

instances List<GetInstancesInstance>
outputFile String
id string

The provider-assigned unique ID for this managed resource.

instances GetInstancesInstance[]
outputFile string
id str

The provider-assigned unique ID for this managed resource.

instances Sequence[GetInstancesInstance]
output_file str
id String

The provider-assigned unique ID for this managed resource.

instances List<Property Map>
outputFile String

Supporting Types

GetInstancesInstance

Authed bool

Whether the required RAM authorization is configured.

Id string
InstanceId string

The ID of the instance.

InstanceNum string

The number of instances.

OdpsSet bool

Whether the authorized MaxCompute (ODPS) assets.

OssBucketSet bool

Whether the authorized oss assets.

OssSize string

The OSS size of the instance.

PaymentType string

The payment type of the resource. Valid values: Subscription.

RdsSet bool

Whether the authorized rds assets.

Status string

The status of the resource.

Authed bool

Whether the required RAM authorization is configured.

Id string
InstanceId string

The ID of the instance.

InstanceNum string

The number of instances.

OdpsSet bool

Whether the authorized MaxCompute (ODPS) assets.

OssBucketSet bool

Whether the authorized oss assets.

OssSize string

The OSS size of the instance.

PaymentType string

The payment type of the resource. Valid values: Subscription.

RdsSet bool

Whether the authorized rds assets.

Status string

The status of the resource.

authed Boolean

Whether the required RAM authorization is configured.

id String
instanceId String

The ID of the instance.

instanceNum String

The number of instances.

odpsSet Boolean

Whether the authorized MaxCompute (ODPS) assets.

ossBucketSet Boolean

Whether the authorized oss assets.

ossSize String

The OSS size of the instance.

paymentType String

The payment type of the resource. Valid values: Subscription.

rdsSet Boolean

Whether the authorized rds assets.

status String

The status of the resource.

authed boolean

Whether the required RAM authorization is configured.

id string
instanceId string

The ID of the instance.

instanceNum string

The number of instances.

odpsSet boolean

Whether the authorized MaxCompute (ODPS) assets.

ossBucketSet boolean

Whether the authorized oss assets.

ossSize string

The OSS size of the instance.

paymentType string

The payment type of the resource. Valid values: Subscription.

rdsSet boolean

Whether the authorized rds assets.

status string

The status of the resource.

authed bool

Whether the required RAM authorization is configured.

id str
instance_id str

The ID of the instance.

instance_num str

The number of instances.

odps_set bool

Whether the authorized MaxCompute (ODPS) assets.

oss_bucket_set bool

Whether the authorized oss assets.

oss_size str

The OSS size of the instance.

payment_type str

The payment type of the resource. Valid values: Subscription.

rds_set bool

Whether the authorized rds assets.

status str

The status of the resource.

authed Boolean

Whether the required RAM authorization is configured.

id String
instanceId String

The ID of the instance.

instanceNum String

The number of instances.

odpsSet Boolean

Whether the authorized MaxCompute (ODPS) assets.

ossBucketSet Boolean

Whether the authorized oss assets.

ossSize String

The OSS size of the instance.

paymentType String

The payment type of the resource. Valid values: Subscription.

rdsSet Boolean

Whether the authorized rds assets.

status String

The status of the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.