alicloud.ga.AcceleratorSpareIpAttachment
Explore with Pulumi AI
Provides a Global Accelerator (GA) Accelerator Spare Ip Attachment resource.
For information about Global Accelerator (GA) Accelerator Spare Ip Attachment and how to use it, see What is Accelerator Spare Ip Attachment.
NOTE: Available since 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 defaultAccelerator = new AliCloud.Ga.Accelerator("defaultAccelerator", new()
{
Duration = 1,
Spec = "1",
AcceleratorName = "terraform-example",
AutoUseCoupon = true,
Description = "terraform-example",
});
var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("defaultBandwidthPackage", new()
{
Bandwidth = 100,
Type = "Basic",
BandwidthType = "Basic",
PaymentType = "PayAsYouGo",
BillingType = "PayBy95",
Ratio = 30,
BandwidthPackageName = "terraform-example",
AutoPay = true,
AutoUseCoupon = true,
});
var defaultBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment", new()
{
AcceleratorId = defaultAccelerator.Id,
BandwidthPackageId = defaultBandwidthPackage.Id,
});
var defaultAcceleratorSpareIpAttachment = new AliCloud.Ga.AcceleratorSpareIpAttachment("defaultAcceleratorSpareIpAttachment", new()
{
AcceleratorId = defaultBandwidthPackageAttachment.AcceleratorId,
SpareIp = "127.0.0.1",
});
});
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 {
defaultAccelerator, err := ga.NewAccelerator(ctx, "defaultAccelerator", &ga.AcceleratorArgs{
Duration: pulumi.Int(1),
Spec: pulumi.String("1"),
AcceleratorName: pulumi.String("terraform-example"),
AutoUseCoupon: pulumi.Bool(true),
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
defaultBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "defaultBandwidthPackage", &ga.BandwidthPackageArgs{
Bandwidth: pulumi.Int(100),
Type: pulumi.String("Basic"),
BandwidthType: pulumi.String("Basic"),
PaymentType: pulumi.String("PayAsYouGo"),
BillingType: pulumi.String("PayBy95"),
Ratio: pulumi.Int(30),
BandwidthPackageName: pulumi.String("terraform-example"),
AutoPay: pulumi.Bool(true),
AutoUseCoupon: pulumi.Bool(true),
})
if err != nil {
return err
}
defaultBandwidthPackageAttachment, err := ga.NewBandwidthPackageAttachment(ctx, "defaultBandwidthPackageAttachment", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: defaultAccelerator.ID(),
BandwidthPackageId: defaultBandwidthPackage.ID(),
})
if err != nil {
return err
}
_, err = ga.NewAcceleratorSpareIpAttachment(ctx, "defaultAcceleratorSpareIpAttachment", &ga.AcceleratorSpareIpAttachmentArgs{
AcceleratorId: defaultBandwidthPackageAttachment.AcceleratorId,
SpareIp: pulumi.String("127.0.0.1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ga.Accelerator;
import com.pulumi.alicloud.ga.AcceleratorArgs;
import com.pulumi.alicloud.ga.BandwidthPackage;
import com.pulumi.alicloud.ga.BandwidthPackageArgs;
import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
import com.pulumi.alicloud.ga.AcceleratorSpareIpAttachment;
import com.pulumi.alicloud.ga.AcceleratorSpareIpAttachmentArgs;
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) {
var defaultAccelerator = new Accelerator("defaultAccelerator", AcceleratorArgs.builder()
.duration(1)
.spec("1")
.acceleratorName("terraform-example")
.autoUseCoupon(true)
.description("terraform-example")
.build());
var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()
.bandwidth(100)
.type("Basic")
.bandwidthType("Basic")
.paymentType("PayAsYouGo")
.billingType("PayBy95")
.ratio(30)
.bandwidthPackageName("terraform-example")
.autoPay(true)
.autoUseCoupon(true)
.build());
var defaultBandwidthPackageAttachment = new BandwidthPackageAttachment("defaultBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
.acceleratorId(defaultAccelerator.id())
.bandwidthPackageId(defaultBandwidthPackage.id())
.build());
var defaultAcceleratorSpareIpAttachment = new AcceleratorSpareIpAttachment("defaultAcceleratorSpareIpAttachment", AcceleratorSpareIpAttachmentArgs.builder()
.acceleratorId(defaultBandwidthPackageAttachment.acceleratorId())
.spareIp("127.0.0.1")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default_accelerator = alicloud.ga.Accelerator("defaultAccelerator",
duration=1,
spec="1",
accelerator_name="terraform-example",
auto_use_coupon=True,
description="terraform-example")
default_bandwidth_package = alicloud.ga.BandwidthPackage("defaultBandwidthPackage",
bandwidth=100,
type="Basic",
bandwidth_type="Basic",
payment_type="PayAsYouGo",
billing_type="PayBy95",
ratio=30,
bandwidth_package_name="terraform-example",
auto_pay=True,
auto_use_coupon=True)
default_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment",
accelerator_id=default_accelerator.id,
bandwidth_package_id=default_bandwidth_package.id)
default_accelerator_spare_ip_attachment = alicloud.ga.AcceleratorSpareIpAttachment("defaultAcceleratorSpareIpAttachment",
accelerator_id=default_bandwidth_package_attachment.accelerator_id,
spare_ip="127.0.0.1")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultAccelerator = new alicloud.ga.Accelerator("defaultAccelerator", {
duration: 1,
spec: "1",
acceleratorName: "terraform-example",
autoUseCoupon: true,
description: "terraform-example",
});
const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("defaultBandwidthPackage", {
bandwidth: 100,
type: "Basic",
bandwidthType: "Basic",
paymentType: "PayAsYouGo",
billingType: "PayBy95",
ratio: 30,
bandwidthPackageName: "terraform-example",
autoPay: true,
autoUseCoupon: true,
});
const defaultBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment", {
acceleratorId: defaultAccelerator.id,
bandwidthPackageId: defaultBandwidthPackage.id,
});
const defaultAcceleratorSpareIpAttachment = new alicloud.ga.AcceleratorSpareIpAttachment("defaultAcceleratorSpareIpAttachment", {
acceleratorId: defaultBandwidthPackageAttachment.acceleratorId,
spareIp: "127.0.0.1",
});
resources:
defaultAccelerator:
type: alicloud:ga:Accelerator
properties:
duration: 1
spec: '1'
acceleratorName: terraform-example
autoUseCoupon: true
description: terraform-example
defaultBandwidthPackage:
type: alicloud:ga:BandwidthPackage
properties:
bandwidth: 100
type: Basic
bandwidthType: Basic
paymentType: PayAsYouGo
billingType: PayBy95
ratio: 30
bandwidthPackageName: terraform-example
autoPay: true
autoUseCoupon: true
defaultBandwidthPackageAttachment:
type: alicloud:ga:BandwidthPackageAttachment
properties:
acceleratorId: ${defaultAccelerator.id}
bandwidthPackageId: ${defaultBandwidthPackage.id}
defaultAcceleratorSpareIpAttachment:
type: alicloud:ga:AcceleratorSpareIpAttachment
properties:
acceleratorId: ${defaultBandwidthPackageAttachment.acceleratorId}
spareIp: 127.0.0.1
Create AcceleratorSpareIpAttachment Resource
new AcceleratorSpareIpAttachment(name: string, args: AcceleratorSpareIpAttachmentArgs, opts?: CustomResourceOptions);
@overload
def AcceleratorSpareIpAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
accelerator_id: Optional[str] = None,
dry_run: Optional[bool] = None,
spare_ip: Optional[str] = None)
@overload
def AcceleratorSpareIpAttachment(resource_name: str,
args: AcceleratorSpareIpAttachmentArgs,
opts: Optional[ResourceOptions] = None)
func NewAcceleratorSpareIpAttachment(ctx *Context, name string, args AcceleratorSpareIpAttachmentArgs, opts ...ResourceOption) (*AcceleratorSpareIpAttachment, error)
public AcceleratorSpareIpAttachment(string name, AcceleratorSpareIpAttachmentArgs args, CustomResourceOptions? opts = null)
public AcceleratorSpareIpAttachment(String name, AcceleratorSpareIpAttachmentArgs args)
public AcceleratorSpareIpAttachment(String name, AcceleratorSpareIpAttachmentArgs args, CustomResourceOptions options)
type: alicloud:ga:AcceleratorSpareIpAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AcceleratorSpareIpAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AcceleratorSpareIpAttachmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AcceleratorSpareIpAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AcceleratorSpareIpAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AcceleratorSpareIpAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AcceleratorSpareIpAttachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AcceleratorSpareIpAttachment resource accepts the following input properties:
- Accelerator
Id string The ID of the global acceleration instance.
- Spare
Ip string The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.
- Dry
Run bool The dry run.
- Accelerator
Id string The ID of the global acceleration instance.
- Spare
Ip string The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.
- Dry
Run bool The dry run.
- accelerator
Id String The ID of the global acceleration instance.
- spare
Ip String The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.
- dry
Run Boolean The dry run.
- accelerator
Id string The ID of the global acceleration instance.
- spare
Ip string The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.
- dry
Run boolean The dry run.
- accelerator_
id str The ID of the global acceleration instance.
- spare_
ip str The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.
- dry_
run bool The dry run.
- accelerator
Id String The ID of the global acceleration instance.
- spare
Ip String The standby IP address of CNAME. When the acceleration area is abnormal, the traffic is switched to the standby IP address.
- dry
Run Boolean The dry run.
Outputs
All input properties are implicitly available as output properties. Additionally, the AcceleratorSpareIpAttachment resource produces the following output properties:
Look up Existing AcceleratorSpareIpAttachment Resource
Get an existing AcceleratorSpareIpAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AcceleratorSpareIpAttachmentState, opts?: CustomResourceOptions): AcceleratorSpareIpAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
accelerator_id: Optional[str] = None,
dry_run: Optional[bool] = None,
spare_ip: Optional[str] = None,
status: Optional[str] = None) -> AcceleratorSpareIpAttachment
func GetAcceleratorSpareIpAttachment(ctx *Context, name string, id IDInput, state *AcceleratorSpareIpAttachmentState, opts ...ResourceOption) (*AcceleratorSpareIpAttachment, error)
public static AcceleratorSpareIpAttachment Get(string name, Input<string> id, AcceleratorSpareIpAttachmentState? state, CustomResourceOptions? opts = null)
public static AcceleratorSpareIpAttachment get(String name, Output<String> id, AcceleratorSpareIpAttachmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Accelerator
Id string The ID of the global acceleration instance.
- Dry
Run bool The dry run.
- 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.
- Accelerator
Id string The ID of the global acceleration instance.
- Dry
Run bool The dry run.
- 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.
- accelerator
Id String The ID of the global acceleration instance.
- dry
Run Boolean The dry run.
- 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.
- accelerator
Id string The ID of the global acceleration instance.
- dry
Run boolean The dry run.
- 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.
- accelerator_
id str The ID of the global acceleration instance.
- dry_
run bool The dry run.
- 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.
- accelerator
Id String The ID of the global acceleration instance.
- dry
Run Boolean The dry run.
- 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.
Import
Global Accelerator (GA) Accelerator Spare Ip Attachment can be imported using the id, e.g.
$ pulumi import alicloud:ga/acceleratorSpareIpAttachment:AcceleratorSpareIpAttachment example <accelerator_id>:<spare_ip>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.