1. Packages
  2. Alicloud Provider
  3. API Docs
  4. sddp
  5. getInstances
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.sddp.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

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

    NOTE: Available in v1.136.0+.

    Example Usage

    Basic Usage

    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]);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.sddp.get_instances()
    pulumi.export("sddpInstanceId", default.instances[0])
    
    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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Sddp.GetInstances.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["sddpInstanceId"] = @default.Apply(@default => @default.Apply(getInstancesResult => getInstancesResult.Instances[0])),
        };
    });
    
    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.sddp.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]);
        }
    }
    
    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
    File name where to save data source results (after running pulumi preview).
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    outputFile String
    File name where to save data source results (after running pulumi preview).
    outputFile string
    File name where to save data source results (after running pulumi preview).
    output_file str
    File name where to save data source results (after running pulumi preview).
    outputFile String
    File name where to save data source results (after running pulumi preview).

    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
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi