alicloud.dns.Instance
Explore with Pulumi AI
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Instance resource accepts the following input properties:
- Dns
Security string - DNS security level. Valid values:
no
,basic
,advanced
. - Domain
Numbers string - Number of domain names bound.
- Version
Code string - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - Payment
Type 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.
- Renew
Period int - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- Renewal
Status string - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
.
- Dns
Security string - DNS security level. Valid values:
no
,basic
,advanced
. - Domain
Numbers string - Number of domain names bound.
- Version
Code string - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - Payment
Type 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.
- Renew
Period int - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- Renewal
Status string - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
.
- dns
Security String - DNS security level. Valid values:
no
,basic
,advanced
. - domain
Numbers String - Number of domain names bound.
- version
Code String - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - payment
Type 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.
- renew
Period Integer - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- renewal
Status String - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
.
- dns
Security string - DNS security level. Valid values:
no
,basic
,advanced
. - domain
Numbers string - Number of domain names bound.
- version
Code string - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - payment
Type 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.
- renew
Period number - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- renewal
Status string - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
.
- 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 toManualRenewal
.
- dns
Security String - DNS security level. Valid values:
no
,basic
,advanced
. - domain
Numbers String - Number of domain names bound.
- version
Code String - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - payment
Type 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.
- renew
Period Number - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- renewal
Status String - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
.
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.
- Version
Name string - Paid package version name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Version
Name string - Paid package version name.
- id String
- The provider-assigned unique ID for this managed resource.
- version
Name String - Paid package version name.
- id string
- The provider-assigned unique ID for this managed resource.
- version
Name 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.
- version
Name 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.
- Dns
Security string - DNS security level. Valid values:
no
,basic
,advanced
. - Domain
Numbers string - Number of domain names bound.
- Payment
Type 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.
- Renew
Period int - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- Renewal
Status string - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
. - Version
Code string - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - Version
Name string - Paid package version name.
- Dns
Security string - DNS security level. Valid values:
no
,basic
,advanced
. - Domain
Numbers string - Number of domain names bound.
- Payment
Type 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.
- Renew
Period int - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- Renewal
Status string - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
. - Version
Code string - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - Version
Name string - Paid package version name.
- dns
Security String - DNS security level. Valid values:
no
,basic
,advanced
. - domain
Numbers String - Number of domain names bound.
- payment
Type 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.
- renew
Period Integer - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- renewal
Status String - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
. - version
Code String - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - version
Name String - Paid package version name.
- dns
Security string - DNS security level. Valid values:
no
,basic
,advanced
. - domain
Numbers string - Number of domain names bound.
- payment
Type 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.
- renew
Period number - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- renewal
Status string - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
. - version
Code string - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - version
Name 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 toManualRenewal
. - version_
code str - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - version_
name str - Paid package version name.
- dns
Security String - DNS security level. Valid values:
no
,basic
,advanced
. - domain
Numbers String - Number of domain names bound.
- payment
Type 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.
- renew
Period Number - Automatic renewal period, the unit is month. When setting RenewalStatus to AutoRenewal, it must be set.
- renewal
Status String - Automatic renewal status. Valid values:
AutoRenewal
,ManualRenewal
, default toManualRenewal
. - version
Code String - Paid package version. Valid values:
version_personal
,version_enterprise_basic
,version_enterprise_advanced
. - version
Name 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.