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

alicloud.dns.AlidnsInstance

Explore with Pulumi AI

Create an Alidns Instance resource.

NOTE: Available since v1.95.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.dns.AlidnsInstance("example", {
    dnsSecurity: "no",
    domainNumbers: "2",
    period: 1,
    renewPeriod: 1,
    renewalStatus: "ManualRenewal",
    versionCode: "version_personal",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.dns.AlidnsInstance("example",
    dns_security="no",
    domain_numbers="2",
    period=1,
    renew_period=1,
    renewal_status="ManualRenewal",
    version_code="version_personal")
Copy
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.NewAlidnsInstance(ctx, "example", &dns.AlidnsInstanceArgs{
			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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = new AliCloud.Dns.AlidnsInstance("example", new()
    {
        DnsSecurity = "no",
        DomainNumbers = "2",
        Period = 1,
        RenewPeriod = 1,
        RenewalStatus = "ManualRenewal",
        VersionCode = "version_personal",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.AlidnsInstance;
import com.pulumi.alicloud.dns.AlidnsInstanceArgs;
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 example = new AlidnsInstance("example", AlidnsInstanceArgs.builder()
            .dnsSecurity("no")
            .domainNumbers("2")
            .period(1)
            .renewPeriod(1)
            .renewalStatus("ManualRenewal")
            .versionCode("version_personal")
            .build());

    }
}
Copy
resources:
  example:
    type: alicloud:dns:AlidnsInstance
    properties:
      dnsSecurity: no
      domainNumbers: '2'
      period: 1
      renewPeriod: 1
      renewalStatus: ManualRenewal
      versionCode: version_personal
Copy

Create AlidnsInstance Resource

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

Constructor syntax

new AlidnsInstance(name: string, args: AlidnsInstanceArgs, opts?: CustomResourceOptions);
@overload
def AlidnsInstance(resource_name: str,
                   args: AlidnsInstanceArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def AlidnsInstance(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 NewAlidnsInstance(ctx *Context, name string, args AlidnsInstanceArgs, opts ...ResourceOption) (*AlidnsInstance, error)
public AlidnsInstance(string name, AlidnsInstanceArgs args, CustomResourceOptions? opts = null)
public AlidnsInstance(String name, AlidnsInstanceArgs args)
public AlidnsInstance(String name, AlidnsInstanceArgs args, CustomResourceOptions options)
type: alicloud:dns:AlidnsInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AlidnsInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AlidnsInstanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AlidnsInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AlidnsInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AlidnsInstanceArgs
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 alidnsInstanceResource = new AliCloud.Dns.AlidnsInstance("alidnsInstanceResource", new()
{
    DnsSecurity = "string",
    DomainNumbers = "string",
    VersionCode = "string",
    PaymentType = "string",
    Period = 0,
    RenewPeriod = 0,
    RenewalStatus = "string",
});
Copy
example, err := dns.NewAlidnsInstance(ctx, "alidnsInstanceResource", &dns.AlidnsInstanceArgs{
	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"),
})
Copy
var alidnsInstanceResource = new AlidnsInstance("alidnsInstanceResource", AlidnsInstanceArgs.builder()
    .dnsSecurity("string")
    .domainNumbers("string")
    .versionCode("string")
    .paymentType("string")
    .period(0)
    .renewPeriod(0)
    .renewalStatus("string")
    .build());
Copy
alidns_instance_resource = alicloud.dns.AlidnsInstance("alidnsInstanceResource",
    dns_security="string",
    domain_numbers="string",
    version_code="string",
    payment_type="string",
    period=0,
    renew_period=0,
    renewal_status="string")
Copy
const alidnsInstanceResource = new alicloud.dns.AlidnsInstance("alidnsInstanceResource", {
    dnsSecurity: "string",
    domainNumbers: "string",
    versionCode: "string",
    paymentType: "string",
    period: 0,
    renewPeriod: 0,
    renewalStatus: "string",
});
Copy
type: alicloud:dns:AlidnsInstance
properties:
    dnsSecurity: string
    domainNumbers: string
    paymentType: string
    period: 0
    renewPeriod: 0
    renewalStatus: string
    versionCode: string
Copy

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

DnsSecurity
This property is required.
Changes to this property will trigger replacement.
string
Alidns security level. Valid values: no, basic, advanced.
DomainNumbers
This property is required.
Changes to this property will trigger replacement.
string
Number of domain names bound.
VersionCode
This property is required.
Changes to this property will trigger replacement.
string
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
PaymentType Changes to this property will trigger replacement. string
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. int
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
RenewalStatus Changes to this property will trigger replacement. string
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
DnsSecurity
This property is required.
Changes to this property will trigger replacement.
string
Alidns security level. Valid values: no, basic, advanced.
DomainNumbers
This property is required.
Changes to this property will trigger replacement.
string
Number of domain names bound.
VersionCode
This property is required.
Changes to this property will trigger replacement.
string
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
PaymentType Changes to this property will trigger replacement. string
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. int
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
RenewalStatus Changes to this property will trigger replacement. string
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
dnsSecurity
This property is required.
Changes to this property will trigger replacement.
String
Alidns security level. Valid values: no, basic, advanced.
domainNumbers
This property is required.
Changes to this property will trigger replacement.
String
Number of domain names bound.
versionCode
This property is required.
Changes to this property will trigger replacement.
String
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
paymentType Changes to this property will trigger replacement. String
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. Integer
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewalStatus Changes to this property will trigger replacement. String
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
dnsSecurity
This property is required.
Changes to this property will trigger replacement.
string
Alidns security level. Valid values: no, basic, advanced.
domainNumbers
This property is required.
Changes to this property will trigger replacement.
string
Number of domain names bound.
versionCode
This property is required.
Changes to this property will trigger replacement.
string
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
paymentType Changes to this property will trigger replacement. string
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. number
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewalStatus Changes to this property will trigger replacement. string
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
dns_security
This property is required.
Changes to this property will trigger replacement.
str
Alidns security level. Valid values: no, basic, advanced.
domain_numbers
This property is required.
Changes to this property will trigger replacement.
str
Number of domain names bound.
version_code
This property is required.
Changes to this property will trigger replacement.
str
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
payment_type Changes to this property will trigger replacement. str
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. int
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewal_status Changes to this property will trigger replacement. str
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
dnsSecurity
This property is required.
Changes to this property will trigger replacement.
String
Alidns security level. Valid values: no, basic, advanced.
domainNumbers
This property is required.
Changes to this property will trigger replacement.
String
Number of domain names bound.
versionCode
This property is required.
Changes to this property will trigger replacement.
String
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
paymentType Changes to this property will trigger replacement. String
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. Number
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewalStatus Changes to this property will trigger replacement. String
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.

Outputs

All input properties are implicitly available as output properties. Additionally, the AlidnsInstance 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 AlidnsInstance Resource

Get an existing AlidnsInstance 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?: AlidnsInstanceState, opts?: CustomResourceOptions): AlidnsInstance
@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) -> AlidnsInstance
func GetAlidnsInstance(ctx *Context, name string, id IDInput, state *AlidnsInstanceState, opts ...ResourceOption) (*AlidnsInstance, error)
public static AlidnsInstance Get(string name, Input<string> id, AlidnsInstanceState? state, CustomResourceOptions? opts = null)
public static AlidnsInstance get(String name, Output<String> id, AlidnsInstanceState state, CustomResourceOptions options)
resources:  _:    type: alicloud:dns:AlidnsInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
Alidns security level. Valid values: no, basic, advanced.
DomainNumbers Changes to this property will trigger replacement. string
Number of domain names bound.
PaymentType Changes to this property will trigger replacement. string
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. int
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
RenewalStatus Changes to this property will trigger replacement. string
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
VersionCode Changes to this property will trigger replacement. string
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
VersionName string
Paid package version name.
DnsSecurity Changes to this property will trigger replacement. string
Alidns security level. Valid values: no, basic, advanced.
DomainNumbers Changes to this property will trigger replacement. string
Number of domain names bound.
PaymentType Changes to this property will trigger replacement. string
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. int
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
RenewalStatus Changes to this property will trigger replacement. string
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
VersionCode Changes to this property will trigger replacement. string
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
VersionName string
Paid package version name.
dnsSecurity Changes to this property will trigger replacement. String
Alidns security level. Valid values: no, basic, advanced.
domainNumbers Changes to this property will trigger replacement. String
Number of domain names bound.
paymentType Changes to this property will trigger replacement. String
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. Integer
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewalStatus Changes to this property will trigger replacement. String
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
versionCode Changes to this property will trigger replacement. String
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
versionName String
Paid package version name.
dnsSecurity Changes to this property will trigger replacement. string
Alidns security level. Valid values: no, basic, advanced.
domainNumbers Changes to this property will trigger replacement. string
Number of domain names bound.
paymentType Changes to this property will trigger replacement. string
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. number
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewalStatus Changes to this property will trigger replacement. string
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
versionCode Changes to this property will trigger replacement. string
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
versionName string
Paid package version name.
dns_security Changes to this property will trigger replacement. str
Alidns security level. Valid values: no, basic, advanced.
domain_numbers Changes to this property will trigger replacement. str
Number of domain names bound.
payment_type Changes to this property will trigger replacement. str
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. int
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewal_status Changes to this property will trigger replacement. str
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
version_code Changes to this property will trigger replacement. str
Paid package version. Valid values: version_personal, version_enterprise_basic, version_enterprise_advanced.
version_name str
Paid package version name.
dnsSecurity Changes to this property will trigger replacement. String
Alidns security level. Valid values: no, basic, advanced.
domainNumbers Changes to this property will trigger replacement. String
Number of domain names bound.
paymentType Changes to this property will trigger replacement. String
The billing method of the Alidns instance. Valid values: Subscription. Default to Subscription.
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 Changes to this property will trigger replacement. Number
Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
renewalStatus Changes to this property will trigger replacement. String
Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, default to ManualRenewal.
versionCode Changes to this property will trigger replacement. 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/alidnsInstance:AlidnsInstance example dns-cn-v0h1ldjhfff
Copy

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.