alicloud.ga.AcceleratorSpareIpAttachment

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 in v1.167.0+.

Example Usage

Basic Usage

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

return await Deployment.RunAsync(() => 
{
    var defaultAccelerator = new AliCloud.Ga.Accelerator("defaultAccelerator", new()
    {
        Duration = 1,
        Spec = "1",
        AcceleratorName = @var.Name,
        AutoUseCoupon = true,
        Description = @var.Name,
    });

    var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("defaultBandwidthPackage", new()
    {
        Bandwidth = 100,
        Type = "Basic",
        BandwidthType = "Basic",
        PaymentType = "PayAsYouGo",
        BillingType = "PayBy95",
        Ratio = 30,
        BandwidthPackageName = @var.Name,
        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.Any(_var.Name),
			AutoUseCoupon:   pulumi.Bool(true),
			Description:     pulumi.Any(_var.Name),
		})
		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.Any(_var.Name),
			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(var_.name())
            .autoUseCoupon(true)
            .description(var_.name())
            .build());

        var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()        
            .bandwidth(100)
            .type("Basic")
            .bandwidthType("Basic")
            .paymentType("PayAsYouGo")
            .billingType("PayBy95")
            .ratio(30)
            .bandwidthPackageName(var_.name())
            .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=var["name"],
    auto_use_coupon=True,
    description=var["name"])
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=var["name"],
    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: _var.name,
    autoUseCoupon: true,
    description: _var.name,
});
const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("defaultBandwidthPackage", {
    bandwidth: 100,
    type: "Basic",
    bandwidthType: "Basic",
    paymentType: "PayAsYouGo",
    billingType: "PayBy95",
    ratio: 30,
    bandwidthPackageName: _var.name,
    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: ${var.name}
      autoUseCoupon: true
      description: ${var.name}
  defaultBandwidthPackage:
    type: alicloud:ga:BandwidthPackage
    properties:
      bandwidth: 100
      type: Basic
      bandwidthType: Basic
      paymentType: PayAsYouGo
      billingType: PayBy95
      ratio: 30
      bandwidthPackageName: ${var.name}
      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:

AcceleratorId string

The ID of the global acceleration instance.

SpareIp string

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

DryRun bool

The dry run.

AcceleratorId string

The ID of the global acceleration instance.

SpareIp string

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

DryRun bool

The dry run.

acceleratorId String

The ID of the global acceleration instance.

spareIp String

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

dryRun Boolean

The dry run.

acceleratorId string

The ID of the global acceleration instance.

spareIp string

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

dryRun 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.

acceleratorId String

The ID of the global acceleration instance.

spareIp String

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

dryRun Boolean

The dry run.

Outputs

All input properties are implicitly available as output properties. Additionally, the AcceleratorSpareIpAttachment resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the standby CNAME IP address.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the standby CNAME IP address.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the standby CNAME IP address.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the standby CNAME IP address.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the standby CNAME IP address.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the standby CNAME IP address.

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.
The following state arguments are supported:
AcceleratorId string

The ID of the global acceleration instance.

DryRun bool

The dry run.

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.

AcceleratorId string

The ID of the global acceleration instance.

DryRun bool

The dry run.

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.

acceleratorId String

The ID of the global acceleration instance.

dryRun Boolean

The dry run.

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.

acceleratorId string

The ID of the global acceleration instance.

dryRun boolean

The dry run.

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.

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.

acceleratorId String

The ID of the global acceleration instance.

dryRun Boolean

The dry run.

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.

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.