1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. RatePlanInstance
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.esa.RatePlanInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

    Provides a ESA Rate Plan Instance resource.

    For information about ESA Rate Plan Instance and how to use it, see What is Rate Plan Instance.

    NOTE: Available since v1.234.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.esa.RatePlanInstance("default", {
        type: "NS",
        autoRenew: true,
        period: 1,
        paymentType: "Subscription",
        coverage: "overseas",
        planName: "basic",
        autoPay: true,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.esa.RatePlanInstance("default",
        type="NS",
        auto_renew=True,
        period=1,
        payment_type="Subscription",
        coverage="overseas",
        plan_name="basic",
        auto_pay=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := esa.NewRatePlanInstance(ctx, "default", &esa.RatePlanInstanceArgs{
    			Type:        pulumi.String("NS"),
    			AutoRenew:   pulumi.Bool(true),
    			Period:      pulumi.Int(1),
    			PaymentType: pulumi.String("Subscription"),
    			Coverage:    pulumi.String("overseas"),
    			PlanName:    pulumi.String("basic"),
    			AutoPay:     pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.Esa.RatePlanInstance("default", new()
        {
            Type = "NS",
            AutoRenew = true,
            Period = 1,
            PaymentType = "Subscription",
            Coverage = "overseas",
            PlanName = "basic",
            AutoPay = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.esa.RatePlanInstance;
    import com.pulumi.alicloud.esa.RatePlanInstanceArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new RatePlanInstance("default", RatePlanInstanceArgs.builder()
                .type("NS")
                .autoRenew(true)
                .period("1")
                .paymentType("Subscription")
                .coverage("overseas")
                .planName("basic")
                .autoPay(true)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:esa:RatePlanInstance
        properties:
          type: NS
          autoRenew: true
          period: '1'
          paymentType: Subscription
          coverage: overseas
          planName: basic
          autoPay: true
    

    Create RatePlanInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RatePlanInstance(name: string, args?: RatePlanInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def RatePlanInstance(resource_name: str,
                         args: Optional[RatePlanInstanceArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def RatePlanInstance(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         auto_pay: Optional[bool] = None,
                         auto_renew: Optional[bool] = None,
                         coverage: Optional[str] = None,
                         payment_type: Optional[str] = None,
                         period: Optional[int] = None,
                         plan_name: Optional[str] = None,
                         type: Optional[str] = None)
    func NewRatePlanInstance(ctx *Context, name string, args *RatePlanInstanceArgs, opts ...ResourceOption) (*RatePlanInstance, error)
    public RatePlanInstance(string name, RatePlanInstanceArgs? args = null, CustomResourceOptions? opts = null)
    public RatePlanInstance(String name, RatePlanInstanceArgs args)
    public RatePlanInstance(String name, RatePlanInstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:esa:RatePlanInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RatePlanInstanceArgs
    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 RatePlanInstanceArgs
    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 RatePlanInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RatePlanInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RatePlanInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var ratePlanInstanceResource = new AliCloud.Esa.RatePlanInstance("ratePlanInstanceResource", new()
    {
        AutoPay = false,
        AutoRenew = false,
        Coverage = "string",
        PaymentType = "string",
        Period = 0,
        PlanName = "string",
        Type = "string",
    });
    
    example, err := esa.NewRatePlanInstance(ctx, "ratePlanInstanceResource", &esa.RatePlanInstanceArgs{
    	AutoPay:     pulumi.Bool(false),
    	AutoRenew:   pulumi.Bool(false),
    	Coverage:    pulumi.String("string"),
    	PaymentType: pulumi.String("string"),
    	Period:      pulumi.Int(0),
    	PlanName:    pulumi.String("string"),
    	Type:        pulumi.String("string"),
    })
    
    var ratePlanInstanceResource = new RatePlanInstance("ratePlanInstanceResource", RatePlanInstanceArgs.builder()
        .autoPay(false)
        .autoRenew(false)
        .coverage("string")
        .paymentType("string")
        .period(0)
        .planName("string")
        .type("string")
        .build());
    
    rate_plan_instance_resource = alicloud.esa.RatePlanInstance("ratePlanInstanceResource",
        auto_pay=False,
        auto_renew=False,
        coverage="string",
        payment_type="string",
        period=0,
        plan_name="string",
        type="string")
    
    const ratePlanInstanceResource = new alicloud.esa.RatePlanInstance("ratePlanInstanceResource", {
        autoPay: false,
        autoRenew: false,
        coverage: "string",
        paymentType: "string",
        period: 0,
        planName: "string",
        type: "string",
    });
    
    type: alicloud:esa:RatePlanInstance
    properties:
        autoPay: false
        autoRenew: false
        coverage: string
        paymentType: string
        period: 0
        planName: string
        type: string
    

    RatePlanInstance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RatePlanInstance resource accepts the following input properties:

    AutoPay bool
    Specifies whether to enable auto payment.
    AutoRenew bool
    Auto-renewal:
    Coverage string
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    PaymentType string
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    Period int
    Subscription period (in months).
    PlanName string
    Package name.Value range:
    Type string
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    AutoPay bool
    Specifies whether to enable auto payment.
    AutoRenew bool
    Auto-renewal:
    Coverage string
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    PaymentType string
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    Period int
    Subscription period (in months).
    PlanName string
    Package name.Value range:
    Type string
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    autoPay Boolean
    Specifies whether to enable auto payment.
    autoRenew Boolean
    Auto-renewal:
    coverage String
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    paymentType String
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period Integer
    Subscription period (in months).
    planName String
    Package name.Value range:
    type String
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    autoPay boolean
    Specifies whether to enable auto payment.
    autoRenew boolean
    Auto-renewal:
    coverage string
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    paymentType string
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period number
    Subscription period (in months).
    planName string
    Package name.Value range:
    type string
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    auto_pay bool
    Specifies whether to enable auto payment.
    auto_renew bool
    Auto-renewal:
    coverage str
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    payment_type str
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period int
    Subscription period (in months).
    plan_name str
    Package name.Value range:
    type str
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    autoPay Boolean
    Specifies whether to enable auto payment.
    autoRenew Boolean
    Auto-renewal:
    coverage String
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    paymentType String
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period Number
    Subscription period (in months).
    planName String
    Package name.Value range:
    type String
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME

    Outputs

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

    CreateTime string
    The time when the plan was purchased.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceStatus string
    The plan instance status.

    • Renewing: renewing
    Status string
    The status of the resource.
    CreateTime string
    The time when the plan was purchased.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceStatus string
    The plan instance status.

    • Renewing: renewing
    Status string
    The status of the resource.
    createTime String
    The time when the plan was purchased.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceStatus String
    The plan instance status.

    • Renewing: renewing
    status String
    The status of the resource.
    createTime string
    The time when the plan was purchased.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceStatus string
    The plan instance status.

    • Renewing: renewing
    status string
    The status of the resource.
    create_time str
    The time when the plan was purchased.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_status str
    The plan instance status.

    • Renewing: renewing
    status str
    The status of the resource.
    createTime String
    The time when the plan was purchased.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceStatus String
    The plan instance status.

    • Renewing: renewing
    status String
    The status of the resource.

    Look up Existing RatePlanInstance Resource

    Get an existing RatePlanInstance 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?: RatePlanInstanceState, opts?: CustomResourceOptions): RatePlanInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_pay: Optional[bool] = None,
            auto_renew: Optional[bool] = None,
            coverage: Optional[str] = None,
            create_time: Optional[str] = None,
            instance_status: Optional[str] = None,
            payment_type: Optional[str] = None,
            period: Optional[int] = None,
            plan_name: Optional[str] = None,
            status: Optional[str] = None,
            type: Optional[str] = None) -> RatePlanInstance
    func GetRatePlanInstance(ctx *Context, name string, id IDInput, state *RatePlanInstanceState, opts ...ResourceOption) (*RatePlanInstance, error)
    public static RatePlanInstance Get(string name, Input<string> id, RatePlanInstanceState? state, CustomResourceOptions? opts = null)
    public static RatePlanInstance get(String name, Output<String> id, RatePlanInstanceState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:esa:RatePlanInstance    get:      id: ${id}
    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:
    AutoPay bool
    Specifies whether to enable auto payment.
    AutoRenew bool
    Auto-renewal:
    Coverage string
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    CreateTime string
    The time when the plan was purchased.
    InstanceStatus string
    The plan instance status.

    • Renewing: renewing
    PaymentType string
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    Period int
    Subscription period (in months).
    PlanName string
    Package name.Value range:
    Status string
    The status of the resource.
    Type string
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    AutoPay bool
    Specifies whether to enable auto payment.
    AutoRenew bool
    Auto-renewal:
    Coverage string
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    CreateTime string
    The time when the plan was purchased.
    InstanceStatus string
    The plan instance status.

    • Renewing: renewing
    PaymentType string
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    Period int
    Subscription period (in months).
    PlanName string
    Package name.Value range:
    Status string
    The status of the resource.
    Type string
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    autoPay Boolean
    Specifies whether to enable auto payment.
    autoRenew Boolean
    Auto-renewal:
    coverage String
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    createTime String
    The time when the plan was purchased.
    instanceStatus String
    The plan instance status.

    • Renewing: renewing
    paymentType String
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period Integer
    Subscription period (in months).
    planName String
    Package name.Value range:
    status String
    The status of the resource.
    type String
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    autoPay boolean
    Specifies whether to enable auto payment.
    autoRenew boolean
    Auto-renewal:
    coverage string
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    createTime string
    The time when the plan was purchased.
    instanceStatus string
    The plan instance status.

    • Renewing: renewing
    paymentType string
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period number
    Subscription period (in months).
    planName string
    Package name.Value range:
    status string
    The status of the resource.
    type string
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    auto_pay bool
    Specifies whether to enable auto payment.
    auto_renew bool
    Auto-renewal:
    coverage str
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    create_time str
    The time when the plan was purchased.
    instance_status str
    The plan instance status.

    • Renewing: renewing
    payment_type str
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period int
    Subscription period (in months).
    plan_name str
    Package name.Value range:
    status str
    The status of the resource.
    type str
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME
    autoPay Boolean
    Specifies whether to enable auto payment.
    autoRenew Boolean
    Auto-renewal:
    coverage String
    The service locations for the websites that can be associated with the plan. Multiple values are separated by commas (,). Valid values:
    createTime String
    The time when the plan was purchased.
    instanceStatus String
    The plan instance status.

    • Renewing: renewing
    paymentType String
    The payment type of the resource. Valid values:

    • Subscription: subscription.
    period Number
    Subscription period (in months).
    planName String
    Package name.Value range:
    status String
    The status of the resource.
    type String
    The DNS setup option for the website. Valid values:

    • NS
    • CNAME

    Import

    ESA Rate Plan Instance can be imported using the id, e.g.

    $ pulumi import alicloud:esa/ratePlanInstance:RatePlanInstance example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi