alicloud.ga.getAcceleratorSpareIpAttachments

Explore with Pulumi AI

This data source provides the Ga Accelerator Spare Ip Attachments of the current Alibaba Cloud user.

NOTE: Available in v1.167.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Ga.GetAcceleratorSpareIpAttachments.Invoke(new()
    {
        AcceleratorId = "example_value",
        Ids = new[]
        {
            "example_value-1",
            "example_value-2",
        },
    });

    return new Dictionary<string, object?>
    {
        ["gaAcceleratorSpareIpAttachmentId1"] = ids.Apply(getAcceleratorSpareIpAttachmentsResult => getAcceleratorSpareIpAttachmentsResult.Attachments[0]?.Id),
    };
});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := ga.GetAcceleratorSpareIpAttachments(ctx, &ga.GetAcceleratorSpareIpAttachmentsArgs{
			AcceleratorId: "example_value",
			Ids: []string{
				"example_value-1",
				"example_value-2",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("gaAcceleratorSpareIpAttachmentId1", ids.Attachments[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ga.GaFunctions;
import com.pulumi.alicloud.ga.inputs.GetAcceleratorSpareIpAttachmentsArgs;
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 ids = GaFunctions.getAcceleratorSpareIpAttachments(GetAcceleratorSpareIpAttachmentsArgs.builder()
            .acceleratorId("example_value")
            .ids(            
                "example_value-1",
                "example_value-2")
            .build());

        ctx.export("gaAcceleratorSpareIpAttachmentId1", ids.applyValue(getAcceleratorSpareIpAttachmentsResult -> getAcceleratorSpareIpAttachmentsResult.attachments()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.ga.get_accelerator_spare_ip_attachments(accelerator_id="example_value",
    ids=[
        "example_value-1",
        "example_value-2",
    ])
pulumi.export("gaAcceleratorSpareIpAttachmentId1", ids.attachments[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.ga.getAcceleratorSpareIpAttachments({
    acceleratorId: "example_value",
    ids: [
        "example_value-1",
        "example_value-2",
    ],
});
export const gaAcceleratorSpareIpAttachmentId1 = ids.then(ids => ids.attachments?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:ga:getAcceleratorSpareIpAttachments
      Arguments:
        acceleratorId: example_value
        ids:
          - example_value-1
          - example_value-2
outputs:
  gaAcceleratorSpareIpAttachmentId1: ${ids.attachments[0].id}

Using getAcceleratorSpareIpAttachments

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 getAcceleratorSpareIpAttachments(args: GetAcceleratorSpareIpAttachmentsArgs, opts?: InvokeOptions): Promise<GetAcceleratorSpareIpAttachmentsResult>
function getAcceleratorSpareIpAttachmentsOutput(args: GetAcceleratorSpareIpAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetAcceleratorSpareIpAttachmentsResult>
def get_accelerator_spare_ip_attachments(accelerator_id: Optional[str] = None,
                                         ids: Optional[Sequence[str]] = None,
                                         output_file: Optional[str] = None,
                                         status: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetAcceleratorSpareIpAttachmentsResult
def get_accelerator_spare_ip_attachments_output(accelerator_id: Optional[pulumi.Input[str]] = None,
                                         ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                         output_file: Optional[pulumi.Input[str]] = None,
                                         status: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetAcceleratorSpareIpAttachmentsResult]
func GetAcceleratorSpareIpAttachments(ctx *Context, args *GetAcceleratorSpareIpAttachmentsArgs, opts ...InvokeOption) (*GetAcceleratorSpareIpAttachmentsResult, error)
func GetAcceleratorSpareIpAttachmentsOutput(ctx *Context, args *GetAcceleratorSpareIpAttachmentsOutputArgs, opts ...InvokeOption) GetAcceleratorSpareIpAttachmentsResultOutput

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

public static class GetAcceleratorSpareIpAttachments 
{
    public static Task<GetAcceleratorSpareIpAttachmentsResult> InvokeAsync(GetAcceleratorSpareIpAttachmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetAcceleratorSpareIpAttachmentsResult> Invoke(GetAcceleratorSpareIpAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAcceleratorSpareIpAttachmentsResult> getAcceleratorSpareIpAttachments(GetAcceleratorSpareIpAttachmentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:ga/getAcceleratorSpareIpAttachments:getAcceleratorSpareIpAttachments
  arguments:
    # arguments dictionary

The following arguments are supported:

AcceleratorId string

The ID of the global acceleration instance.

Ids List<string>

A list of Accelerator Spare Ip Attachment IDs.

OutputFile string

File name where to save data source results (after running pulumi preview).

Status string

The status of the standby CNAME IP address. Valid values: active, inuse.

AcceleratorId string

The ID of the global acceleration instance.

Ids []string

A list of Accelerator Spare Ip Attachment IDs.

OutputFile string

File name where to save data source results (after running pulumi preview).

Status string

The status of the standby CNAME IP address. Valid values: active, inuse.

acceleratorId String

The ID of the global acceleration instance.

ids List<String>

A list of Accelerator Spare Ip Attachment IDs.

outputFile String

File name where to save data source results (after running pulumi preview).

status String

The status of the standby CNAME IP address. Valid values: active, inuse.

acceleratorId string

The ID of the global acceleration instance.

ids string[]

A list of Accelerator Spare Ip Attachment IDs.

outputFile string

File name where to save data source results (after running pulumi preview).

status string

The status of the standby CNAME IP address. Valid values: active, inuse.

accelerator_id str

The ID of the global acceleration instance.

ids Sequence[str]

A list of Accelerator Spare Ip Attachment IDs.

output_file str

File name where to save data source results (after running pulumi preview).

status str

The status of the standby CNAME IP address. Valid values: active, inuse.

acceleratorId String

The ID of the global acceleration instance.

ids List<String>

A list of Accelerator Spare Ip Attachment IDs.

outputFile String

File name where to save data source results (after running pulumi preview).

status String

The status of the standby CNAME IP address. Valid values: active, inuse.

getAcceleratorSpareIpAttachments Result

The following output properties are available:

AcceleratorId string
Attachments List<Pulumi.AliCloud.Ga.Outputs.GetAcceleratorSpareIpAttachmentsAttachment>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
OutputFile string
Status string
AcceleratorId string
Attachments []GetAcceleratorSpareIpAttachmentsAttachment
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
OutputFile string
Status string
acceleratorId String
attachments List<GetAcceleratorSpareIpAttachmentsAttachment>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
outputFile String
status String
acceleratorId string
attachments GetAcceleratorSpareIpAttachmentsAttachment[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
outputFile string
status string
accelerator_id str
attachments Sequence[GetAcceleratorSpareIpAttachmentsAttachment]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
output_file str
status str
acceleratorId String
attachments List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
outputFile String
status String

Supporting Types

GetAcceleratorSpareIpAttachmentsAttachment

AcceleratorId string

The ID of the global acceleration instance.

Id string

The ID of the Accelerator Spare Ip Attachment.

SpareIp string

The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.

Status string

The status of the standby CNAME IP address. Valid values: active, inuse.

AcceleratorId string

The ID of the global acceleration instance.

Id string

The ID of the Accelerator Spare Ip Attachment.

SpareIp string

The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.

Status string

The status of the standby CNAME IP address. Valid values: active, inuse.

acceleratorId String

The ID of the global acceleration instance.

id String

The ID of the Accelerator Spare Ip Attachment.

spareIp String

The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.

status String

The status of the standby CNAME IP address. Valid values: active, inuse.

acceleratorId string

The ID of the global acceleration instance.

id string

The ID of the Accelerator Spare Ip Attachment.

spareIp string

The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.

status string

The status of the standby CNAME IP address. Valid values: active, inuse.

accelerator_id str

The ID of the global acceleration instance.

id str

The ID of the Accelerator Spare Ip Attachment.

spare_ip str

The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.

status str

The status of the standby CNAME IP address. Valid values: active, inuse.

acceleratorId String

The ID of the global acceleration instance.

id String

The ID of the Accelerator Spare Ip Attachment.

spareIp String

The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.

status String

The status of the standby CNAME IP address. Valid values: active, inuse.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.