1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dns
  5. Instance
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.dns.Instance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Create an DNS Instance resource.

    DEPRECATED: This resource has been renamed to alicloud.dns.AlidnsInstance from version 1.95.0.

    NOTE: Available in v1.80.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _this = new alicloud.dns.Instance("this", {
        dnsSecurity: "no",
        domainNumbers: "2",
        period: 1,
        renewPeriod: 1,
        renewalStatus: "ManualRenewal",
        versionCode: "version_personal",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    this = alicloud.dns.Instance("this",
        dns_security="no",
        domain_numbers="2",
        period=1,
        renew_period=1,
        renewal_status="ManualRenewal",
        version_code="version_personal")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.NewInstance(ctx, "this", &dns.InstanceArgs{
    			DnsSecurity:   pulumi.String("no"),
    			DomainNumbers: pulumi.String("2"),
    			Period:        pulumi.Int(1),
    			RenewPeriod:   pulumi.Int(1),
    			RenewalStatus: pulumi.String("ManualRenewal"),
    			VersionCode:   pulumi.String("version_personal"),
    		})
    		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 @this = new AliCloud.Dns.Instance("this", new()
        {
            DnsSecurity = "no",
            DomainNumbers = "2",
            Period = 1,
            RenewPeriod = 1,
            RenewalStatus = "ManualRenewal",
            VersionCode = "version_personal",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.dns.Instance;
    import com.pulumi.alicloud.dns.InstanceArgs;
    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 this_ = new Instance("this", InstanceArgs.builder()        
                .dnsSecurity("no")
                .domainNumbers("2")
                .period(1)
                .renewPeriod(1)
                .renewalStatus("ManualRenewal")
                .versionCode("version_personal")
                .build());
    
        }
    }
    
    resources:
      this:
        type: alicloud:dns:Instance
        properties:
          dnsSecurity: no
          domainNumbers: '2'
          period: 1
          renewPeriod: 1
          renewalStatus: ManualRenewal
          versionCode: version_personal
    

    Create Instance Resource

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

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 dns_security: Optional[str] = None,
                 domain_numbers: Optional[str] = None,
                 version_code: Optional[str] = None,
                 payment_type: Optional[str] = None,
                 period: Optional[int] = None,
                 renew_period: Optional[int] = None,
                 renewal_status: Optional[str] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:dns:Instance
    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 InstanceArgs
    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 InstanceArgs
    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 InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var exampleinstanceResourceResourceFromDnsinstance = new AliCloud.Dns.Instance("exampleinstanceResourceResourceFromDnsinstance", new()
    {
        DnsSecurity = "string",
        DomainNumbers = "string",
        VersionCode = "string",
        PaymentType = "string",
        Period = 0,
        RenewPeriod = 0,
        RenewalStatus = "string",
    });
    
    example, err := dns.NewInstance(ctx, "exampleinstanceResourceResourceFromDnsinstance", &dns.InstanceArgs{
    	DnsSecurity:   pulumi.String("string"),
    	DomainNumbers: pulumi.String("string"),
    	VersionCode:   pulumi.String("string"),
    	PaymentType:   pulumi.String("string"),
    	Period:        pulumi.Int(0),
    	RenewPeriod:   pulumi.Int(0),
    	RenewalStatus: pulumi.String("string"),
    })
    
    var exampleinstanceResourceResourceFromDnsinstance = new Instance("exampleinstanceResourceResourceFromDnsinstance", InstanceArgs.builder()        
        .dnsSecurity("string")
        .domainNumbers("string")
        .versionCode("string")
        .paymentType("string")
        .period(0)
        .renewPeriod(0)
        .renewalStatus("string")
        .build());
    
    exampleinstance_resource_resource_from_dnsinstance = alicloud.dns.Instance("exampleinstanceResourceResourceFromDnsinstance",
        dns_security="string",
        domain_numbers="string",
        version_code="string",
        payment_type="string",
        period=0,
        renew_period=0,
        renewal_status="string")
    
    const exampleinstanceResourceResourceFromDnsinstance = new alicloud.dns.Instance("exampleinstanceResourceResourceFromDnsinstance", {
        dnsSecurity: "string",
        domainNumbers: "string",
        versionCode: "string",
        paymentType: "string",
        period: 0,
        renewPeriod: 0,
        renewalStatus: "string",
    });
    
    type: alicloud:dns:Instance
    properties:
        dnsSecurity: string
        domainNumbers: string
        paymentType: string
        period: 0
        renewPeriod: 0
        renewalStatus: string
        versionCode: string
    

    Instance 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 Instance resource accepts the following input properties:

    DnsSecurity string
    DNS security level. Valid values: no, basic, advanced.
    DomainNumbers string
    Number of domain names bound.
    VersionCode string
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    PaymentType string
    Period int
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    RenewPeriod int
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    DnsSecurity string
    DNS security level. Valid values: no, basic, advanced.
    DomainNumbers string
    Number of domain names bound.
    VersionCode string
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    PaymentType string
    Period int
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    RenewPeriod int
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    dnsSecurity String
    DNS security level. Valid values: no, basic, advanced.
    domainNumbers String
    Number of domain names bound.
    versionCode String
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    paymentType String
    period Integer
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renewPeriod Integer
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    dnsSecurity string
    DNS security level. Valid values: no, basic, advanced.
    domainNumbers string
    Number of domain names bound.
    versionCode string
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    paymentType string
    period number
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renewPeriod number
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    dns_security str
    DNS security level. Valid values: no, basic, advanced.
    domain_numbers str
    Number of domain names bound.
    version_code str
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    payment_type str
    period int
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renew_period int
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewal_status str
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    dnsSecurity String
    DNS security level. Valid values: no, basic, advanced.
    domainNumbers String
    Number of domain names bound.
    versionCode String
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    paymentType String
    period Number
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renewPeriod Number
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    VersionName string
    Paid package version name.
    Id string
    The provider-assigned unique ID for this managed resource.
    VersionName string
    Paid package version name.
    id String
    The provider-assigned unique ID for this managed resource.
    versionName String
    Paid package version name.
    id string
    The provider-assigned unique ID for this managed resource.
    versionName string
    Paid package version name.
    id str
    The provider-assigned unique ID for this managed resource.
    version_name str
    Paid package version name.
    id String
    The provider-assigned unique ID for this managed resource.
    versionName String
    Paid package version name.

    Look up Existing Instance Resource

    Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dns_security: Optional[str] = None,
            domain_numbers: Optional[str] = None,
            payment_type: Optional[str] = None,
            period: Optional[int] = None,
            renew_period: Optional[int] = None,
            renewal_status: Optional[str] = None,
            version_code: Optional[str] = None,
            version_name: Optional[str] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState 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:
    DnsSecurity string
    DNS security level. Valid values: no, basic, advanced.
    DomainNumbers string
    Number of domain names bound.
    PaymentType string
    Period int
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    RenewPeriod int
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    VersionCode string
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    VersionName string
    Paid package version name.
    DnsSecurity string
    DNS security level. Valid values: no, basic, advanced.
    DomainNumbers string
    Number of domain names bound.
    PaymentType string
    Period int
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    RenewPeriod int
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    VersionCode string
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    VersionName string
    Paid package version name.
    dnsSecurity String
    DNS security level. Valid values: no, basic, advanced.
    domainNumbers String
    Number of domain names bound.
    paymentType String
    period Integer
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renewPeriod Integer
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    versionCode String
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    versionName String
    Paid package version name.
    dnsSecurity string
    DNS security level. Valid values: no, basic, advanced.
    domainNumbers string
    Number of domain names bound.
    paymentType string
    period number
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renewPeriod number
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    versionCode string
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    versionName string
    Paid package version name.
    dns_security str
    DNS security level. Valid values: no, basic, advanced.
    domain_numbers str
    Number of domain names bound.
    payment_type str
    period int
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renew_period int
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewal_status str
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    version_code str
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    version_name str
    Paid package version name.
    dnsSecurity String
    DNS security level. Valid values: no, basic, advanced.
    domainNumbers String
    Number of domain names bound.
    paymentType String
    period Number
    Creating a pre-paid instance, it must be set, the unit is month, please enter an integer multiple of 12 for annually paid products.
    renewPeriod Number
    Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
    versionCode String
    Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
    versionName String
    Paid package version name.

    Import

    DNS instance be imported using the id, e.g.

    $ pulumi import alicloud:dns/instance:Instance example dns-cn-v0h1ldjhfff
    

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi