Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
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
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);
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)
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
})
}
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 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()));
}
}
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:
- Accelerator
Id string - The ID of the global acceleration instance.
- Ids List<string>
- A list of Accelerator Spare Ip Attachment IDs.
- Output
File 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 string - The ID of the global acceleration instance.
- Ids []string
- A list of Accelerator Spare Ip Attachment IDs.
- Output
File 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 String - The ID of the global acceleration instance.
- ids List<String>
- A list of Accelerator Spare Ip Attachment IDs.
- output
File 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 string - The ID of the global acceleration instance.
- ids string[]
- A list of Accelerator Spare Ip Attachment IDs.
- output
File 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
.
- accelerator
Id String - The ID of the global acceleration instance.
- ids List<String>
- A list of Accelerator Spare Ip Attachment IDs.
- output
File 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:
- Accelerator
Id string - Attachments
List<Pulumi.
Ali Cloud. Ga. Outputs. Get Accelerator Spare Ip Attachments Attachment> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Output
File string - Status string
- Accelerator
Id string - Attachments
[]Get
Accelerator Spare Ip Attachments Attachment - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Output
File string - Status string
- accelerator
Id String - attachments
List<Get
Accelerator Spare Ip Attachments Attachment> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - status String
- accelerator
Id string - attachments
Get
Accelerator Spare Ip Attachments Attachment[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- output
File string - status string
- accelerator_
id str - attachments
Sequence[Get
Accelerator Spare Ip Attachments Attachment] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- output_
file str - status str
- accelerator
Id String - attachments List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - status String
Supporting Types
GetAcceleratorSpareIpAttachmentsAttachment
- Accelerator
Id string - The ID of the global acceleration instance.
- Id string
- The ID of the Accelerator Spare Ip Attachment.
- Spare
Ip 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 string - The ID of the global acceleration instance.
- Id string
- The ID of the Accelerator Spare Ip Attachment.
- Spare
Ip 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 String - The ID of the global acceleration instance.
- id String
- The ID of the Accelerator Spare Ip Attachment.
- spare
Ip 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 string - The ID of the global acceleration instance.
- id string
- The ID of the Accelerator Spare Ip Attachment.
- spare
Ip 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
.
- accelerator
Id String - The ID of the global acceleration instance.
- id String
- The ID of the Accelerator Spare Ip Attachment.
- spare
Ip 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.