1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. wafv3
  5. getInstances
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.wafv3.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides Wafv3 Instance available to the user.What is Instance

    NOTE: Available in 1.200.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.wafv3.getInstances({});
    export const alicloudWafv3InstanceExampleId = _default.then(_default => _default.instances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.wafv3.get_instances()
    pulumi.export("alicloudWafv3InstanceExampleId", default.instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/wafv3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := wafv3.GetInstances(ctx, &wafv3.GetInstancesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("alicloudWafv3InstanceExampleId", _default.Instances[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Wafv3.GetInstances.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["alicloudWafv3InstanceExampleId"] = @default.Apply(@default => @default.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.wafv3.Wafv3Functions;
    import com.pulumi.alicloud.wafv3.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 = Wafv3Functions.getInstances();
    
            ctx.export("alicloudWafv3InstanceExampleId", default_.instances()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:wafv3:getInstances
          Arguments: {}
    outputs:
      alicloudWafv3InstanceExampleId: ${default.instances[0].id}
    

    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:wafv3/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.
    Ids List<string>
    A list of Instance IDs.
    Instances List<Pulumi.AliCloud.Wafv3.Outputs.GetInstancesInstance>
    A list of Instance Entries. Each element contains the following attributes:
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Instance IDs.
    Instances []GetInstancesInstance
    A list of Instance Entries. Each element contains the following attributes:
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Instance IDs.
    instances List<GetInstancesInstance>
    A list of Instance Entries. Each element contains the following attributes:
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Instance IDs.
    instances GetInstancesInstance[]
    A list of Instance Entries. Each element contains the following attributes:
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Instance IDs.
    instances Sequence[GetInstancesInstance]
    A list of Instance Entries. Each element contains the following attributes:
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Instance IDs.
    instances List<Property Map>
    A list of Instance Entries. Each element contains the following attributes:
    outputFile String

    Supporting Types

    GetInstancesInstance

    CreateTime string
    The creation time of the resource.
    Id string
    The ID of the resource.
    InstanceId string
    The first ID of the resource.
    Status string
    The status of the resource.
    CreateTime string
    The creation time of the resource.
    Id string
    The ID of the resource.
    InstanceId string
    The first ID of the resource.
    Status string
    The status of the resource.
    createTime String
    The creation time of the resource.
    id String
    The ID of the resource.
    instanceId String
    The first ID of the resource.
    status String
    The status of the resource.
    createTime string
    The creation time of the resource.
    id string
    The ID of the resource.
    instanceId string
    The first ID of the resource.
    status string
    The status of the resource.
    create_time str
    The creation time of the resource.
    id str
    The ID of the resource.
    instance_id str
    The first ID of the resource.
    status str
    The status of the resource.
    createTime String
    The creation time of the resource.
    id String
    The ID of the resource.
    instanceId String
    The first ID of the resource.
    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.66.0 published on Friday, Nov 15, 2024 by Pulumi