Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.19.0 published on Friday, Mar 18, 2022 by Pulumi

getInstances

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

NOTE: Available in v1.139.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.CloudFirewall.GetInstances.InvokeAsync());
        this.CloudFirewallInstanceId1 = ids.Apply(ids => ids.Instances?[0]?.Id);
    }

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

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := cloudfirewall.GetInstances(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("cloudFirewallInstanceId1", ids.Instances[0].Id)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.cloudfirewall.get_instances()
pulumi.export("cloudFirewallInstanceId1", ids.instances[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.cloudfirewall.getInstances({});
export const cloudFirewallInstanceId1 = ids.then(ids => ids.instances?[0]?.id);

Coming soon!

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:cloudfirewall/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.CloudFirewall.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 ListInstancesInstance>
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
outputFile String

Supporting Types

GetInstancesInstance

CreateTime string

The Creation time of the resource.

EndTime string

The end time of the resource..

Id string

The ID of the Instance.

InstanceId string

The first ID of the resource.

PaymentType string

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

RenewalDurationUnit string

Automatic renewal period unit. Valid values: Month,Year.

RenewalStatus string

Automatic renewal status. Valid values: AutoRenewal,ManualRenewal. Default Value: ManualRenewal.

Status string

The Status of Instance.

CreateTime string

The Creation time of the resource.

EndTime string

The end time of the resource..

Id string

The ID of the Instance.

InstanceId string

The first ID of the resource.

PaymentType string

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

RenewalDurationUnit string

Automatic renewal period unit. Valid values: Month,Year.

RenewalStatus string

Automatic renewal status. Valid values: AutoRenewal,ManualRenewal. Default Value: ManualRenewal.

Status string

The Status of Instance.

createTime String

The Creation time of the resource.

endTime String

The end time of the resource..

id String

The ID of the Instance.

instanceId String

The first ID of the resource.

paymentType String

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

renewalDurationUnit String

Automatic renewal period unit. Valid values: Month,Year.

renewalStatus String

Automatic renewal status. Valid values: AutoRenewal,ManualRenewal. Default Value: ManualRenewal.

status String

The Status of Instance.

createTime string

The Creation time of the resource.

endTime string

The end time of the resource..

id string

The ID of the Instance.

instanceId string

The first ID of the resource.

paymentType string

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

renewalDurationUnit string

Automatic renewal period unit. Valid values: Month,Year.

renewalStatus string

Automatic renewal status. Valid values: AutoRenewal,ManualRenewal. Default Value: ManualRenewal.

status string

The Status of Instance.

create_time str

The Creation time of the resource.

end_time str

The end time of the resource..

id str

The ID of the Instance.

instance_id str

The first ID of the resource.

payment_type str

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

renewal_duration_unit str

Automatic renewal period unit. Valid values: Month,Year.

renewal_status str

Automatic renewal status. Valid values: AutoRenewal,ManualRenewal. Default Value: ManualRenewal.

status str

The Status of Instance.

createTime String

The Creation time of the resource.

endTime String

The end time of the resource..

id String

The ID of the Instance.

instanceId String

The first ID of the resource.

paymentType String

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

renewalDurationUnit String

Automatic renewal period unit. Valid values: Month,Year.

renewalStatus String

Automatic renewal status. Valid values: AutoRenewal,ManualRenewal. Default Value: ManualRenewal.

status String

The Status of Instance.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.