diff --git a/sdk/dotnet/Domain.cs b/sdk/dotnet/Domain.cs index 322fc332..3c912f85 100644 --- a/sdk/dotnet/Domain.cs +++ b/sdk/dotnet/Domain.cs @@ -35,13 +35,17 @@ namespace Pulumi.DNSimple /// /// DNSimple domains can be imported using their numeric record ID. /// + /// bash + /// /// ```sh /// $ pulumi import dnsimple:index/domain:Domain resource_name 5678 /// ``` /// /// The record ID can be found within [DNSimple Domains API](https://developer.dnsimple.com/v2/domains/#listDomains). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options. /// - /// $ curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq + /// bash + /// + /// curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq /// /// { /// @@ -94,27 +98,47 @@ namespace Pulumi.DNSimple [DNSimpleResourceType("dnsimple:index/domain:Domain")] public partial class Domain : global::Pulumi.CustomResource { + /// + /// The account ID for the domain. + /// [Output("accountId")] public Output AccountId { get; private set; } = null!; + /// + /// Whether the domain is set to auto-renew. + /// [Output("autoRenew")] public Output AutoRenew { get; private set; } = null!; /// /// The domain name to be created + /// + /// # Attributes Reference /// [Output("name")] public Output Name { get; private set; } = null!; + /// + /// Whether the domain has WhoIs privacy enabled. + /// [Output("privateWhois")] public Output PrivateWhois { get; private set; } = null!; + /// + /// The ID of the registrant (contact) for the domain. + /// [Output("registrantId")] public Output RegistrantId { get; private set; } = null!; + /// + /// The state of the domain. + /// [Output("state")] public Output State { get; private set; } = null!; + /// + /// The domain name in Unicode format. + /// [Output("unicodeName")] public Output UnicodeName { get; private set; } = null!; @@ -166,6 +190,8 @@ public sealed class DomainArgs : global::Pulumi.ResourceArgs { /// /// The domain name to be created + /// + /// # Attributes Reference /// [Input("name", required: true)] public Input Name { get; set; } = null!; @@ -178,27 +204,47 @@ public DomainArgs() public sealed class DomainState : global::Pulumi.ResourceArgs { + /// + /// The account ID for the domain. + /// [Input("accountId")] public Input? AccountId { get; set; } + /// + /// Whether the domain is set to auto-renew. + /// [Input("autoRenew")] public Input? AutoRenew { get; set; } /// /// The domain name to be created + /// + /// # Attributes Reference /// [Input("name")] public Input? Name { get; set; } + /// + /// Whether the domain has WhoIs privacy enabled. + /// [Input("privateWhois")] public Input? PrivateWhois { get; set; } + /// + /// The ID of the registrant (contact) for the domain. + /// [Input("registrantId")] public Input? RegistrantId { get; set; } + /// + /// The state of the domain. + /// [Input("state")] public Input? State { get; set; } + /// + /// The domain name in Unicode format. + /// [Input("unicodeName")] public Input? UnicodeName { get; set; } diff --git a/sdk/dotnet/EmailForward.cs b/sdk/dotnet/EmailForward.cs index 387a3008..78aecb12 100644 --- a/sdk/dotnet/EmailForward.cs +++ b/sdk/dotnet/EmailForward.cs @@ -25,19 +25,31 @@ namespace Pulumi.DNSimple /// // Add an email forwarding rule to the domain /// var foobar = new DNSimple.EmailForward("foobar", new() /// { - /// Domain = dnsimpleDomain, + /// Domain = dnsimpleDomain.Name, /// AliasName = "sales", - /// DestinationEmail = "jane.doe@example.com", + /// DestinationEmail = "alice.appleseed@example.com", /// }); /// /// }); /// ``` + /// + /// ## Import + /// + /// DNSimple resources can be imported using the domain name and numeric email forward ID. + /// + /// **Importing email forward for example.com with email forward ID 1234** + /// + /// bash + /// + /// ```sh + /// $ pulumi import dnsimple:index/emailForward:EmailForward resource_name example.com_1234 + /// ``` /// [DNSimpleResourceType("dnsimple:index/emailForward:EmailForward")] public partial class EmailForward : global::Pulumi.CustomResource { /// - /// The source email address on the domain + /// The source email address on the domain, in full form. This is a computed attribute. /// [Output("aliasEmail")] public Output AliasEmail { get; private set; } = null!; @@ -49,13 +61,13 @@ public partial class EmailForward : global::Pulumi.CustomResource public Output AliasName { get; private set; } = null!; /// - /// The destination email address on another domain + /// The destination email address /// [Output("destinationEmail")] public Output DestinationEmail { get; private set; } = null!; /// - /// The domain to add the email forwarding rule to + /// The domain name to add the email forwarding rule to /// [Output("domain")] public Output Domain { get; private set; } = null!; @@ -113,13 +125,13 @@ public sealed class EmailForwardArgs : global::Pulumi.ResourceArgs public Input AliasName { get; set; } = null!; /// - /// The destination email address on another domain + /// The destination email address /// [Input("destinationEmail", required: true)] public Input DestinationEmail { get; set; } = null!; /// - /// The domain to add the email forwarding rule to + /// The domain name to add the email forwarding rule to /// [Input("domain", required: true)] public Input Domain { get; set; } = null!; @@ -133,7 +145,7 @@ public EmailForwardArgs() public sealed class EmailForwardState : global::Pulumi.ResourceArgs { /// - /// The source email address on the domain + /// The source email address on the domain, in full form. This is a computed attribute. /// [Input("aliasEmail")] public Input? AliasEmail { get; set; } @@ -145,13 +157,13 @@ public sealed class EmailForwardState : global::Pulumi.ResourceArgs public Input? AliasName { get; set; } /// - /// The destination email address on another domain + /// The destination email address /// [Input("destinationEmail")] public Input? DestinationEmail { get; set; } /// - /// The domain to add the email forwarding rule to + /// The domain name to add the email forwarding rule to /// [Input("domain")] public Input? Domain { get; set; } diff --git a/sdk/dotnet/GetCertificate.cs b/sdk/dotnet/GetCertificate.cs index 5ce0fe14..e303f94a 100644 --- a/sdk/dotnet/GetCertificate.cs +++ b/sdk/dotnet/GetCertificate.cs @@ -69,7 +69,7 @@ public sealed class GetCertificateArgs : global::Pulumi.InvokeArgs /// The ID of the SSL Certificate /// [Input("certificateId", required: true)] - public string CertificateId { get; set; } = null!; + public int CertificateId { get; set; } /// /// The domain of the SSL Certificate @@ -89,7 +89,7 @@ public sealed class GetCertificateInvokeArgs : global::Pulumi.InvokeArgs /// The ID of the SSL Certificate /// [Input("certificateId", required: true)] - public Input CertificateId { get; set; } = null!; + public Input CertificateId { get; set; } = null!; /// /// The domain of the SSL Certificate @@ -111,11 +111,8 @@ public sealed class GetCertificateResult /// A list of certificates that make up the chain /// public readonly ImmutableArray CertificateChains; - public readonly string CertificateId; + public readonly int CertificateId; public readonly string Domain; - /// - /// The provider-assigned unique ID for this managed resource. - /// public readonly string Id; /// /// The corresponding Private Key for the SSL Certificate @@ -134,7 +131,7 @@ public sealed class GetCertificateResult private GetCertificateResult( ImmutableArray certificateChains, - string certificateId, + int certificateId, string domain, diff --git a/sdk/dotnet/GetZone.cs b/sdk/dotnet/GetZone.cs index 6d49b216..c60c44fe 100644 --- a/sdk/dotnet/GetZone.cs +++ b/sdk/dotnet/GetZone.cs @@ -36,11 +36,10 @@ public static class GetZone /// /// * `name` - (Required) The name of the zone /// - /// The following attributes are exported: + /// The following additional attributes are exported: /// /// * `id` - The zone ID /// * `account_id` - The account ID - /// * `name` - The name of the zone /// * `reverse` - True for a reverse zone, false for a forward zone. /// public static Task InvokeAsync(GetZoneArgs args, InvokeOptions? options = null) @@ -71,11 +70,10 @@ public static Task InvokeAsync(GetZoneArgs args, InvokeOptions? o /// /// * `name` - (Required) The name of the zone /// - /// The following attributes are exported: + /// The following additional attributes are exported: /// /// * `id` - The zone ID /// * `account_id` - The account ID - /// * `name` - The name of the zone /// * `reverse` - True for a reverse zone, false for a forward zone. /// public static Output Invoke(GetZoneInvokeArgs args, InvokeOptions? options = null) diff --git a/sdk/dotnet/LetsEncryptCertificate.cs b/sdk/dotnet/LetsEncryptCertificate.cs index 24de5515..753088aa 100644 --- a/sdk/dotnet/LetsEncryptCertificate.cs +++ b/sdk/dotnet/LetsEncryptCertificate.cs @@ -42,17 +42,14 @@ public partial class LetsEncryptCertificate : global::Pulumi.CustomResource public Output AuthorityIdentifier { get; private set; } = null!; /// - /// Set to true if the certificate will auto-renew + /// True if the certificate should auto-renew /// [Output("autoRenew")] public Output AutoRenew { get; private set; } = null!; /// - /// The contact id for the certificate + /// The datetime the certificate was created /// - [Output("contactId")] - public Output ContactId { get; private set; } = null!; - [Output("createdAt")] public Output CreatedAt { get; private set; } = null!; @@ -66,10 +63,13 @@ public partial class LetsEncryptCertificate : global::Pulumi.CustomResource /// The domain to be issued the certificate for /// [Output("domainId")] - public Output DomainId { get; private set; } = null!; + public Output DomainId { get; private set; } = null!; - [Output("expiresOn")] - public Output ExpiresOn { get; private set; } = null!; + /// + /// The datetime the certificate will expire + /// + [Output("expiresAt")] + public Output ExpiresAt { get; private set; } = null!; /// /// The certificate name @@ -77,12 +77,21 @@ public partial class LetsEncryptCertificate : global::Pulumi.CustomResource [Output("name")] public Output Name { get; private set; } = null!; + /// + /// The signature algorithm to use for the certificate + /// + [Output("signatureAlgorithm")] + public Output SignatureAlgorithm { get; private set; } = null!; + /// /// The state of the certificate /// [Output("state")] public Output State { get; private set; } = null!; + /// + /// The datetime the certificate was last updated + /// [Output("updatedAt")] public Output UpdatedAt { get; private set; } = null!; @@ -139,22 +148,16 @@ public static LetsEncryptCertificate Get(string name, Input id, LetsEncr public sealed class LetsEncryptCertificateArgs : global::Pulumi.ResourceArgs { /// - /// Set to true if the certificate will auto-renew + /// True if the certificate should auto-renew /// [Input("autoRenew", required: true)] public Input AutoRenew { get; set; } = null!; - /// - /// The contact id for the certificate - /// - [Input("contactId")] - public Input? ContactId { get; set; } - /// /// The domain to be issued the certificate for /// - [Input("domainId")] - public Input? DomainId { get; set; } + [Input("domainId", required: true)] + public Input DomainId { get; set; } = null!; /// /// The certificate name @@ -162,6 +165,12 @@ public sealed class LetsEncryptCertificateArgs : global::Pulumi.ResourceArgs [Input("name", required: true)] public Input Name { get; set; } = null!; + /// + /// The signature algorithm to use for the certificate + /// + [Input("signatureAlgorithm")] + public Input? SignatureAlgorithm { get; set; } + public LetsEncryptCertificateArgs() { } @@ -177,17 +186,14 @@ public sealed class LetsEncryptCertificateState : global::Pulumi.ResourceArgs public Input? AuthorityIdentifier { get; set; } /// - /// Set to true if the certificate will auto-renew + /// True if the certificate should auto-renew /// [Input("autoRenew")] public Input? AutoRenew { get; set; } /// - /// The contact id for the certificate + /// The datetime the certificate was created /// - [Input("contactId")] - public Input? ContactId { get; set; } - [Input("createdAt")] public Input? CreatedAt { get; set; } @@ -203,8 +209,11 @@ public sealed class LetsEncryptCertificateState : global::Pulumi.ResourceArgs [Input("domainId")] public Input? DomainId { get; set; } - [Input("expiresOn")] - public Input? ExpiresOn { get; set; } + /// + /// The datetime the certificate will expire + /// + [Input("expiresAt")] + public Input? ExpiresAt { get; set; } /// /// The certificate name @@ -212,12 +221,21 @@ public sealed class LetsEncryptCertificateState : global::Pulumi.ResourceArgs [Input("name")] public Input? Name { get; set; } + /// + /// The signature algorithm to use for the certificate + /// + [Input("signatureAlgorithm")] + public Input? SignatureAlgorithm { get; set; } + /// /// The state of the certificate /// [Input("state")] public Input? State { get; set; } + /// + /// The datetime the certificate was last updated + /// [Input("updatedAt")] public Input? UpdatedAt { get; set; } diff --git a/sdk/dotnet/Provider.cs b/sdk/dotnet/Provider.cs index 213a17c3..96d4cce0 100644 --- a/sdk/dotnet/Provider.cs +++ b/sdk/dotnet/Provider.cs @@ -22,13 +22,13 @@ public partial class Provider : global::Pulumi.ProviderResource /// The account for API operations. /// [Output("account")] - public Output Account { get; private set; } = null!; + public Output Account { get; private set; } = null!; /// /// The API v2 token for API operations. /// [Output("token")] - public Output Token { get; private set; } = null!; + public Output Token { get; private set; } = null!; /// /// Custom string to append to the user agent used for sending HTTP requests to the API. @@ -44,7 +44,7 @@ public partial class Provider : global::Pulumi.ProviderResource /// The unique name of the resource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior - public Provider(string name, ProviderArgs args, CustomResourceOptions? options = null) + public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) : base("dnsimple", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) { } @@ -71,8 +71,8 @@ public sealed class ProviderArgs : global::Pulumi.ResourceArgs /// /// The account for API operations. /// - [Input("account", required: true)] - public Input Account { get; set; } = null!; + [Input("account")] + public Input? Account { get; set; } /// /// Flag to enable the prefetch of zone records. @@ -86,7 +86,7 @@ public sealed class ProviderArgs : global::Pulumi.ResourceArgs [Input("sandbox", json: true)] public Input? Sandbox { get; set; } - [Input("token", required: true)] + [Input("token")] private Input? _token; /// diff --git a/sdk/dotnet/Record.cs b/sdk/dotnet/Record.cs deleted file mode 100644 index 2a48d2e0..00000000 --- a/sdk/dotnet/Record.cs +++ /dev/null @@ -1,142 +0,0 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Threading.Tasks; -using Pulumi.Serialization; - -namespace Pulumi.DNSimple -{ - [Obsolete(@"This resource is deprecated. -It will be removed in the next major version.")] - [DNSimpleResourceType("dnsimple:index/record:Record")] - public partial class Record : global::Pulumi.CustomResource - { - [Output("domain")] - public Output Domain { get; private set; } = null!; - - [Output("domainId")] - public Output DomainId { get; private set; } = null!; - - [Output("hostname")] - public Output Hostname { get; private set; } = null!; - - [Output("name")] - public Output Name { get; private set; } = null!; - - [Output("priority")] - public Output Priority { get; private set; } = null!; - - [Output("ttl")] - public Output Ttl { get; private set; } = null!; - - [Output("type")] - public Output Type { get; private set; } = null!; - - [Output("value")] - public Output Value { get; private set; } = null!; - - - /// - /// Create a Record resource with the given unique name, arguments, and options. - /// - /// - /// The unique name of the resource - /// The arguments used to populate this resource's properties - /// A bag of options that control this resource's behavior - public Record(string name, RecordArgs args, CustomResourceOptions? options = null) - : base("dnsimple:index/record:Record", name, args ?? new RecordArgs(), MakeResourceOptions(options, "")) - { - } - - private Record(string name, Input id, RecordState? state = null, CustomResourceOptions? options = null) - : base("dnsimple:index/record:Record", name, state, MakeResourceOptions(options, id)) - { - } - - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - var merged = CustomResourceOptions.Merge(defaultOptions, options); - // Override the ID if one was specified for consistency with other language SDKs. - merged.Id = id ?? merged.Id; - return merged; - } - /// - /// Get an existing Record resource's state with the given name, ID, and optional extra - /// properties used to qualify the lookup. - /// - /// - /// The unique name of the resulting resource. - /// The unique provider ID of the resource to lookup. - /// Any extra arguments used during the lookup. - /// A bag of options that control this resource's behavior - public static Record Get(string name, Input id, RecordState? state = null, CustomResourceOptions? options = null) - { - return new Record(name, id, state, options); - } - } - - public sealed class RecordArgs : global::Pulumi.ResourceArgs - { - [Input("domain", required: true)] - public Input Domain { get; set; } = null!; - - [Input("name", required: true)] - public Input Name { get; set; } = null!; - - [Input("priority")] - public Input? Priority { get; set; } - - [Input("ttl")] - public Input? Ttl { get; set; } - - [Input("type", required: true)] - public Input Type { get; set; } = null!; - - [Input("value", required: true)] - public Input Value { get; set; } = null!; - - public RecordArgs() - { - } - public static new RecordArgs Empty => new RecordArgs(); - } - - public sealed class RecordState : global::Pulumi.ResourceArgs - { - [Input("domain")] - public Input? Domain { get; set; } - - [Input("domainId")] - public Input? DomainId { get; set; } - - [Input("hostname")] - public Input? Hostname { get; set; } - - [Input("name")] - public Input? Name { get; set; } - - [Input("priority")] - public Input? Priority { get; set; } - - [Input("ttl")] - public Input? Ttl { get; set; } - - [Input("type")] - public Input? Type { get; set; } - - [Input("value")] - public Input? Value { get; set; } - - public RecordState() - { - } - public static new RecordState Empty => new RecordState(); - } -} diff --git a/sdk/dotnet/ZoneRecord.cs b/sdk/dotnet/ZoneRecord.cs index b9b7d2b6..0d5b0c8f 100644 --- a/sdk/dotnet/ZoneRecord.cs +++ b/sdk/dotnet/ZoneRecord.cs @@ -12,11 +12,6 @@ namespace Pulumi.DNSimple /// /// Provides a DNSimple zone record resource. /// - /// ## Deprecation warning - /// - /// You can still use the _deprecated_ `dnsimple.Record` configuration, but be aware that it will be removed in the - /// upcoming 1.0.0 release. - /// /// ## Example Usage /// /// ```csharp @@ -34,7 +29,7 @@ namespace Pulumi.DNSimple /// Name = "", /// Value = "192.168.0.11", /// Type = "A", - /// Ttl = "3600", + /// Ttl = 3600, /// }); /// /// }); @@ -55,7 +50,7 @@ namespace Pulumi.DNSimple /// Name = "terraform", /// Value = "192.168.0.11", /// Type = "A", - /// Ttl = "3600", + /// Ttl = 3600, /// }); /// /// }); @@ -65,16 +60,22 @@ namespace Pulumi.DNSimple /// /// DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID. /// - /// __Importing record example.com with record ID 1234__ + /// **Importing record example.com with record ID 1234** + /// + /// bash /// /// ```sh /// $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 /// ``` - /// __Importing record www.example.com with record ID 1234__ + /// + /// **Importing record www.example.com with record ID 1234** + /// + /// bash /// /// ```sh /// $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 /// ``` + /// /// The record ID can be found in the URL when editing a record on the DNSimple web dashboard. /// [DNSimpleResourceType("dnsimple:index/zoneRecord:ZoneRecord")] @@ -90,7 +91,7 @@ public partial class ZoneRecord : global::Pulumi.CustomResource /// The priority of the record - only useful for some record types /// [Output("priority")] - public Output Priority { get; private set; } = null!; + public Output Priority { get; private set; } = null!; /// /// The FQDN of the record @@ -99,10 +100,10 @@ public partial class ZoneRecord : global::Pulumi.CustomResource public Output QualifiedName { get; private set; } = null!; /// - /// The TTL of the record + /// The TTL of the record - defaults to 3600 /// [Output("ttl")] - public Output Ttl { get; private set; } = null!; + public Output Ttl { get; private set; } = null!; /// /// The type of the record @@ -184,13 +185,13 @@ public sealed class ZoneRecordArgs : global::Pulumi.ResourceArgs /// The priority of the record - only useful for some record types /// [Input("priority")] - public Input? Priority { get; set; } + public Input? Priority { get; set; } /// - /// The TTL of the record + /// The TTL of the record - defaults to 3600 /// [Input("ttl")] - public Input? Ttl { get; set; } + public Input? Ttl { get; set; } /// /// The type of the record @@ -228,7 +229,7 @@ public sealed class ZoneRecordState : global::Pulumi.ResourceArgs /// The priority of the record - only useful for some record types /// [Input("priority")] - public Input? Priority { get; set; } + public Input? Priority { get; set; } /// /// The FQDN of the record @@ -237,10 +238,10 @@ public sealed class ZoneRecordState : global::Pulumi.ResourceArgs public Input? QualifiedName { get; set; } /// - /// The TTL of the record + /// The TTL of the record - defaults to 3600 /// [Input("ttl")] - public Input? Ttl { get; set; } + public Input? Ttl { get; set; } /// /// The type of the record diff --git a/sdk/go/dnsimple/domain.go b/sdk/go/dnsimple/domain.go index 94a7aa94..f4e88754 100644 --- a/sdk/go/dnsimple/domain.go +++ b/sdk/go/dnsimple/domain.go @@ -45,13 +45,17 @@ import ( // // DNSimple domains can be imported using their numeric record ID. // +// bash +// // ```sh // $ pulumi import dnsimple:index/domain:Domain resource_name 5678 // ``` // // The record ID can be found within [DNSimple Domains API](https://developer.dnsimple.com/v2/domains/#listDomains). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options. // -// $ curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq +// bash +// +// curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq // // { // @@ -103,14 +107,22 @@ import ( type Domain struct { pulumi.CustomResourceState - AccountId pulumi.IntOutput `pulumi:"accountId"` + // The account ID for the domain. + AccountId pulumi.IntOutput `pulumi:"accountId"` + // Whether the domain is set to auto-renew. AutoRenew pulumi.BoolOutput `pulumi:"autoRenew"` // The domain name to be created - Name pulumi.StringOutput `pulumi:"name"` - PrivateWhois pulumi.BoolOutput `pulumi:"privateWhois"` - RegistrantId pulumi.IntOutput `pulumi:"registrantId"` - State pulumi.StringOutput `pulumi:"state"` - UnicodeName pulumi.StringOutput `pulumi:"unicodeName"` + // + // # Attributes Reference + Name pulumi.StringOutput `pulumi:"name"` + // Whether the domain has WhoIs privacy enabled. + PrivateWhois pulumi.BoolOutput `pulumi:"privateWhois"` + // The ID of the registrant (contact) for the domain. + RegistrantId pulumi.IntOutput `pulumi:"registrantId"` + // The state of the domain. + State pulumi.StringOutput `pulumi:"state"` + // The domain name in Unicode format. + UnicodeName pulumi.StringOutput `pulumi:"unicodeName"` } // NewDomain registers a new resource with the given unique name, arguments, and options. @@ -146,25 +158,41 @@ func GetDomain(ctx *pulumi.Context, // Input properties used for looking up and filtering Domain resources. type domainState struct { - AccountId *int `pulumi:"accountId"` + // The account ID for the domain. + AccountId *int `pulumi:"accountId"` + // Whether the domain is set to auto-renew. AutoRenew *bool `pulumi:"autoRenew"` // The domain name to be created - Name *string `pulumi:"name"` - PrivateWhois *bool `pulumi:"privateWhois"` - RegistrantId *int `pulumi:"registrantId"` - State *string `pulumi:"state"` - UnicodeName *string `pulumi:"unicodeName"` + // + // # Attributes Reference + Name *string `pulumi:"name"` + // Whether the domain has WhoIs privacy enabled. + PrivateWhois *bool `pulumi:"privateWhois"` + // The ID of the registrant (contact) for the domain. + RegistrantId *int `pulumi:"registrantId"` + // The state of the domain. + State *string `pulumi:"state"` + // The domain name in Unicode format. + UnicodeName *string `pulumi:"unicodeName"` } type DomainState struct { + // The account ID for the domain. AccountId pulumi.IntPtrInput + // Whether the domain is set to auto-renew. AutoRenew pulumi.BoolPtrInput // The domain name to be created - Name pulumi.StringPtrInput + // + // # Attributes Reference + Name pulumi.StringPtrInput + // Whether the domain has WhoIs privacy enabled. PrivateWhois pulumi.BoolPtrInput + // The ID of the registrant (contact) for the domain. RegistrantId pulumi.IntPtrInput - State pulumi.StringPtrInput - UnicodeName pulumi.StringPtrInput + // The state of the domain. + State pulumi.StringPtrInput + // The domain name in Unicode format. + UnicodeName pulumi.StringPtrInput } func (DomainState) ElementType() reflect.Type { @@ -173,12 +201,16 @@ func (DomainState) ElementType() reflect.Type { type domainArgs struct { // The domain name to be created + // + // # Attributes Reference Name string `pulumi:"name"` } // The set of arguments for constructing a Domain resource. type DomainArgs struct { // The domain name to be created + // + // # Attributes Reference Name pulumi.StringInput } @@ -269,31 +301,39 @@ func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutpu return o } +// The account ID for the domain. func (o DomainOutput) AccountId() pulumi.IntOutput { return o.ApplyT(func(v *Domain) pulumi.IntOutput { return v.AccountId }).(pulumi.IntOutput) } +// Whether the domain is set to auto-renew. func (o DomainOutput) AutoRenew() pulumi.BoolOutput { return o.ApplyT(func(v *Domain) pulumi.BoolOutput { return v.AutoRenew }).(pulumi.BoolOutput) } // The domain name to be created +// +// # Attributes Reference func (o DomainOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } +// Whether the domain has WhoIs privacy enabled. func (o DomainOutput) PrivateWhois() pulumi.BoolOutput { return o.ApplyT(func(v *Domain) pulumi.BoolOutput { return v.PrivateWhois }).(pulumi.BoolOutput) } +// The ID of the registrant (contact) for the domain. func (o DomainOutput) RegistrantId() pulumi.IntOutput { return o.ApplyT(func(v *Domain) pulumi.IntOutput { return v.RegistrantId }).(pulumi.IntOutput) } +// The state of the domain. func (o DomainOutput) State() pulumi.StringOutput { return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) } +// The domain name in Unicode format. func (o DomainOutput) UnicodeName() pulumi.StringOutput { return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.UnicodeName }).(pulumi.StringOutput) } diff --git a/sdk/go/dnsimple/emailForward.go b/sdk/go/dnsimple/emailForward.go index 56faab37..4c34c3c1 100644 --- a/sdk/go/dnsimple/emailForward.go +++ b/sdk/go/dnsimple/emailForward.go @@ -30,9 +30,9 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // // Add an email forwarding rule to the domain // _, err := dnsimple.NewEmailForward(ctx, "foobar", &dnsimple.EmailForwardArgs{ -// Domain: pulumi.Any(dnsimpleDomain), +// Domain: pulumi.Any(dnsimpleDomain.Name), // AliasName: pulumi.String("sales"), -// DestinationEmail: pulumi.String("jane.doe@example.com"), +// DestinationEmail: pulumi.String("alice.appleseed@example.com"), // }) // if err != nil { // return err @@ -42,16 +42,28 @@ import ( // } // // ``` +// +// ## Import +// +// DNSimple resources can be imported using the domain name and numeric email forward ID. +// +// **Importing email forward for example.com with email forward ID 1234** +// +// bash +// +// ```sh +// $ pulumi import dnsimple:index/emailForward:EmailForward resource_name example.com_1234 +// ``` type EmailForward struct { pulumi.CustomResourceState - // The source email address on the domain + // The source email address on the domain, in full form. This is a computed attribute. AliasEmail pulumi.StringOutput `pulumi:"aliasEmail"` // The name part (the part before the @) of the source email address on the domain AliasName pulumi.StringOutput `pulumi:"aliasName"` - // The destination email address on another domain + // The destination email address DestinationEmail pulumi.StringOutput `pulumi:"destinationEmail"` - // The domain to add the email forwarding rule to + // The domain name to add the email forwarding rule to Domain pulumi.StringOutput `pulumi:"domain"` } @@ -94,24 +106,24 @@ func GetEmailForward(ctx *pulumi.Context, // Input properties used for looking up and filtering EmailForward resources. type emailForwardState struct { - // The source email address on the domain + // The source email address on the domain, in full form. This is a computed attribute. AliasEmail *string `pulumi:"aliasEmail"` // The name part (the part before the @) of the source email address on the domain AliasName *string `pulumi:"aliasName"` - // The destination email address on another domain + // The destination email address DestinationEmail *string `pulumi:"destinationEmail"` - // The domain to add the email forwarding rule to + // The domain name to add the email forwarding rule to Domain *string `pulumi:"domain"` } type EmailForwardState struct { - // The source email address on the domain + // The source email address on the domain, in full form. This is a computed attribute. AliasEmail pulumi.StringPtrInput // The name part (the part before the @) of the source email address on the domain AliasName pulumi.StringPtrInput - // The destination email address on another domain + // The destination email address DestinationEmail pulumi.StringPtrInput - // The domain to add the email forwarding rule to + // The domain name to add the email forwarding rule to Domain pulumi.StringPtrInput } @@ -122,9 +134,9 @@ func (EmailForwardState) ElementType() reflect.Type { type emailForwardArgs struct { // The name part (the part before the @) of the source email address on the domain AliasName string `pulumi:"aliasName"` - // The destination email address on another domain + // The destination email address DestinationEmail string `pulumi:"destinationEmail"` - // The domain to add the email forwarding rule to + // The domain name to add the email forwarding rule to Domain string `pulumi:"domain"` } @@ -132,9 +144,9 @@ type emailForwardArgs struct { type EmailForwardArgs struct { // The name part (the part before the @) of the source email address on the domain AliasName pulumi.StringInput - // The destination email address on another domain + // The destination email address DestinationEmail pulumi.StringInput - // The domain to add the email forwarding rule to + // The domain name to add the email forwarding rule to Domain pulumi.StringInput } @@ -225,7 +237,7 @@ func (o EmailForwardOutput) ToEmailForwardOutputWithContext(ctx context.Context) return o } -// The source email address on the domain +// The source email address on the domain, in full form. This is a computed attribute. func (o EmailForwardOutput) AliasEmail() pulumi.StringOutput { return o.ApplyT(func(v *EmailForward) pulumi.StringOutput { return v.AliasEmail }).(pulumi.StringOutput) } @@ -235,12 +247,12 @@ func (o EmailForwardOutput) AliasName() pulumi.StringOutput { return o.ApplyT(func(v *EmailForward) pulumi.StringOutput { return v.AliasName }).(pulumi.StringOutput) } -// The destination email address on another domain +// The destination email address func (o EmailForwardOutput) DestinationEmail() pulumi.StringOutput { return o.ApplyT(func(v *EmailForward) pulumi.StringOutput { return v.DestinationEmail }).(pulumi.StringOutput) } -// The domain to add the email forwarding rule to +// The domain name to add the email forwarding rule to func (o EmailForwardOutput) Domain() pulumi.StringOutput { return o.ApplyT(func(v *EmailForward) pulumi.StringOutput { return v.Domain }).(pulumi.StringOutput) } diff --git a/sdk/go/dnsimple/getCertificate.go b/sdk/go/dnsimple/getCertificate.go index f8a785bd..63273e29 100644 --- a/sdk/go/dnsimple/getCertificate.go +++ b/sdk/go/dnsimple/getCertificate.go @@ -52,7 +52,7 @@ func GetCertificate(ctx *pulumi.Context, args *GetCertificateArgs, opts ...pulum // A collection of arguments for invoking getCertificate. type GetCertificateArgs struct { // The ID of the SSL Certificate - CertificateId string `pulumi:"certificateId"` + CertificateId int `pulumi:"certificateId"` // The domain of the SSL Certificate Domain string `pulumi:"domain"` } @@ -61,10 +61,9 @@ type GetCertificateArgs struct { type GetCertificateResult struct { // A list of certificates that make up the chain CertificateChains []string `pulumi:"certificateChains"` - CertificateId string `pulumi:"certificateId"` + CertificateId int `pulumi:"certificateId"` Domain string `pulumi:"domain"` - // The provider-assigned unique ID for this managed resource. - Id string `pulumi:"id"` + Id string `pulumi:"id"` // The corresponding Private Key for the SSL Certificate PrivateKey string `pulumi:"privateKey"` // The Root Certificate of the issuing CA @@ -89,7 +88,7 @@ func GetCertificateOutput(ctx *pulumi.Context, args GetCertificateOutputArgs, op // A collection of arguments for invoking getCertificate. type GetCertificateOutputArgs struct { // The ID of the SSL Certificate - CertificateId pulumi.StringInput `pulumi:"certificateId"` + CertificateId pulumi.IntInput `pulumi:"certificateId"` // The domain of the SSL Certificate Domain pulumi.StringInput `pulumi:"domain"` } @@ -118,15 +117,14 @@ func (o GetCertificateResultOutput) CertificateChains() pulumi.StringArrayOutput return o.ApplyT(func(v GetCertificateResult) []string { return v.CertificateChains }).(pulumi.StringArrayOutput) } -func (o GetCertificateResultOutput) CertificateId() pulumi.StringOutput { - return o.ApplyT(func(v GetCertificateResult) string { return v.CertificateId }).(pulumi.StringOutput) +func (o GetCertificateResultOutput) CertificateId() pulumi.IntOutput { + return o.ApplyT(func(v GetCertificateResult) int { return v.CertificateId }).(pulumi.IntOutput) } func (o GetCertificateResultOutput) Domain() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateResult) string { return v.Domain }).(pulumi.StringOutput) } -// The provider-assigned unique ID for this managed resource. func (o GetCertificateResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateResult) string { return v.Id }).(pulumi.StringOutput) } diff --git a/sdk/go/dnsimple/getZone.go b/sdk/go/dnsimple/getZone.go index 776c4384..18b682b7 100644 --- a/sdk/go/dnsimple/getZone.go +++ b/sdk/go/dnsimple/getZone.go @@ -43,11 +43,10 @@ import ( // // * `name` - (Required) The name of the zone // -// The following attributes are exported: +// The following additional attributes are exported: // // * `id` - The zone ID // * `accountId` - The account ID -// * `name` - The name of the zone // * `reverse` - True for a reverse zone, false for a forward zone. func GetZone(ctx *pulumi.Context, args *GetZoneArgs, opts ...pulumi.InvokeOption) (*GetZoneResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) diff --git a/sdk/go/dnsimple/init.go b/sdk/go/dnsimple/init.go index 1960a6f0..01af774a 100644 --- a/sdk/go/dnsimple/init.go +++ b/sdk/go/dnsimple/init.go @@ -27,8 +27,6 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &EmailForward{} case "dnsimple:index/letsEncryptCertificate:LetsEncryptCertificate": r = &LetsEncryptCertificate{} - case "dnsimple:index/record:Record": - r = &Record{} case "dnsimple:index/zoneRecord:ZoneRecord": r = &ZoneRecord{} default: @@ -77,11 +75,6 @@ func init() { "index/letsEncryptCertificate", &module{version}, ) - pulumi.RegisterResourceModule( - "dnsimple", - "index/record", - &module{version}, - ) pulumi.RegisterResourceModule( "dnsimple", "index/zoneRecord", diff --git a/sdk/go/dnsimple/letsEncryptCertificate.go b/sdk/go/dnsimple/letsEncryptCertificate.go index e2540c01..15e98092 100644 --- a/sdk/go/dnsimple/letsEncryptCertificate.go +++ b/sdk/go/dnsimple/letsEncryptCertificate.go @@ -46,22 +46,23 @@ type LetsEncryptCertificate struct { // The identifying certification authority (CA) AuthorityIdentifier pulumi.StringOutput `pulumi:"authorityIdentifier"` - // Set to true if the certificate will auto-renew + // True if the certificate should auto-renew AutoRenew pulumi.BoolOutput `pulumi:"autoRenew"` - // The contact id for the certificate - // - // Deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - ContactId pulumi.IntPtrOutput `pulumi:"contactId"` + // The datetime the certificate was created CreatedAt pulumi.StringOutput `pulumi:"createdAt"` // The certificate signing request Csr pulumi.StringOutput `pulumi:"csr"` // The domain to be issued the certificate for - DomainId pulumi.StringPtrOutput `pulumi:"domainId"` - ExpiresOn pulumi.StringOutput `pulumi:"expiresOn"` + DomainId pulumi.StringOutput `pulumi:"domainId"` + // The datetime the certificate will expire + ExpiresAt pulumi.StringOutput `pulumi:"expiresAt"` // The certificate name Name pulumi.StringOutput `pulumi:"name"` + // The signature algorithm to use for the certificate + SignatureAlgorithm pulumi.StringPtrOutput `pulumi:"signatureAlgorithm"` // The state of the certificate - State pulumi.StringOutput `pulumi:"state"` + State pulumi.StringOutput `pulumi:"state"` + // The datetime the certificate was last updated UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"` // The years the certificate will last Years pulumi.IntOutput `pulumi:"years"` @@ -77,6 +78,9 @@ func NewLetsEncryptCertificate(ctx *pulumi.Context, if args.AutoRenew == nil { return nil, errors.New("invalid value for required argument 'AutoRenew'") } + if args.DomainId == nil { + return nil, errors.New("invalid value for required argument 'DomainId'") + } if args.Name == nil { return nil, errors.New("invalid value for required argument 'Name'") } @@ -105,22 +109,23 @@ func GetLetsEncryptCertificate(ctx *pulumi.Context, type letsEncryptCertificateState struct { // The identifying certification authority (CA) AuthorityIdentifier *string `pulumi:"authorityIdentifier"` - // Set to true if the certificate will auto-renew + // True if the certificate should auto-renew AutoRenew *bool `pulumi:"autoRenew"` - // The contact id for the certificate - // - // Deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - ContactId *int `pulumi:"contactId"` + // The datetime the certificate was created CreatedAt *string `pulumi:"createdAt"` // The certificate signing request Csr *string `pulumi:"csr"` // The domain to be issued the certificate for - DomainId *string `pulumi:"domainId"` - ExpiresOn *string `pulumi:"expiresOn"` + DomainId *string `pulumi:"domainId"` + // The datetime the certificate will expire + ExpiresAt *string `pulumi:"expiresAt"` // The certificate name Name *string `pulumi:"name"` + // The signature algorithm to use for the certificate + SignatureAlgorithm *string `pulumi:"signatureAlgorithm"` // The state of the certificate - State *string `pulumi:"state"` + State *string `pulumi:"state"` + // The datetime the certificate was last updated UpdatedAt *string `pulumi:"updatedAt"` // The years the certificate will last Years *int `pulumi:"years"` @@ -129,22 +134,23 @@ type letsEncryptCertificateState struct { type LetsEncryptCertificateState struct { // The identifying certification authority (CA) AuthorityIdentifier pulumi.StringPtrInput - // Set to true if the certificate will auto-renew + // True if the certificate should auto-renew AutoRenew pulumi.BoolPtrInput - // The contact id for the certificate - // - // Deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - ContactId pulumi.IntPtrInput + // The datetime the certificate was created CreatedAt pulumi.StringPtrInput // The certificate signing request Csr pulumi.StringPtrInput // The domain to be issued the certificate for - DomainId pulumi.StringPtrInput - ExpiresOn pulumi.StringPtrInput + DomainId pulumi.StringPtrInput + // The datetime the certificate will expire + ExpiresAt pulumi.StringPtrInput // The certificate name Name pulumi.StringPtrInput + // The signature algorithm to use for the certificate + SignatureAlgorithm pulumi.StringPtrInput // The state of the certificate - State pulumi.StringPtrInput + State pulumi.StringPtrInput + // The datetime the certificate was last updated UpdatedAt pulumi.StringPtrInput // The years the certificate will last Years pulumi.IntPtrInput @@ -155,30 +161,26 @@ func (LetsEncryptCertificateState) ElementType() reflect.Type { } type letsEncryptCertificateArgs struct { - // Set to true if the certificate will auto-renew + // True if the certificate should auto-renew AutoRenew bool `pulumi:"autoRenew"` - // The contact id for the certificate - // - // Deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - ContactId *int `pulumi:"contactId"` // The domain to be issued the certificate for - DomainId *string `pulumi:"domainId"` + DomainId string `pulumi:"domainId"` // The certificate name Name string `pulumi:"name"` + // The signature algorithm to use for the certificate + SignatureAlgorithm *string `pulumi:"signatureAlgorithm"` } // The set of arguments for constructing a LetsEncryptCertificate resource. type LetsEncryptCertificateArgs struct { - // Set to true if the certificate will auto-renew + // True if the certificate should auto-renew AutoRenew pulumi.BoolInput - // The contact id for the certificate - // - // Deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - ContactId pulumi.IntPtrInput // The domain to be issued the certificate for - DomainId pulumi.StringPtrInput + DomainId pulumi.StringInput // The certificate name Name pulumi.StringInput + // The signature algorithm to use for the certificate + SignatureAlgorithm pulumi.StringPtrInput } func (LetsEncryptCertificateArgs) ElementType() reflect.Type { @@ -273,18 +275,12 @@ func (o LetsEncryptCertificateOutput) AuthorityIdentifier() pulumi.StringOutput return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.AuthorityIdentifier }).(pulumi.StringOutput) } -// Set to true if the certificate will auto-renew +// True if the certificate should auto-renew func (o LetsEncryptCertificateOutput) AutoRenew() pulumi.BoolOutput { return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.BoolOutput { return v.AutoRenew }).(pulumi.BoolOutput) } -// The contact id for the certificate -// -// Deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version. -func (o LetsEncryptCertificateOutput) ContactId() pulumi.IntPtrOutput { - return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.IntPtrOutput { return v.ContactId }).(pulumi.IntPtrOutput) -} - +// The datetime the certificate was created func (o LetsEncryptCertificateOutput) CreatedAt() pulumi.StringOutput { return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) } @@ -295,12 +291,13 @@ func (o LetsEncryptCertificateOutput) Csr() pulumi.StringOutput { } // The domain to be issued the certificate for -func (o LetsEncryptCertificateOutput) DomainId() pulumi.StringPtrOutput { - return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringPtrOutput { return v.DomainId }).(pulumi.StringPtrOutput) +func (o LetsEncryptCertificateOutput) DomainId() pulumi.StringOutput { + return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.DomainId }).(pulumi.StringOutput) } -func (o LetsEncryptCertificateOutput) ExpiresOn() pulumi.StringOutput { - return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.ExpiresOn }).(pulumi.StringOutput) +// The datetime the certificate will expire +func (o LetsEncryptCertificateOutput) ExpiresAt() pulumi.StringOutput { + return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.ExpiresAt }).(pulumi.StringOutput) } // The certificate name @@ -308,11 +305,17 @@ func (o LetsEncryptCertificateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } +// The signature algorithm to use for the certificate +func (o LetsEncryptCertificateOutput) SignatureAlgorithm() pulumi.StringPtrOutput { + return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringPtrOutput { return v.SignatureAlgorithm }).(pulumi.StringPtrOutput) +} + // The state of the certificate func (o LetsEncryptCertificateOutput) State() pulumi.StringOutput { return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) } +// The datetime the certificate was last updated func (o LetsEncryptCertificateOutput) UpdatedAt() pulumi.StringOutput { return o.ApplyT(func(v *LetsEncryptCertificate) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput) } diff --git a/sdk/go/dnsimple/provider.go b/sdk/go/dnsimple/provider.go index fc331240..c1a42e2c 100644 --- a/sdk/go/dnsimple/provider.go +++ b/sdk/go/dnsimple/provider.go @@ -7,7 +7,6 @@ import ( "context" "reflect" - "errors" "github.com/pulumi/pulumi-dnsimple/sdk/v3/go/dnsimple/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -20,9 +19,9 @@ type Provider struct { pulumi.ProviderResourceState // The account for API operations. - Account pulumi.StringOutput `pulumi:"account"` + Account pulumi.StringPtrOutput `pulumi:"account"` // The API v2 token for API operations. - Token pulumi.StringOutput `pulumi:"token"` + Token pulumi.StringPtrOutput `pulumi:"token"` // Custom string to append to the user agent used for sending HTTP requests to the API. UserAgent pulumi.StringPtrOutput `pulumi:"userAgent"` } @@ -31,17 +30,11 @@ type Provider struct { func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) { if args == nil { - return nil, errors.New("missing one or more required arguments") + args = &ProviderArgs{} } - if args.Account == nil { - return nil, errors.New("invalid value for required argument 'Account'") - } - if args.Token == nil { - return nil, errors.New("invalid value for required argument 'Token'") - } if args.Token != nil { - args.Token = pulumi.ToSecret(args.Token).(pulumi.StringInput) + args.Token = pulumi.ToSecret(args.Token).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "token", @@ -58,13 +51,13 @@ func NewProvider(ctx *pulumi.Context, type providerArgs struct { // The account for API operations. - Account string `pulumi:"account"` + Account *string `pulumi:"account"` // Flag to enable the prefetch of zone records. Prefetch *bool `pulumi:"prefetch"` // Flag to enable the sandbox API. Sandbox *bool `pulumi:"sandbox"` // The API v2 token for API operations. - Token string `pulumi:"token"` + Token *string `pulumi:"token"` // Custom string to append to the user agent used for sending HTTP requests to the API. UserAgent *string `pulumi:"userAgent"` } @@ -72,13 +65,13 @@ type providerArgs struct { // The set of arguments for constructing a Provider resource. type ProviderArgs struct { // The account for API operations. - Account pulumi.StringInput + Account pulumi.StringPtrInput // Flag to enable the prefetch of zone records. Prefetch pulumi.BoolPtrInput // Flag to enable the sandbox API. Sandbox pulumi.BoolPtrInput // The API v2 token for API operations. - Token pulumi.StringInput + Token pulumi.StringPtrInput // Custom string to append to the user agent used for sending HTTP requests to the API. UserAgent pulumi.StringPtrInput } @@ -121,13 +114,13 @@ func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) Provide } // The account for API operations. -func (o ProviderOutput) Account() pulumi.StringOutput { - return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.Account }).(pulumi.StringOutput) +func (o ProviderOutput) Account() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Account }).(pulumi.StringPtrOutput) } // The API v2 token for API operations. -func (o ProviderOutput) Token() pulumi.StringOutput { - return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.Token }).(pulumi.StringOutput) +func (o ProviderOutput) Token() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Token }).(pulumi.StringPtrOutput) } // Custom string to append to the user agent used for sending HTTP requests to the API. diff --git a/sdk/go/dnsimple/record.go b/sdk/go/dnsimple/record.go deleted file mode 100644 index 8e7b44d8..00000000 --- a/sdk/go/dnsimple/record.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package dnsimple - -import ( - "context" - "reflect" - - "errors" - "github.com/pulumi/pulumi-dnsimple/sdk/v3/go/dnsimple/internal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -// Deprecated: This resource is deprecated. -// It will be removed in the next major version. -type Record struct { - pulumi.CustomResourceState - - Domain pulumi.StringOutput `pulumi:"domain"` - DomainId pulumi.StringOutput `pulumi:"domainId"` - Hostname pulumi.StringOutput `pulumi:"hostname"` - Name pulumi.StringOutput `pulumi:"name"` - Priority pulumi.StringOutput `pulumi:"priority"` - Ttl pulumi.StringPtrOutput `pulumi:"ttl"` - Type pulumi.StringOutput `pulumi:"type"` - Value pulumi.StringOutput `pulumi:"value"` -} - -// NewRecord registers a new resource with the given unique name, arguments, and options. -func NewRecord(ctx *pulumi.Context, - name string, args *RecordArgs, opts ...pulumi.ResourceOption) (*Record, error) { - if args == nil { - return nil, errors.New("missing one or more required arguments") - } - - if args.Domain == nil { - return nil, errors.New("invalid value for required argument 'Domain'") - } - if args.Name == nil { - return nil, errors.New("invalid value for required argument 'Name'") - } - if args.Type == nil { - return nil, errors.New("invalid value for required argument 'Type'") - } - if args.Value == nil { - return nil, errors.New("invalid value for required argument 'Value'") - } - opts = internal.PkgResourceDefaultOpts(opts) - var resource Record - err := ctx.RegisterResource("dnsimple:index/record:Record", name, args, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// GetRecord gets an existing Record resource's state with the given name, ID, and optional -// state properties that are used to uniquely qualify the lookup (nil if not required). -func GetRecord(ctx *pulumi.Context, - name string, id pulumi.IDInput, state *RecordState, opts ...pulumi.ResourceOption) (*Record, error) { - var resource Record - err := ctx.ReadResource("dnsimple:index/record:Record", name, id, state, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// Input properties used for looking up and filtering Record resources. -type recordState struct { - Domain *string `pulumi:"domain"` - DomainId *string `pulumi:"domainId"` - Hostname *string `pulumi:"hostname"` - Name *string `pulumi:"name"` - Priority *string `pulumi:"priority"` - Ttl *string `pulumi:"ttl"` - Type *string `pulumi:"type"` - Value *string `pulumi:"value"` -} - -type RecordState struct { - Domain pulumi.StringPtrInput - DomainId pulumi.StringPtrInput - Hostname pulumi.StringPtrInput - Name pulumi.StringPtrInput - Priority pulumi.StringPtrInput - Ttl pulumi.StringPtrInput - Type pulumi.StringPtrInput - Value pulumi.StringPtrInput -} - -func (RecordState) ElementType() reflect.Type { - return reflect.TypeOf((*recordState)(nil)).Elem() -} - -type recordArgs struct { - Domain string `pulumi:"domain"` - Name string `pulumi:"name"` - Priority *string `pulumi:"priority"` - Ttl *string `pulumi:"ttl"` - Type string `pulumi:"type"` - Value string `pulumi:"value"` -} - -// The set of arguments for constructing a Record resource. -type RecordArgs struct { - Domain pulumi.StringInput - Name pulumi.StringInput - Priority pulumi.StringPtrInput - Ttl pulumi.StringPtrInput - Type pulumi.StringInput - Value pulumi.StringInput -} - -func (RecordArgs) ElementType() reflect.Type { - return reflect.TypeOf((*recordArgs)(nil)).Elem() -} - -type RecordInput interface { - pulumi.Input - - ToRecordOutput() RecordOutput - ToRecordOutputWithContext(ctx context.Context) RecordOutput -} - -func (*Record) ElementType() reflect.Type { - return reflect.TypeOf((**Record)(nil)).Elem() -} - -func (i *Record) ToRecordOutput() RecordOutput { - return i.ToRecordOutputWithContext(context.Background()) -} - -func (i *Record) ToRecordOutputWithContext(ctx context.Context) RecordOutput { - return pulumi.ToOutputWithContext(ctx, i).(RecordOutput) -} - -// RecordArrayInput is an input type that accepts RecordArray and RecordArrayOutput values. -// You can construct a concrete instance of `RecordArrayInput` via: -// -// RecordArray{ RecordArgs{...} } -type RecordArrayInput interface { - pulumi.Input - - ToRecordArrayOutput() RecordArrayOutput - ToRecordArrayOutputWithContext(context.Context) RecordArrayOutput -} - -type RecordArray []RecordInput - -func (RecordArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]*Record)(nil)).Elem() -} - -func (i RecordArray) ToRecordArrayOutput() RecordArrayOutput { - return i.ToRecordArrayOutputWithContext(context.Background()) -} - -func (i RecordArray) ToRecordArrayOutputWithContext(ctx context.Context) RecordArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(RecordArrayOutput) -} - -// RecordMapInput is an input type that accepts RecordMap and RecordMapOutput values. -// You can construct a concrete instance of `RecordMapInput` via: -// -// RecordMap{ "key": RecordArgs{...} } -type RecordMapInput interface { - pulumi.Input - - ToRecordMapOutput() RecordMapOutput - ToRecordMapOutputWithContext(context.Context) RecordMapOutput -} - -type RecordMap map[string]RecordInput - -func (RecordMap) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*Record)(nil)).Elem() -} - -func (i RecordMap) ToRecordMapOutput() RecordMapOutput { - return i.ToRecordMapOutputWithContext(context.Background()) -} - -func (i RecordMap) ToRecordMapOutputWithContext(ctx context.Context) RecordMapOutput { - return pulumi.ToOutputWithContext(ctx, i).(RecordMapOutput) -} - -type RecordOutput struct{ *pulumi.OutputState } - -func (RecordOutput) ElementType() reflect.Type { - return reflect.TypeOf((**Record)(nil)).Elem() -} - -func (o RecordOutput) ToRecordOutput() RecordOutput { - return o -} - -func (o RecordOutput) ToRecordOutputWithContext(ctx context.Context) RecordOutput { - return o -} - -func (o RecordOutput) Domain() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Domain }).(pulumi.StringOutput) -} - -func (o RecordOutput) DomainId() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.DomainId }).(pulumi.StringOutput) -} - -func (o RecordOutput) Hostname() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) -} - -func (o RecordOutput) Name() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) -} - -func (o RecordOutput) Priority() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Priority }).(pulumi.StringOutput) -} - -func (o RecordOutput) Ttl() pulumi.StringPtrOutput { - return o.ApplyT(func(v *Record) pulumi.StringPtrOutput { return v.Ttl }).(pulumi.StringPtrOutput) -} - -func (o RecordOutput) Type() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) -} - -func (o RecordOutput) Value() pulumi.StringOutput { - return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput) -} - -type RecordArrayOutput struct{ *pulumi.OutputState } - -func (RecordArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]*Record)(nil)).Elem() -} - -func (o RecordArrayOutput) ToRecordArrayOutput() RecordArrayOutput { - return o -} - -func (o RecordArrayOutput) ToRecordArrayOutputWithContext(ctx context.Context) RecordArrayOutput { - return o -} - -func (o RecordArrayOutput) Index(i pulumi.IntInput) RecordOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Record { - return vs[0].([]*Record)[vs[1].(int)] - }).(RecordOutput) -} - -type RecordMapOutput struct{ *pulumi.OutputState } - -func (RecordMapOutput) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*Record)(nil)).Elem() -} - -func (o RecordMapOutput) ToRecordMapOutput() RecordMapOutput { - return o -} - -func (o RecordMapOutput) ToRecordMapOutputWithContext(ctx context.Context) RecordMapOutput { - return o -} - -func (o RecordMapOutput) MapIndex(k pulumi.StringInput) RecordOutput { - return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Record { - return vs[0].(map[string]*Record)[vs[1].(string)] - }).(RecordOutput) -} - -func init() { - pulumi.RegisterInputType(reflect.TypeOf((*RecordInput)(nil)).Elem(), &Record{}) - pulumi.RegisterInputType(reflect.TypeOf((*RecordArrayInput)(nil)).Elem(), RecordArray{}) - pulumi.RegisterInputType(reflect.TypeOf((*RecordMapInput)(nil)).Elem(), RecordMap{}) - pulumi.RegisterOutputType(RecordOutput{}) - pulumi.RegisterOutputType(RecordArrayOutput{}) - pulumi.RegisterOutputType(RecordMapOutput{}) -} diff --git a/sdk/go/dnsimple/zoneRecord.go b/sdk/go/dnsimple/zoneRecord.go index 5ddff6df..4acd3181 100644 --- a/sdk/go/dnsimple/zoneRecord.go +++ b/sdk/go/dnsimple/zoneRecord.go @@ -14,11 +14,6 @@ import ( // Provides a DNSimple zone record resource. // -// ## Deprecation warning -// -// You can still use the _deprecated_ `Record` configuration, but be aware that it will be removed in the -// upcoming 1.0.0 release. -// // ## Example Usage // // ```go @@ -39,7 +34,7 @@ import ( // Name: pulumi.String(""), // Value: pulumi.String("192.168.0.11"), // Type: pulumi.String("A"), -// Ttl: pulumi.String("3600"), +// Ttl: pulumi.Int(3600), // }) // if err != nil { // return err @@ -68,7 +63,7 @@ import ( // Name: pulumi.String("terraform"), // Value: pulumi.String("192.168.0.11"), // Type: pulumi.String("A"), -// Ttl: pulumi.String("3600"), +// Ttl: pulumi.Int(3600), // }) // if err != nil { // return err @@ -83,16 +78,22 @@ import ( // // DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID. // -// __Importing record example.com with record ID 1234__ +// **Importing record example.com with record ID 1234** +// +// bash // // ```sh // $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 // ``` -// __Importing record www.example.com with record ID 1234__ +// +// **Importing record www.example.com with record ID 1234** +// +// bash // // ```sh // $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 // ``` +// // The record ID can be found in the URL when editing a record on the DNSimple web dashboard. type ZoneRecord struct { pulumi.CustomResourceState @@ -100,11 +101,11 @@ type ZoneRecord struct { // The name of the record Name pulumi.StringOutput `pulumi:"name"` // The priority of the record - only useful for some record types - Priority pulumi.StringOutput `pulumi:"priority"` + Priority pulumi.IntOutput `pulumi:"priority"` // The FQDN of the record QualifiedName pulumi.StringOutput `pulumi:"qualifiedName"` - // The TTL of the record - Ttl pulumi.StringPtrOutput `pulumi:"ttl"` + // The TTL of the record - defaults to 3600 + Ttl pulumi.IntOutput `pulumi:"ttl"` // The type of the record Type pulumi.StringOutput `pulumi:"type"` // The value of the record @@ -160,11 +161,11 @@ type zoneRecordState struct { // The name of the record Name *string `pulumi:"name"` // The priority of the record - only useful for some record types - Priority *string `pulumi:"priority"` + Priority *int `pulumi:"priority"` // The FQDN of the record QualifiedName *string `pulumi:"qualifiedName"` - // The TTL of the record - Ttl *string `pulumi:"ttl"` + // The TTL of the record - defaults to 3600 + Ttl *int `pulumi:"ttl"` // The type of the record Type *string `pulumi:"type"` // The value of the record @@ -179,11 +180,11 @@ type ZoneRecordState struct { // The name of the record Name pulumi.StringPtrInput // The priority of the record - only useful for some record types - Priority pulumi.StringPtrInput + Priority pulumi.IntPtrInput // The FQDN of the record QualifiedName pulumi.StringPtrInput - // The TTL of the record - Ttl pulumi.StringPtrInput + // The TTL of the record - defaults to 3600 + Ttl pulumi.IntPtrInput // The type of the record Type pulumi.StringPtrInput // The value of the record @@ -202,9 +203,9 @@ type zoneRecordArgs struct { // The name of the record Name string `pulumi:"name"` // The priority of the record - only useful for some record types - Priority *string `pulumi:"priority"` - // The TTL of the record - Ttl *string `pulumi:"ttl"` + Priority *int `pulumi:"priority"` + // The TTL of the record - defaults to 3600 + Ttl *int `pulumi:"ttl"` // The type of the record Type string `pulumi:"type"` // The value of the record @@ -218,9 +219,9 @@ type ZoneRecordArgs struct { // The name of the record Name pulumi.StringInput // The priority of the record - only useful for some record types - Priority pulumi.StringPtrInput - // The TTL of the record - Ttl pulumi.StringPtrInput + Priority pulumi.IntPtrInput + // The TTL of the record - defaults to 3600 + Ttl pulumi.IntPtrInput // The type of the record Type pulumi.StringInput // The value of the record @@ -322,8 +323,8 @@ func (o ZoneRecordOutput) Name() pulumi.StringOutput { } // The priority of the record - only useful for some record types -func (o ZoneRecordOutput) Priority() pulumi.StringOutput { - return o.ApplyT(func(v *ZoneRecord) pulumi.StringOutput { return v.Priority }).(pulumi.StringOutput) +func (o ZoneRecordOutput) Priority() pulumi.IntOutput { + return o.ApplyT(func(v *ZoneRecord) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // The FQDN of the record @@ -331,9 +332,9 @@ func (o ZoneRecordOutput) QualifiedName() pulumi.StringOutput { return o.ApplyT(func(v *ZoneRecord) pulumi.StringOutput { return v.QualifiedName }).(pulumi.StringOutput) } -// The TTL of the record -func (o ZoneRecordOutput) Ttl() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ZoneRecord) pulumi.StringPtrOutput { return v.Ttl }).(pulumi.StringPtrOutput) +// The TTL of the record - defaults to 3600 +func (o ZoneRecordOutput) Ttl() pulumi.IntOutput { + return o.ApplyT(func(v *ZoneRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // The type of the record diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/Config.java b/sdk/java/src/main/java/com/pulumi/dnsimple/Config.java index 92ee985a..d27fdf5e 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/Config.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/Config.java @@ -15,8 +15,8 @@ public final class Config { * The account for API operations. * */ - public String account() { - return Codegen.stringProp("account").config(config).require(); + public Optional account() { + return Codegen.stringProp("account").config(config).get(); } /** * Flag to enable the prefetch of zone records. @@ -36,8 +36,8 @@ public Optional sandbox() { * The API v2 token for API operations. * */ - public String token() { - return Codegen.stringProp("token").config(config).require(); + public Optional token() { + return Codegen.stringProp("token").config(config).get(); } /** * Custom string to append to the user agent used for sending HTTP requests to the API. diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/DnsimpleFunctions.java b/sdk/java/src/main/java/com/pulumi/dnsimple/DnsimpleFunctions.java index 69559ca2..694e612e 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/DnsimpleFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/DnsimpleFunctions.java @@ -231,11 +231,10 @@ public static CompletableFuture getCertificatePlain(GetCer * * * `name` - (Required) The name of the zone * - * The following attributes are exported: + * The following additional attributes are exported: * * * `id` - The zone ID * * `account_id` - The account ID - * * `name` - The name of the zone * * `reverse` - True for a reverse zone, false for a forward zone. * */ @@ -284,11 +283,10 @@ public static Output getZone(GetZoneArgs args) { * * * `name` - (Required) The name of the zone * - * The following attributes are exported: + * The following additional attributes are exported: * * * `id` - The zone ID * * `account_id` - The account ID - * * `name` - The name of the zone * * `reverse` - True for a reverse zone, false for a forward zone. * */ @@ -337,11 +335,10 @@ public static CompletableFuture getZonePlain(GetZonePlainArgs arg * * * `name` - (Required) The name of the zone * - * The following attributes are exported: + * The following additional attributes are exported: * * * `id` - The zone ID * * `account_id` - The account ID - * * `name` - The name of the zone * * `reverse` - True for a reverse zone, false for a forward zone. * */ @@ -390,11 +387,10 @@ public static Output getZone(GetZoneArgs args, InvokeOptions opti * * * `name` - (Required) The name of the zone * - * The following attributes are exported: + * The following additional attributes are exported: * * * `id` - The zone ID * * `account_id` - The account ID - * * `name` - The name of the zone * * `reverse` - True for a reverse zone, false for a forward zone. * */ diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/Domain.java b/sdk/java/src/main/java/com/pulumi/dnsimple/Domain.java index 1e1e524d..b10656f1 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/Domain.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/Domain.java @@ -58,13 +58,17 @@ * * DNSimple domains can be imported using their numeric record ID. * + * bash + * * ```sh * $ pulumi import dnsimple:index/domain:Domain resource_name 5678 * ``` * * The record ID can be found within [DNSimple Domains API](https://developer.dnsimple.com/v2/domains/#listDomains). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options. * - * $ curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq + * bash + * + * curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq * * { * @@ -117,21 +121,39 @@ */ @ResourceType(type="dnsimple:index/domain:Domain") public class Domain extends com.pulumi.resources.CustomResource { + /** + * The account ID for the domain. + * + */ @Export(name="accountId", refs={Integer.class}, tree="[0]") private Output accountId; + /** + * @return The account ID for the domain. + * + */ public Output accountId() { return this.accountId; } + /** + * Whether the domain is set to auto-renew. + * + */ @Export(name="autoRenew", refs={Boolean.class}, tree="[0]") private Output autoRenew; + /** + * @return Whether the domain is set to auto-renew. + * + */ public Output autoRenew() { return this.autoRenew; } /** * The domain name to be created * + * # Attributes Reference + * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; @@ -139,31 +161,65 @@ public Output autoRenew() { /** * @return The domain name to be created * + * # Attributes Reference + * */ public Output name() { return this.name; } + /** + * Whether the domain has WhoIs privacy enabled. + * + */ @Export(name="privateWhois", refs={Boolean.class}, tree="[0]") private Output privateWhois; + /** + * @return Whether the domain has WhoIs privacy enabled. + * + */ public Output privateWhois() { return this.privateWhois; } + /** + * The ID of the registrant (contact) for the domain. + * + */ @Export(name="registrantId", refs={Integer.class}, tree="[0]") private Output registrantId; + /** + * @return The ID of the registrant (contact) for the domain. + * + */ public Output registrantId() { return this.registrantId; } + /** + * The state of the domain. + * + */ @Export(name="state", refs={String.class}, tree="[0]") private Output state; + /** + * @return The state of the domain. + * + */ public Output state() { return this.state; } + /** + * The domain name in Unicode format. + * + */ @Export(name="unicodeName", refs={String.class}, tree="[0]") private Output unicodeName; + /** + * @return The domain name in Unicode format. + * + */ public Output unicodeName() { return this.unicodeName; } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/DomainArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/DomainArgs.java index 7937aa7c..4a9f8108 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/DomainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/DomainArgs.java @@ -17,6 +17,8 @@ public final class DomainArgs extends com.pulumi.resources.ResourceArgs { /** * The domain name to be created * + * # Attributes Reference + * */ @Import(name="name", required=true) private Output name; @@ -24,6 +26,8 @@ public final class DomainArgs extends com.pulumi.resources.ResourceArgs { /** * @return The domain name to be created * + * # Attributes Reference + * */ public Output name() { return this.name; @@ -56,6 +60,8 @@ public Builder(DomainArgs defaults) { /** * @param name The domain name to be created * + * # Attributes Reference + * * @return builder * */ @@ -67,6 +73,8 @@ public Builder name(Output name) { /** * @param name The domain name to be created * + * # Attributes Reference + * * @return builder * */ diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForward.java b/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForward.java index b46330b5..bfa9deaa 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForward.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForward.java @@ -43,9 +43,9 @@ * public static void stack(Context ctx) { * // Add an email forwarding rule to the domain * var foobar = new EmailForward("foobar", EmailForwardArgs.builder() - * .domain(dnsimpleDomain) + * .domain(dnsimpleDomain.name()) * .aliasName("sales") - * .destinationEmail("jane.doe{@literal @}example.com") + * .destinationEmail("alice.appleseed{@literal @}example.com") * .build()); * * } @@ -54,18 +54,30 @@ * * <!--End PulumiCodeChooser --> * + * ## Import + * + * DNSimple resources can be imported using the domain name and numeric email forward ID. + * + * **Importing email forward for example.com with email forward ID 1234** + * + * bash + * + * ```sh + * $ pulumi import dnsimple:index/emailForward:EmailForward resource_name example.com_1234 + * ``` + * */ @ResourceType(type="dnsimple:index/emailForward:EmailForward") public class EmailForward extends com.pulumi.resources.CustomResource { /** - * The source email address on the domain + * The source email address on the domain, in full form. This is a computed attribute. * */ @Export(name="aliasEmail", refs={String.class}, tree="[0]") private Output aliasEmail; /** - * @return The source email address on the domain + * @return The source email address on the domain, in full form. This is a computed attribute. * */ public Output aliasEmail() { @@ -86,28 +98,28 @@ public Output aliasName() { return this.aliasName; } /** - * The destination email address on another domain + * The destination email address * */ @Export(name="destinationEmail", refs={String.class}, tree="[0]") private Output destinationEmail; /** - * @return The destination email address on another domain + * @return The destination email address * */ public Output destinationEmail() { return this.destinationEmail; } /** - * The domain to add the email forwarding rule to + * The domain name to add the email forwarding rule to * */ @Export(name="domain", refs={String.class}, tree="[0]") private Output domain; /** - * @return The domain to add the email forwarding rule to + * @return The domain name to add the email forwarding rule to * */ public Output domain() { diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForwardArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForwardArgs.java index f1706461..eef726b2 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForwardArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/EmailForwardArgs.java @@ -30,14 +30,14 @@ public Output aliasName() { } /** - * The destination email address on another domain + * The destination email address * */ @Import(name="destinationEmail", required=true) private Output destinationEmail; /** - * @return The destination email address on another domain + * @return The destination email address * */ public Output destinationEmail() { @@ -45,14 +45,14 @@ public Output destinationEmail() { } /** - * The domain to add the email forwarding rule to + * The domain name to add the email forwarding rule to * */ @Import(name="domain", required=true) private Output domain; /** - * @return The domain to add the email forwarding rule to + * @return The domain name to add the email forwarding rule to * */ public Output domain() { @@ -107,7 +107,7 @@ public Builder aliasName(String aliasName) { } /** - * @param destinationEmail The destination email address on another domain + * @param destinationEmail The destination email address * * @return builder * @@ -118,7 +118,7 @@ public Builder destinationEmail(Output destinationEmail) { } /** - * @param destinationEmail The destination email address on another domain + * @param destinationEmail The destination email address * * @return builder * @@ -128,7 +128,7 @@ public Builder destinationEmail(String destinationEmail) { } /** - * @param domain The domain to add the email forwarding rule to + * @param domain The domain name to add the email forwarding rule to * * @return builder * @@ -139,7 +139,7 @@ public Builder domain(Output domain) { } /** - * @param domain The domain to add the email forwarding rule to + * @param domain The domain name to add the email forwarding rule to * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificate.java b/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificate.java index 5325d336..3efb6873 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificate.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificate.java @@ -74,40 +74,30 @@ public Output authorityIdentifier() { return this.authorityIdentifier; } /** - * Set to true if the certificate will auto-renew + * True if the certificate should auto-renew * */ @Export(name="autoRenew", refs={Boolean.class}, tree="[0]") private Output autoRenew; /** - * @return Set to true if the certificate will auto-renew + * @return True if the certificate should auto-renew * */ public Output autoRenew() { return this.autoRenew; } /** - * The contact id for the certificate - * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * The datetime the certificate was created * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - @Export(name="contactId", refs={Integer.class}, tree="[0]") - private Output contactId; + @Export(name="createdAt", refs={String.class}, tree="[0]") + private Output createdAt; /** - * @return The contact id for the certificate + * @return The datetime the certificate was created * */ - public Output> contactId() { - return Codegen.optional(this.contactId); - } - @Export(name="createdAt", refs={String.class}, tree="[0]") - private Output createdAt; - public Output createdAt() { return this.createdAt; } @@ -130,20 +120,28 @@ public Output csr() { * */ @Export(name="domainId", refs={String.class}, tree="[0]") - private Output domainId; + private Output domainId; /** * @return The domain to be issued the certificate for * */ - public Output> domainId() { - return Codegen.optional(this.domainId); + public Output domainId() { + return this.domainId; } - @Export(name="expiresOn", refs={String.class}, tree="[0]") - private Output expiresOn; + /** + * The datetime the certificate will expire + * + */ + @Export(name="expiresAt", refs={String.class}, tree="[0]") + private Output expiresAt; - public Output expiresOn() { - return this.expiresOn; + /** + * @return The datetime the certificate will expire + * + */ + public Output expiresAt() { + return this.expiresAt; } /** * The certificate name @@ -159,6 +157,20 @@ public Output expiresOn() { public Output name() { return this.name; } + /** + * The signature algorithm to use for the certificate + * + */ + @Export(name="signatureAlgorithm", refs={String.class}, tree="[0]") + private Output signatureAlgorithm; + + /** + * @return The signature algorithm to use for the certificate + * + */ + public Output> signatureAlgorithm() { + return Codegen.optional(this.signatureAlgorithm); + } /** * The state of the certificate * @@ -173,9 +185,17 @@ public Output name() { public Output state() { return this.state; } + /** + * The datetime the certificate was last updated + * + */ @Export(name="updatedAt", refs={String.class}, tree="[0]") private Output updatedAt; + /** + * @return The datetime the certificate was last updated + * + */ public Output updatedAt() { return this.updatedAt; } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificateArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificateArgs.java index 41c04d0f..4e0aca1c 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificateArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/LetsEncryptCertificateArgs.java @@ -7,7 +7,6 @@ import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; -import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.Optional; @@ -19,14 +18,14 @@ public final class LetsEncryptCertificateArgs extends com.pulumi.resources.Resou public static final LetsEncryptCertificateArgs Empty = new LetsEncryptCertificateArgs(); /** - * Set to true if the certificate will auto-renew + * True if the certificate should auto-renew * */ @Import(name="autoRenew", required=true) private Output autoRenew; /** - * @return Set to true if the certificate will auto-renew + * @return True if the certificate should auto-renew * */ public Output autoRenew() { @@ -34,65 +33,57 @@ public Output autoRenew() { } /** - * The contact id for the certificate - * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * The domain to be issued the certificate for * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - @Import(name="contactId") - private @Nullable Output contactId; + @Import(name="domainId", required=true) + private Output domainId; /** - * @return The contact id for the certificate - * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * @return The domain to be issued the certificate for * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - public Optional> contactId() { - return Optional.ofNullable(this.contactId); + public Output domainId() { + return this.domainId; } /** - * The domain to be issued the certificate for + * The certificate name * */ - @Import(name="domainId") - private @Nullable Output domainId; + @Import(name="name", required=true) + private Output name; /** - * @return The domain to be issued the certificate for + * @return The certificate name * */ - public Optional> domainId() { - return Optional.ofNullable(this.domainId); + public Output name() { + return this.name; } /** - * The certificate name + * The signature algorithm to use for the certificate * */ - @Import(name="name", required=true) - private Output name; + @Import(name="signatureAlgorithm") + private @Nullable Output signatureAlgorithm; /** - * @return The certificate name + * @return The signature algorithm to use for the certificate * */ - public Output name() { - return this.name; + public Optional> signatureAlgorithm() { + return Optional.ofNullable(this.signatureAlgorithm); } private LetsEncryptCertificateArgs() {} private LetsEncryptCertificateArgs(LetsEncryptCertificateArgs $) { this.autoRenew = $.autoRenew; - this.contactId = $.contactId; this.domainId = $.domainId; this.name = $.name; + this.signatureAlgorithm = $.signatureAlgorithm; } public static Builder builder() { @@ -114,7 +105,7 @@ public Builder(LetsEncryptCertificateArgs defaults) { } /** - * @param autoRenew Set to true if the certificate will auto-renew + * @param autoRenew True if the certificate should auto-renew * * @return builder * @@ -125,7 +116,7 @@ public Builder autoRenew(Output autoRenew) { } /** - * @param autoRenew Set to true if the certificate will auto-renew + * @param autoRenew True if the certificate should auto-renew * * @return builder * @@ -135,80 +126,75 @@ public Builder autoRenew(Boolean autoRenew) { } /** - * @param contactId The contact id for the certificate + * @param domainId The domain to be issued the certificate for * * @return builder * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - public Builder contactId(@Nullable Output contactId) { - $.contactId = contactId; + public Builder domainId(Output domainId) { + $.domainId = domainId; return this; } /** - * @param contactId The contact id for the certificate + * @param domainId The domain to be issued the certificate for * * @return builder * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - public Builder contactId(Integer contactId) { - return contactId(Output.of(contactId)); + public Builder domainId(String domainId) { + return domainId(Output.of(domainId)); } /** - * @param domainId The domain to be issued the certificate for + * @param name The certificate name * * @return builder * */ - public Builder domainId(@Nullable Output domainId) { - $.domainId = domainId; + public Builder name(Output name) { + $.name = name; return this; } /** - * @param domainId The domain to be issued the certificate for + * @param name The certificate name * * @return builder * */ - public Builder domainId(String domainId) { - return domainId(Output.of(domainId)); + public Builder name(String name) { + return name(Output.of(name)); } /** - * @param name The certificate name + * @param signatureAlgorithm The signature algorithm to use for the certificate * * @return builder * */ - public Builder name(Output name) { - $.name = name; + public Builder signatureAlgorithm(@Nullable Output signatureAlgorithm) { + $.signatureAlgorithm = signatureAlgorithm; return this; } /** - * @param name The certificate name + * @param signatureAlgorithm The signature algorithm to use for the certificate * * @return builder * */ - public Builder name(String name) { - return name(Output.of(name)); + public Builder signatureAlgorithm(String signatureAlgorithm) { + return signatureAlgorithm(Output.of(signatureAlgorithm)); } public LetsEncryptCertificateArgs build() { if ($.autoRenew == null) { throw new MissingRequiredPropertyException("LetsEncryptCertificateArgs", "autoRenew"); } + if ($.domainId == null) { + throw new MissingRequiredPropertyException("LetsEncryptCertificateArgs", "domainId"); + } if ($.name == null) { throw new MissingRequiredPropertyException("LetsEncryptCertificateArgs", "name"); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/Provider.java b/sdk/java/src/main/java/com/pulumi/dnsimple/Provider.java index 0e7677d9..abb9a99a 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/Provider.java @@ -28,28 +28,28 @@ public class Provider extends com.pulumi.resources.ProviderResource { * */ @Export(name="account", refs={String.class}, tree="[0]") - private Output account; + private Output account; /** * @return The account for API operations. * */ - public Output account() { - return this.account; + public Output> account() { + return Codegen.optional(this.account); } /** * The API v2 token for API operations. * */ @Export(name="token", refs={String.class}, tree="[0]") - private Output token; + private Output token; /** * @return The API v2 token for API operations. * */ - public Output token() { - return this.token; + public Output> token() { + return Codegen.optional(this.token); } /** * Custom string to append to the user agent used for sending HTTP requests to the API. @@ -78,7 +78,7 @@ public Provider(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Provider(String name, ProviderArgs args) { + public Provider(String name, @Nullable ProviderArgs args) { this(name, args, null); } /** @@ -87,7 +87,7 @@ public Provider(String name, ProviderArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Provider(String name, ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("dnsimple", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/ProviderArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/ProviderArgs.java index cbf848e4..639c7acd 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/ProviderArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/ProviderArgs.java @@ -5,7 +5,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; -import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; import java.lang.String; import java.util.Objects; @@ -21,15 +20,15 @@ public final class ProviderArgs extends com.pulumi.resources.ResourceArgs { * The account for API operations. * */ - @Import(name="account", required=true) - private Output account; + @Import(name="account") + private @Nullable Output account; /** * @return The account for API operations. * */ - public Output account() { - return this.account; + public Optional> account() { + return Optional.ofNullable(this.account); } /** @@ -66,15 +65,15 @@ public Optional> sandbox() { * The API v2 token for API operations. * */ - @Import(name="token", required=true) - private Output token; + @Import(name="token") + private @Nullable Output token; /** * @return The API v2 token for API operations. * */ - public Output token() { - return this.token; + public Optional> token() { + return Optional.ofNullable(this.token); } /** @@ -126,7 +125,7 @@ public Builder(ProviderArgs defaults) { * @return builder * */ - public Builder account(Output account) { + public Builder account(@Nullable Output account) { $.account = account; return this; } @@ -189,7 +188,7 @@ public Builder sandbox(Boolean sandbox) { * @return builder * */ - public Builder token(Output token) { + public Builder token(@Nullable Output token) { $.token = token; return this; } @@ -226,12 +225,6 @@ public Builder userAgent(String userAgent) { } public ProviderArgs build() { - if ($.account == null) { - throw new MissingRequiredPropertyException("ProviderArgs", "account"); - } - if ($.token == null) { - throw new MissingRequiredPropertyException("ProviderArgs", "token"); - } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/Record.java b/sdk/java/src/main/java/com/pulumi/dnsimple/Record.java deleted file mode 100644 index 14f9693d..00000000 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/Record.java +++ /dev/null @@ -1,124 +0,0 @@ -// *** WARNING: this file was generated by pulumi-java-gen. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -package com.pulumi.dnsimple; - -import com.pulumi.core.Output; -import com.pulumi.core.annotations.Export; -import com.pulumi.core.annotations.ResourceType; -import com.pulumi.core.internal.Codegen; -import com.pulumi.dnsimple.RecordArgs; -import com.pulumi.dnsimple.Utilities; -import com.pulumi.dnsimple.inputs.RecordState; -import java.lang.String; -import java.util.Optional; -import javax.annotation.Nullable; - -/** - * @deprecated - * This resource is deprecated. - * It will be removed in the next major version. - * - */ -@Deprecated /* This resource is deprecated. -It will be removed in the next major version. */ -@ResourceType(type="dnsimple:index/record:Record") -public class Record extends com.pulumi.resources.CustomResource { - @Export(name="domain", refs={String.class}, tree="[0]") - private Output domain; - - public Output domain() { - return this.domain; - } - @Export(name="domainId", refs={String.class}, tree="[0]") - private Output domainId; - - public Output domainId() { - return this.domainId; - } - @Export(name="hostname", refs={String.class}, tree="[0]") - private Output hostname; - - public Output hostname() { - return this.hostname; - } - @Export(name="name", refs={String.class}, tree="[0]") - private Output name; - - public Output name() { - return this.name; - } - @Export(name="priority", refs={String.class}, tree="[0]") - private Output priority; - - public Output priority() { - return this.priority; - } - @Export(name="ttl", refs={String.class}, tree="[0]") - private Output ttl; - - public Output> ttl() { - return Codegen.optional(this.ttl); - } - @Export(name="type", refs={String.class}, tree="[0]") - private Output type; - - public Output type() { - return this.type; - } - @Export(name="value", refs={String.class}, tree="[0]") - private Output value; - - public Output value() { - return this.value; - } - - /** - * - * @param name The _unique_ name of the resulting resource. - */ - public Record(String name) { - this(name, RecordArgs.Empty); - } - /** - * - * @param name The _unique_ name of the resulting resource. - * @param args The arguments to use to populate this resource's properties. - */ - public Record(String name, RecordArgs args) { - this(name, args, null); - } - /** - * - * @param name The _unique_ name of the resulting resource. - * @param args The arguments to use to populate this resource's properties. - * @param options A bag of options that control this resource's behavior. - */ - public Record(String name, RecordArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dnsimple:index/record:Record", name, args == null ? RecordArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); - } - - private Record(String name, Output id, @Nullable RecordState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dnsimple:index/record:Record", name, state, makeResourceOptions(options, id)); - } - - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { - var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() - .version(Utilities.getVersion()) - .build(); - return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); - } - - /** - * Get an existing Host resource's state with the given name, ID, and optional extra - * properties used to qualify the lookup. - * - * @param name The _unique_ name of the resulting resource. - * @param id The _unique_ provider ID of the resource to lookup. - * @param state - * @param options Optional settings to control the behavior of the CustomResource. - */ - public static Record get(String name, Output id, @Nullable RecordState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - return new Record(name, id, state, options); - } -} diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/RecordArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/RecordArgs.java deleted file mode 100644 index 5d1b9c45..00000000 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/RecordArgs.java +++ /dev/null @@ -1,161 +0,0 @@ -// *** WARNING: this file was generated by pulumi-java-gen. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -package com.pulumi.dnsimple; - -import com.pulumi.core.Output; -import com.pulumi.core.annotations.Import; -import com.pulumi.exceptions.MissingRequiredPropertyException; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; -import javax.annotation.Nullable; - - -public final class RecordArgs extends com.pulumi.resources.ResourceArgs { - - public static final RecordArgs Empty = new RecordArgs(); - - @Import(name="domain", required=true) - private Output domain; - - public Output domain() { - return this.domain; - } - - @Import(name="name", required=true) - private Output name; - - public Output name() { - return this.name; - } - - @Import(name="priority") - private @Nullable Output priority; - - public Optional> priority() { - return Optional.ofNullable(this.priority); - } - - @Import(name="ttl") - private @Nullable Output ttl; - - public Optional> ttl() { - return Optional.ofNullable(this.ttl); - } - - @Import(name="type", required=true) - private Output type; - - public Output type() { - return this.type; - } - - @Import(name="value", required=true) - private Output value; - - public Output value() { - return this.value; - } - - private RecordArgs() {} - - private RecordArgs(RecordArgs $) { - this.domain = $.domain; - this.name = $.name; - this.priority = $.priority; - this.ttl = $.ttl; - this.type = $.type; - this.value = $.value; - } - - public static Builder builder() { - return new Builder(); - } - public static Builder builder(RecordArgs defaults) { - return new Builder(defaults); - } - - public static final class Builder { - private RecordArgs $; - - public Builder() { - $ = new RecordArgs(); - } - - public Builder(RecordArgs defaults) { - $ = new RecordArgs(Objects.requireNonNull(defaults)); - } - - public Builder domain(Output domain) { - $.domain = domain; - return this; - } - - public Builder domain(String domain) { - return domain(Output.of(domain)); - } - - public Builder name(Output name) { - $.name = name; - return this; - } - - public Builder name(String name) { - return name(Output.of(name)); - } - - public Builder priority(@Nullable Output priority) { - $.priority = priority; - return this; - } - - public Builder priority(String priority) { - return priority(Output.of(priority)); - } - - public Builder ttl(@Nullable Output ttl) { - $.ttl = ttl; - return this; - } - - public Builder ttl(String ttl) { - return ttl(Output.of(ttl)); - } - - public Builder type(Output type) { - $.type = type; - return this; - } - - public Builder type(String type) { - return type(Output.of(type)); - } - - public Builder value(Output value) { - $.value = value; - return this; - } - - public Builder value(String value) { - return value(Output.of(value)); - } - - public RecordArgs build() { - if ($.domain == null) { - throw new MissingRequiredPropertyException("RecordArgs", "domain"); - } - if ($.name == null) { - throw new MissingRequiredPropertyException("RecordArgs", "name"); - } - if ($.type == null) { - throw new MissingRequiredPropertyException("RecordArgs", "type"); - } - if ($.value == null) { - throw new MissingRequiredPropertyException("RecordArgs", "value"); - } - return $; - } - } - -} diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecord.java b/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecord.java index a8af3db5..1a2a0869 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecord.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecord.java @@ -10,18 +10,13 @@ import com.pulumi.dnsimple.Utilities; import com.pulumi.dnsimple.ZoneRecordArgs; import com.pulumi.dnsimple.inputs.ZoneRecordState; +import java.lang.Integer; import java.lang.String; -import java.util.Optional; import javax.annotation.Nullable; /** * Provides a DNSimple zone record resource. * - * ## Deprecation warning - * - * You can still use the _deprecated_ `dnsimple.Record` configuration, but be aware that it will be removed in the - * upcoming 1.0.0 release. - * * ## Example Usage * * <!--Start PulumiCodeChooser --> @@ -104,16 +99,22 @@ * * DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID. * - * __Importing record example.com with record ID 1234__ + * **Importing record example.com with record ID 1234** + * + * bash * * ```sh * $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 * ``` - * __Importing record www.example.com with record ID 1234__ + * + * **Importing record www.example.com with record ID 1234** + * + * bash * * ```sh * $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 * ``` + * * The record ID can be found in the URL when editing a record on the DNSimple web dashboard. * */ @@ -137,14 +138,14 @@ public Output name() { * The priority of the record - only useful for some record types * */ - @Export(name="priority", refs={String.class}, tree="[0]") - private Output priority; + @Export(name="priority", refs={Integer.class}, tree="[0]") + private Output priority; /** * @return The priority of the record - only useful for some record types * */ - public Output priority() { + public Output priority() { return this.priority; } /** @@ -162,18 +163,18 @@ public Output qualifiedName() { return this.qualifiedName; } /** - * The TTL of the record + * The TTL of the record - defaults to 3600 * */ - @Export(name="ttl", refs={String.class}, tree="[0]") - private Output ttl; + @Export(name="ttl", refs={Integer.class}, tree="[0]") + private Output ttl; /** - * @return The TTL of the record + * @return The TTL of the record - defaults to 3600 * */ - public Output> ttl() { - return Codegen.optional(this.ttl); + public Output ttl() { + return this.ttl; } /** * The type of the record diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecordArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecordArgs.java index 147ba508..b56eada5 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecordArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/ZoneRecordArgs.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.Optional; @@ -36,28 +37,28 @@ public Output name() { * */ @Import(name="priority") - private @Nullable Output priority; + private @Nullable Output priority; /** * @return The priority of the record - only useful for some record types * */ - public Optional> priority() { + public Optional> priority() { return Optional.ofNullable(this.priority); } /** - * The TTL of the record + * The TTL of the record - defaults to 3600 * */ @Import(name="ttl") - private @Nullable Output ttl; + private @Nullable Output ttl; /** - * @return The TTL of the record + * @return The TTL of the record - defaults to 3600 * */ - public Optional> ttl() { + public Optional> ttl() { return Optional.ofNullable(this.ttl); } @@ -162,7 +163,7 @@ public Builder name(String name) { * @return builder * */ - public Builder priority(@Nullable Output priority) { + public Builder priority(@Nullable Output priority) { $.priority = priority; return this; } @@ -173,28 +174,28 @@ public Builder priority(@Nullable Output priority) { * @return builder * */ - public Builder priority(String priority) { + public Builder priority(Integer priority) { return priority(Output.of(priority)); } /** - * @param ttl The TTL of the record + * @param ttl The TTL of the record - defaults to 3600 * * @return builder * */ - public Builder ttl(@Nullable Output ttl) { + public Builder ttl(@Nullable Output ttl) { $.ttl = ttl; return this; } /** - * @param ttl The TTL of the record + * @param ttl The TTL of the record - defaults to 3600 * * @return builder * */ - public Builder ttl(String ttl) { + public Builder ttl(Integer ttl) { return ttl(Output.of(ttl)); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/DomainState.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/DomainState.java index 78ea18db..d005ba4f 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/DomainState.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/DomainState.java @@ -17,16 +17,32 @@ public final class DomainState extends com.pulumi.resources.ResourceArgs { public static final DomainState Empty = new DomainState(); + /** + * The account ID for the domain. + * + */ @Import(name="accountId") private @Nullable Output accountId; + /** + * @return The account ID for the domain. + * + */ public Optional> accountId() { return Optional.ofNullable(this.accountId); } + /** + * Whether the domain is set to auto-renew. + * + */ @Import(name="autoRenew") private @Nullable Output autoRenew; + /** + * @return Whether the domain is set to auto-renew. + * + */ public Optional> autoRenew() { return Optional.ofNullable(this.autoRenew); } @@ -34,6 +50,8 @@ public Optional> autoRenew() { /** * The domain name to be created * + * # Attributes Reference + * */ @Import(name="name") private @Nullable Output name; @@ -41,35 +59,69 @@ public Optional> autoRenew() { /** * @return The domain name to be created * + * # Attributes Reference + * */ public Optional> name() { return Optional.ofNullable(this.name); } + /** + * Whether the domain has WhoIs privacy enabled. + * + */ @Import(name="privateWhois") private @Nullable Output privateWhois; + /** + * @return Whether the domain has WhoIs privacy enabled. + * + */ public Optional> privateWhois() { return Optional.ofNullable(this.privateWhois); } + /** + * The ID of the registrant (contact) for the domain. + * + */ @Import(name="registrantId") private @Nullable Output registrantId; + /** + * @return The ID of the registrant (contact) for the domain. + * + */ public Optional> registrantId() { return Optional.ofNullable(this.registrantId); } + /** + * The state of the domain. + * + */ @Import(name="state") private @Nullable Output state; + /** + * @return The state of the domain. + * + */ public Optional> state() { return Optional.ofNullable(this.state); } + /** + * The domain name in Unicode format. + * + */ @Import(name="unicodeName") private @Nullable Output unicodeName; + /** + * @return The domain name in Unicode format. + * + */ public Optional> unicodeName() { return Optional.ofNullable(this.unicodeName); } @@ -104,20 +156,44 @@ public Builder(DomainState defaults) { $ = new DomainState(Objects.requireNonNull(defaults)); } + /** + * @param accountId The account ID for the domain. + * + * @return builder + * + */ public Builder accountId(@Nullable Output accountId) { $.accountId = accountId; return this; } + /** + * @param accountId The account ID for the domain. + * + * @return builder + * + */ public Builder accountId(Integer accountId) { return accountId(Output.of(accountId)); } + /** + * @param autoRenew Whether the domain is set to auto-renew. + * + * @return builder + * + */ public Builder autoRenew(@Nullable Output autoRenew) { $.autoRenew = autoRenew; return this; } + /** + * @param autoRenew Whether the domain is set to auto-renew. + * + * @return builder + * + */ public Builder autoRenew(Boolean autoRenew) { return autoRenew(Output.of(autoRenew)); } @@ -125,6 +201,8 @@ public Builder autoRenew(Boolean autoRenew) { /** * @param name The domain name to be created * + * # Attributes Reference + * * @return builder * */ @@ -136,6 +214,8 @@ public Builder name(@Nullable Output name) { /** * @param name The domain name to be created * + * # Attributes Reference + * * @return builder * */ @@ -143,38 +223,86 @@ public Builder name(String name) { return name(Output.of(name)); } + /** + * @param privateWhois Whether the domain has WhoIs privacy enabled. + * + * @return builder + * + */ public Builder privateWhois(@Nullable Output privateWhois) { $.privateWhois = privateWhois; return this; } + /** + * @param privateWhois Whether the domain has WhoIs privacy enabled. + * + * @return builder + * + */ public Builder privateWhois(Boolean privateWhois) { return privateWhois(Output.of(privateWhois)); } + /** + * @param registrantId The ID of the registrant (contact) for the domain. + * + * @return builder + * + */ public Builder registrantId(@Nullable Output registrantId) { $.registrantId = registrantId; return this; } + /** + * @param registrantId The ID of the registrant (contact) for the domain. + * + * @return builder + * + */ public Builder registrantId(Integer registrantId) { return registrantId(Output.of(registrantId)); } + /** + * @param state The state of the domain. + * + * @return builder + * + */ public Builder state(@Nullable Output state) { $.state = state; return this; } + /** + * @param state The state of the domain. + * + * @return builder + * + */ public Builder state(String state) { return state(Output.of(state)); } + /** + * @param unicodeName The domain name in Unicode format. + * + * @return builder + * + */ public Builder unicodeName(@Nullable Output unicodeName) { $.unicodeName = unicodeName; return this; } + /** + * @param unicodeName The domain name in Unicode format. + * + * @return builder + * + */ public Builder unicodeName(String unicodeName) { return unicodeName(Output.of(unicodeName)); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/EmailForwardState.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/EmailForwardState.java index dcabc4dc..d962fb2c 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/EmailForwardState.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/EmailForwardState.java @@ -16,14 +16,14 @@ public final class EmailForwardState extends com.pulumi.resources.ResourceArgs { public static final EmailForwardState Empty = new EmailForwardState(); /** - * The source email address on the domain + * The source email address on the domain, in full form. This is a computed attribute. * */ @Import(name="aliasEmail") private @Nullable Output aliasEmail; /** - * @return The source email address on the domain + * @return The source email address on the domain, in full form. This is a computed attribute. * */ public Optional> aliasEmail() { @@ -46,14 +46,14 @@ public Optional> aliasName() { } /** - * The destination email address on another domain + * The destination email address * */ @Import(name="destinationEmail") private @Nullable Output destinationEmail; /** - * @return The destination email address on another domain + * @return The destination email address * */ public Optional> destinationEmail() { @@ -61,14 +61,14 @@ public Optional> destinationEmail() { } /** - * The domain to add the email forwarding rule to + * The domain name to add the email forwarding rule to * */ @Import(name="domain") private @Nullable Output domain; /** - * @return The domain to add the email forwarding rule to + * @return The domain name to add the email forwarding rule to * */ public Optional> domain() { @@ -103,7 +103,7 @@ public Builder(EmailForwardState defaults) { } /** - * @param aliasEmail The source email address on the domain + * @param aliasEmail The source email address on the domain, in full form. This is a computed attribute. * * @return builder * @@ -114,7 +114,7 @@ public Builder aliasEmail(@Nullable Output aliasEmail) { } /** - * @param aliasEmail The source email address on the domain + * @param aliasEmail The source email address on the domain, in full form. This is a computed attribute. * * @return builder * @@ -145,7 +145,7 @@ public Builder aliasName(String aliasName) { } /** - * @param destinationEmail The destination email address on another domain + * @param destinationEmail The destination email address * * @return builder * @@ -156,7 +156,7 @@ public Builder destinationEmail(@Nullable Output destinationEmail) { } /** - * @param destinationEmail The destination email address on another domain + * @param destinationEmail The destination email address * * @return builder * @@ -166,7 +166,7 @@ public Builder destinationEmail(String destinationEmail) { } /** - * @param domain The domain to add the email forwarding rule to + * @param domain The domain name to add the email forwarding rule to * * @return builder * @@ -177,7 +177,7 @@ public Builder domain(@Nullable Output domain) { } /** - * @param domain The domain to add the email forwarding rule to + * @param domain The domain name to add the email forwarding rule to * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificateArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificateArgs.java index 60eb6aef..1f4bfa8e 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificateArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificateArgs.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Integer; import java.lang.String; import java.util.Objects; @@ -19,13 +20,13 @@ public final class GetCertificateArgs extends com.pulumi.resources.InvokeArgs { * */ @Import(name="certificateId", required=true) - private Output certificateId; + private Output certificateId; /** * @return The ID of the SSL Certificate * */ - public Output certificateId() { + public Output certificateId() { return this.certificateId; } @@ -75,7 +76,7 @@ public Builder(GetCertificateArgs defaults) { * @return builder * */ - public Builder certificateId(Output certificateId) { + public Builder certificateId(Output certificateId) { $.certificateId = certificateId; return this; } @@ -86,7 +87,7 @@ public Builder certificateId(Output certificateId) { * @return builder * */ - public Builder certificateId(String certificateId) { + public Builder certificateId(Integer certificateId) { return certificateId(Output.of(certificateId)); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificatePlainArgs.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificatePlainArgs.java index c3a29d8a..4c286d24 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificatePlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/GetCertificatePlainArgs.java @@ -5,6 +5,7 @@ import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Integer; import java.lang.String; import java.util.Objects; @@ -18,13 +19,13 @@ public final class GetCertificatePlainArgs extends com.pulumi.resources.InvokeAr * */ @Import(name="certificateId", required=true) - private String certificateId; + private Integer certificateId; /** * @return The ID of the SSL Certificate * */ - public String certificateId() { + public Integer certificateId() { return this.certificateId; } @@ -74,7 +75,7 @@ public Builder(GetCertificatePlainArgs defaults) { * @return builder * */ - public Builder certificateId(String certificateId) { + public Builder certificateId(Integer certificateId) { $.certificateId = certificateId; return this; } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/LetsEncryptCertificateState.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/LetsEncryptCertificateState.java index 4b8e203b..fc19e6ab 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/LetsEncryptCertificateState.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/LetsEncryptCertificateState.java @@ -33,14 +33,14 @@ public Optional> authorityIdentifier() { } /** - * Set to true if the certificate will auto-renew + * True if the certificate should auto-renew * */ @Import(name="autoRenew") private @Nullable Output autoRenew; /** - * @return Set to true if the certificate will auto-renew + * @return True if the certificate should auto-renew * */ public Optional> autoRenew() { @@ -48,31 +48,16 @@ public Optional> autoRenew() { } /** - * The contact id for the certificate - * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * The datetime the certificate was created * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - @Import(name="contactId") - private @Nullable Output contactId; + @Import(name="createdAt") + private @Nullable Output createdAt; /** - * @return The contact id for the certificate - * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * @return The datetime the certificate was created * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - public Optional> contactId() { - return Optional.ofNullable(this.contactId); - } - - @Import(name="createdAt") - private @Nullable Output createdAt; - public Optional> createdAt() { return Optional.ofNullable(this.createdAt); } @@ -107,11 +92,19 @@ public Optional> domainId() { return Optional.ofNullable(this.domainId); } - @Import(name="expiresOn") - private @Nullable Output expiresOn; + /** + * The datetime the certificate will expire + * + */ + @Import(name="expiresAt") + private @Nullable Output expiresAt; - public Optional> expiresOn() { - return Optional.ofNullable(this.expiresOn); + /** + * @return The datetime the certificate will expire + * + */ + public Optional> expiresAt() { + return Optional.ofNullable(this.expiresAt); } /** @@ -129,6 +122,21 @@ public Optional> name() { return Optional.ofNullable(this.name); } + /** + * The signature algorithm to use for the certificate + * + */ + @Import(name="signatureAlgorithm") + private @Nullable Output signatureAlgorithm; + + /** + * @return The signature algorithm to use for the certificate + * + */ + public Optional> signatureAlgorithm() { + return Optional.ofNullable(this.signatureAlgorithm); + } + /** * The state of the certificate * @@ -144,9 +152,17 @@ public Optional> state() { return Optional.ofNullable(this.state); } + /** + * The datetime the certificate was last updated + * + */ @Import(name="updatedAt") private @Nullable Output updatedAt; + /** + * @return The datetime the certificate was last updated + * + */ public Optional> updatedAt() { return Optional.ofNullable(this.updatedAt); } @@ -171,12 +187,12 @@ private LetsEncryptCertificateState() {} private LetsEncryptCertificateState(LetsEncryptCertificateState $) { this.authorityIdentifier = $.authorityIdentifier; this.autoRenew = $.autoRenew; - this.contactId = $.contactId; this.createdAt = $.createdAt; this.csr = $.csr; this.domainId = $.domainId; - this.expiresOn = $.expiresOn; + this.expiresAt = $.expiresAt; this.name = $.name; + this.signatureAlgorithm = $.signatureAlgorithm; this.state = $.state; this.updatedAt = $.updatedAt; this.years = $.years; @@ -222,7 +238,7 @@ public Builder authorityIdentifier(String authorityIdentifier) { } /** - * @param autoRenew Set to true if the certificate will auto-renew + * @param autoRenew True if the certificate should auto-renew * * @return builder * @@ -233,7 +249,7 @@ public Builder autoRenew(@Nullable Output autoRenew) { } /** - * @param autoRenew Set to true if the certificate will auto-renew + * @param autoRenew True if the certificate should auto-renew * * @return builder * @@ -243,39 +259,22 @@ public Builder autoRenew(Boolean autoRenew) { } /** - * @param contactId The contact id for the certificate + * @param createdAt The datetime the certificate was created * * @return builder * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - public Builder contactId(@Nullable Output contactId) { - $.contactId = contactId; + public Builder createdAt(@Nullable Output createdAt) { + $.createdAt = createdAt; return this; } /** - * @param contactId The contact id for the certificate + * @param createdAt The datetime the certificate was created * * @return builder * - * @deprecated - * contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - * */ - @Deprecated /* contact_id is deprecated and has no effect. The attribute will be removed in the next major version. */ - public Builder contactId(Integer contactId) { - return contactId(Output.of(contactId)); - } - - public Builder createdAt(@Nullable Output createdAt) { - $.createdAt = createdAt; - return this; - } - public Builder createdAt(String createdAt) { return createdAt(Output.of(createdAt)); } @@ -322,13 +321,25 @@ public Builder domainId(String domainId) { return domainId(Output.of(domainId)); } - public Builder expiresOn(@Nullable Output expiresOn) { - $.expiresOn = expiresOn; + /** + * @param expiresAt The datetime the certificate will expire + * + * @return builder + * + */ + public Builder expiresAt(@Nullable Output expiresAt) { + $.expiresAt = expiresAt; return this; } - public Builder expiresOn(String expiresOn) { - return expiresOn(Output.of(expiresOn)); + /** + * @param expiresAt The datetime the certificate will expire + * + * @return builder + * + */ + public Builder expiresAt(String expiresAt) { + return expiresAt(Output.of(expiresAt)); } /** @@ -352,6 +363,27 @@ public Builder name(String name) { return name(Output.of(name)); } + /** + * @param signatureAlgorithm The signature algorithm to use for the certificate + * + * @return builder + * + */ + public Builder signatureAlgorithm(@Nullable Output signatureAlgorithm) { + $.signatureAlgorithm = signatureAlgorithm; + return this; + } + + /** + * @param signatureAlgorithm The signature algorithm to use for the certificate + * + * @return builder + * + */ + public Builder signatureAlgorithm(String signatureAlgorithm) { + return signatureAlgorithm(Output.of(signatureAlgorithm)); + } + /** * @param state The state of the certificate * @@ -373,11 +405,23 @@ public Builder state(String state) { return state(Output.of(state)); } + /** + * @param updatedAt The datetime the certificate was last updated + * + * @return builder + * + */ public Builder updatedAt(@Nullable Output updatedAt) { $.updatedAt = updatedAt; return this; } + /** + * @param updatedAt The datetime the certificate was last updated + * + * @return builder + * + */ public Builder updatedAt(String updatedAt) { return updatedAt(Output.of(updatedAt)); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/RecordState.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/RecordState.java deleted file mode 100644 index 411f3e07..00000000 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/RecordState.java +++ /dev/null @@ -1,182 +0,0 @@ -// *** WARNING: this file was generated by pulumi-java-gen. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -package com.pulumi.dnsimple.inputs; - -import com.pulumi.core.Output; -import com.pulumi.core.annotations.Import; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; -import javax.annotation.Nullable; - - -public final class RecordState extends com.pulumi.resources.ResourceArgs { - - public static final RecordState Empty = new RecordState(); - - @Import(name="domain") - private @Nullable Output domain; - - public Optional> domain() { - return Optional.ofNullable(this.domain); - } - - @Import(name="domainId") - private @Nullable Output domainId; - - public Optional> domainId() { - return Optional.ofNullable(this.domainId); - } - - @Import(name="hostname") - private @Nullable Output hostname; - - public Optional> hostname() { - return Optional.ofNullable(this.hostname); - } - - @Import(name="name") - private @Nullable Output name; - - public Optional> name() { - return Optional.ofNullable(this.name); - } - - @Import(name="priority") - private @Nullable Output priority; - - public Optional> priority() { - return Optional.ofNullable(this.priority); - } - - @Import(name="ttl") - private @Nullable Output ttl; - - public Optional> ttl() { - return Optional.ofNullable(this.ttl); - } - - @Import(name="type") - private @Nullable Output type; - - public Optional> type() { - return Optional.ofNullable(this.type); - } - - @Import(name="value") - private @Nullable Output value; - - public Optional> value() { - return Optional.ofNullable(this.value); - } - - private RecordState() {} - - private RecordState(RecordState $) { - this.domain = $.domain; - this.domainId = $.domainId; - this.hostname = $.hostname; - this.name = $.name; - this.priority = $.priority; - this.ttl = $.ttl; - this.type = $.type; - this.value = $.value; - } - - public static Builder builder() { - return new Builder(); - } - public static Builder builder(RecordState defaults) { - return new Builder(defaults); - } - - public static final class Builder { - private RecordState $; - - public Builder() { - $ = new RecordState(); - } - - public Builder(RecordState defaults) { - $ = new RecordState(Objects.requireNonNull(defaults)); - } - - public Builder domain(@Nullable Output domain) { - $.domain = domain; - return this; - } - - public Builder domain(String domain) { - return domain(Output.of(domain)); - } - - public Builder domainId(@Nullable Output domainId) { - $.domainId = domainId; - return this; - } - - public Builder domainId(String domainId) { - return domainId(Output.of(domainId)); - } - - public Builder hostname(@Nullable Output hostname) { - $.hostname = hostname; - return this; - } - - public Builder hostname(String hostname) { - return hostname(Output.of(hostname)); - } - - public Builder name(@Nullable Output name) { - $.name = name; - return this; - } - - public Builder name(String name) { - return name(Output.of(name)); - } - - public Builder priority(@Nullable Output priority) { - $.priority = priority; - return this; - } - - public Builder priority(String priority) { - return priority(Output.of(priority)); - } - - public Builder ttl(@Nullable Output ttl) { - $.ttl = ttl; - return this; - } - - public Builder ttl(String ttl) { - return ttl(Output.of(ttl)); - } - - public Builder type(@Nullable Output type) { - $.type = type; - return this; - } - - public Builder type(String type) { - return type(Output.of(type)); - } - - public Builder value(@Nullable Output value) { - $.value = value; - return this; - } - - public Builder value(String value) { - return value(Output.of(value)); - } - - public RecordState build() { - return $; - } - } - -} diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/ZoneRecordState.java b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/ZoneRecordState.java index 6340349f..97e5502c 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/ZoneRecordState.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/inputs/ZoneRecordState.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.Optional; @@ -35,13 +36,13 @@ public Optional> name() { * */ @Import(name="priority") - private @Nullable Output priority; + private @Nullable Output priority; /** * @return The priority of the record - only useful for some record types * */ - public Optional> priority() { + public Optional> priority() { return Optional.ofNullable(this.priority); } @@ -61,17 +62,17 @@ public Optional> qualifiedName() { } /** - * The TTL of the record + * The TTL of the record - defaults to 3600 * */ @Import(name="ttl") - private @Nullable Output ttl; + private @Nullable Output ttl; /** - * @return The TTL of the record + * @return The TTL of the record - defaults to 3600 * */ - public Optional> ttl() { + public Optional> ttl() { return Optional.ofNullable(this.ttl); } @@ -193,7 +194,7 @@ public Builder name(String name) { * @return builder * */ - public Builder priority(@Nullable Output priority) { + public Builder priority(@Nullable Output priority) { $.priority = priority; return this; } @@ -204,7 +205,7 @@ public Builder priority(@Nullable Output priority) { * @return builder * */ - public Builder priority(String priority) { + public Builder priority(Integer priority) { return priority(Output.of(priority)); } @@ -230,23 +231,23 @@ public Builder qualifiedName(String qualifiedName) { } /** - * @param ttl The TTL of the record + * @param ttl The TTL of the record - defaults to 3600 * * @return builder * */ - public Builder ttl(@Nullable Output ttl) { + public Builder ttl(@Nullable Output ttl) { $.ttl = ttl; return this; } /** - * @param ttl The TTL of the record + * @param ttl The TTL of the record - defaults to 3600 * * @return builder * */ - public Builder ttl(String ttl) { + public Builder ttl(Integer ttl) { return ttl(Output.of(ttl)); } diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/outputs/GetCertificateResult.java b/sdk/java/src/main/java/com/pulumi/dnsimple/outputs/GetCertificateResult.java index 75443fed..82b99f4b 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/outputs/GetCertificateResult.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/outputs/GetCertificateResult.java @@ -5,6 +5,7 @@ import com.pulumi.core.annotations.CustomType; import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Integer; import java.lang.String; import java.util.List; import java.util.Objects; @@ -16,12 +17,8 @@ public final class GetCertificateResult { * */ private List certificateChains; - private String certificateId; + private Integer certificateId; private String domain; - /** - * @return The provider-assigned unique ID for this managed resource. - * - */ private String id; /** * @return The corresponding Private Key for the SSL Certificate @@ -47,16 +44,12 @@ private GetCertificateResult() {} public List certificateChains() { return this.certificateChains; } - public String certificateId() { + public Integer certificateId() { return this.certificateId; } public String domain() { return this.domain; } - /** - * @return The provider-assigned unique ID for this managed resource. - * - */ public String id() { return this.id; } @@ -92,7 +85,7 @@ public static Builder builder(GetCertificateResult defaults) { @CustomType.Builder public static final class Builder { private List certificateChains; - private String certificateId; + private Integer certificateId; private String domain; private String id; private String privateKey; @@ -122,7 +115,7 @@ public Builder certificateChains(String... certificateChains) { return certificateChains(List.of(certificateChains)); } @CustomType.Setter - public Builder certificateId(String certificateId) { + public Builder certificateId(Integer certificateId) { if (certificateId == null) { throw new MissingRequiredPropertyException("GetCertificateResult", "certificateId"); } diff --git a/sdk/nodejs/domain.ts b/sdk/nodejs/domain.ts index c061bc9c..6d730137 100644 --- a/sdk/nodejs/domain.ts +++ b/sdk/nodejs/domain.ts @@ -21,13 +21,17 @@ import * as utilities from "./utilities"; * * DNSimple domains can be imported using their numeric record ID. * + * bash + * * ```sh * $ pulumi import dnsimple:index/domain:Domain resource_name 5678 * ``` * * The record ID can be found within [DNSimple Domains API](https://developer.dnsimple.com/v2/domains/#listDomains). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options. * - * $ curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq + * bash + * + * curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq * * { * @@ -105,15 +109,35 @@ export class Domain extends pulumi.CustomResource { return obj['__pulumiType'] === Domain.__pulumiType; } + /** + * The account ID for the domain. + */ public /*out*/ readonly accountId!: pulumi.Output; + /** + * Whether the domain is set to auto-renew. + */ public /*out*/ readonly autoRenew!: pulumi.Output; /** * The domain name to be created + * + * # Attributes Reference */ public readonly name!: pulumi.Output; + /** + * Whether the domain has WhoIs privacy enabled. + */ public /*out*/ readonly privateWhois!: pulumi.Output; + /** + * The ID of the registrant (contact) for the domain. + */ public /*out*/ readonly registrantId!: pulumi.Output; + /** + * The state of the domain. + */ public /*out*/ readonly state!: pulumi.Output; + /** + * The domain name in Unicode format. + */ public /*out*/ readonly unicodeName!: pulumi.Output; /** @@ -158,15 +182,35 @@ export class Domain extends pulumi.CustomResource { * Input properties used for looking up and filtering Domain resources. */ export interface DomainState { + /** + * The account ID for the domain. + */ accountId?: pulumi.Input; + /** + * Whether the domain is set to auto-renew. + */ autoRenew?: pulumi.Input; /** * The domain name to be created + * + * # Attributes Reference */ name?: pulumi.Input; + /** + * Whether the domain has WhoIs privacy enabled. + */ privateWhois?: pulumi.Input; + /** + * The ID of the registrant (contact) for the domain. + */ registrantId?: pulumi.Input; + /** + * The state of the domain. + */ state?: pulumi.Input; + /** + * The domain name in Unicode format. + */ unicodeName?: pulumi.Input; } @@ -176,6 +220,8 @@ export interface DomainState { export interface DomainArgs { /** * The domain name to be created + * + * # Attributes Reference */ name: pulumi.Input; } diff --git a/sdk/nodejs/emailForward.ts b/sdk/nodejs/emailForward.ts index d84a8c91..464c668d 100644 --- a/sdk/nodejs/emailForward.ts +++ b/sdk/nodejs/emailForward.ts @@ -15,11 +15,23 @@ import * as utilities from "./utilities"; * * // Add an email forwarding rule to the domain * const foobar = new dnsimple.EmailForward("foobar", { - * domain: dnsimpleDomain, + * domain: dnsimpleDomain.name, * aliasName: "sales", - * destinationEmail: "jane.doe@example.com", + * destinationEmail: "alice.appleseed@example.com", * }); * ``` + * + * ## Import + * + * DNSimple resources can be imported using the domain name and numeric email forward ID. + * + * **Importing email forward for example.com with email forward ID 1234** + * + * bash + * + * ```sh + * $ pulumi import dnsimple:index/emailForward:EmailForward resource_name example.com_1234 + * ``` */ export class EmailForward extends pulumi.CustomResource { /** @@ -50,7 +62,7 @@ export class EmailForward extends pulumi.CustomResource { } /** - * The source email address on the domain + * The source email address on the domain, in full form. This is a computed attribute. */ public /*out*/ readonly aliasEmail!: pulumi.Output; /** @@ -58,11 +70,11 @@ export class EmailForward extends pulumi.CustomResource { */ public readonly aliasName!: pulumi.Output; /** - * The destination email address on another domain + * The destination email address */ public readonly destinationEmail!: pulumi.Output; /** - * The domain to add the email forwarding rule to + * The domain name to add the email forwarding rule to */ public readonly domain!: pulumi.Output; @@ -109,7 +121,7 @@ export class EmailForward extends pulumi.CustomResource { */ export interface EmailForwardState { /** - * The source email address on the domain + * The source email address on the domain, in full form. This is a computed attribute. */ aliasEmail?: pulumi.Input; /** @@ -117,11 +129,11 @@ export interface EmailForwardState { */ aliasName?: pulumi.Input; /** - * The destination email address on another domain + * The destination email address */ destinationEmail?: pulumi.Input; /** - * The domain to add the email forwarding rule to + * The domain name to add the email forwarding rule to */ domain?: pulumi.Input; } @@ -135,11 +147,11 @@ export interface EmailForwardArgs { */ aliasName: pulumi.Input; /** - * The destination email address on another domain + * The destination email address */ destinationEmail: pulumi.Input; /** - * The domain to add the email forwarding rule to + * The domain name to add the email forwarding rule to */ domain: pulumi.Input; } diff --git a/sdk/nodejs/getCertificate.ts b/sdk/nodejs/getCertificate.ts index 15be53bc..e4113a2b 100644 --- a/sdk/nodejs/getCertificate.ts +++ b/sdk/nodejs/getCertificate.ts @@ -35,7 +35,7 @@ export interface GetCertificateArgs { /** * The ID of the SSL Certificate */ - certificateId: string; + certificateId: number; /** * The domain of the SSL Certificate */ @@ -50,11 +50,8 @@ export interface GetCertificateResult { * A list of certificates that make up the chain */ readonly certificateChains: string[]; - readonly certificateId: string; + readonly certificateId: number; readonly domain: string; - /** - * The provider-assigned unique ID for this managed resource. - */ readonly id: string; /** * The corresponding Private Key for the SSL Certificate @@ -95,7 +92,7 @@ export interface GetCertificateOutputArgs { /** * The ID of the SSL Certificate */ - certificateId: pulumi.Input; + certificateId: pulumi.Input; /** * The domain of the SSL Certificate */ diff --git a/sdk/nodejs/getZone.ts b/sdk/nodejs/getZone.ts index a886ef48..187a8c32 100644 --- a/sdk/nodejs/getZone.ts +++ b/sdk/nodejs/getZone.ts @@ -22,11 +22,10 @@ import * as utilities from "./utilities"; * * * `name` - (Required) The name of the zone * - * The following attributes are exported: + * The following additional attributes are exported: * * * `id` - The zone ID * * `accountId` - The account ID - * * `name` - The name of the zone * * `reverse` - True for a reverse zone, false for a forward zone. */ export function getZone(args: GetZoneArgs, opts?: pulumi.InvokeOptions): Promise { @@ -71,11 +70,10 @@ export interface GetZoneResult { * * * `name` - (Required) The name of the zone * - * The following attributes are exported: + * The following additional attributes are exported: * * * `id` - The zone ID * * `accountId` - The account ID - * * `name` - The name of the zone * * `reverse` - True for a reverse zone, false for a forward zone. */ export function getZoneOutput(args: GetZoneOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 8ebd7263..eed0736e 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -35,11 +35,6 @@ export type Provider = import("./provider").Provider; export const Provider: typeof import("./provider").Provider = null as any; utilities.lazyLoad(exports, ["Provider"], () => require("./provider")); -export { RecordArgs, RecordState } from "./record"; -export type Record = import("./record").Record; -export const Record: typeof import("./record").Record = null as any; -utilities.lazyLoad(exports, ["Record"], () => require("./record")); - export * from "./recordType"; export { ZoneRecordArgs, ZoneRecordState } from "./zoneRecord"; export type ZoneRecord = import("./zoneRecord").ZoneRecord; @@ -64,8 +59,6 @@ const _module = { return new EmailForward(name, undefined, { urn }) case "dnsimple:index/letsEncryptCertificate:LetsEncryptCertificate": return new LetsEncryptCertificate(name, undefined, { urn }) - case "dnsimple:index/record:Record": - return new Record(name, undefined, { urn }) case "dnsimple:index/zoneRecord:ZoneRecord": return new ZoneRecord(name, undefined, { urn }) default: @@ -76,7 +69,6 @@ const _module = { pulumi.runtime.registerResourceModule("dnsimple", "index/domain", _module) pulumi.runtime.registerResourceModule("dnsimple", "index/emailForward", _module) pulumi.runtime.registerResourceModule("dnsimple", "index/letsEncryptCertificate", _module) -pulumi.runtime.registerResourceModule("dnsimple", "index/record", _module) pulumi.runtime.registerResourceModule("dnsimple", "index/zoneRecord", _module) pulumi.runtime.registerResourcePackage("dnsimple", { version: utilities.getVersion(), diff --git a/sdk/nodejs/letsEncryptCertificate.ts b/sdk/nodejs/letsEncryptCertificate.ts index 682a7385..d448f911 100644 --- a/sdk/nodejs/letsEncryptCertificate.ts +++ b/sdk/nodejs/letsEncryptCertificate.ts @@ -53,15 +53,12 @@ export class LetsEncryptCertificate extends pulumi.CustomResource { */ public /*out*/ readonly authorityIdentifier!: pulumi.Output; /** - * Set to true if the certificate will auto-renew + * True if the certificate should auto-renew */ public readonly autoRenew!: pulumi.Output; /** - * The contact id for the certificate - * - * @deprecated contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * The datetime the certificate was created */ - public readonly contactId!: pulumi.Output; public /*out*/ readonly createdAt!: pulumi.Output; /** * The certificate signing request @@ -70,16 +67,26 @@ export class LetsEncryptCertificate extends pulumi.CustomResource { /** * The domain to be issued the certificate for */ - public readonly domainId!: pulumi.Output; - public /*out*/ readonly expiresOn!: pulumi.Output; + public readonly domainId!: pulumi.Output; + /** + * The datetime the certificate will expire + */ + public /*out*/ readonly expiresAt!: pulumi.Output; /** * The certificate name */ public readonly name!: pulumi.Output; + /** + * The signature algorithm to use for the certificate + */ + public readonly signatureAlgorithm!: pulumi.Output; /** * The state of the certificate */ public /*out*/ readonly state!: pulumi.Output; + /** + * The datetime the certificate was last updated + */ public /*out*/ readonly updatedAt!: pulumi.Output; /** * The years the certificate will last @@ -101,12 +108,12 @@ export class LetsEncryptCertificate extends pulumi.CustomResource { const state = argsOrState as LetsEncryptCertificateState | undefined; resourceInputs["authorityIdentifier"] = state ? state.authorityIdentifier : undefined; resourceInputs["autoRenew"] = state ? state.autoRenew : undefined; - resourceInputs["contactId"] = state ? state.contactId : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["csr"] = state ? state.csr : undefined; resourceInputs["domainId"] = state ? state.domainId : undefined; - resourceInputs["expiresOn"] = state ? state.expiresOn : undefined; + resourceInputs["expiresAt"] = state ? state.expiresAt : undefined; resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["signatureAlgorithm"] = state ? state.signatureAlgorithm : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["years"] = state ? state.years : undefined; @@ -115,17 +122,20 @@ export class LetsEncryptCertificate extends pulumi.CustomResource { if ((!args || args.autoRenew === undefined) && !opts.urn) { throw new Error("Missing required property 'autoRenew'"); } + if ((!args || args.domainId === undefined) && !opts.urn) { + throw new Error("Missing required property 'domainId'"); + } if ((!args || args.name === undefined) && !opts.urn) { throw new Error("Missing required property 'name'"); } resourceInputs["autoRenew"] = args ? args.autoRenew : undefined; - resourceInputs["contactId"] = args ? args.contactId : undefined; resourceInputs["domainId"] = args ? args.domainId : undefined; resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["signatureAlgorithm"] = args ? args.signatureAlgorithm : undefined; resourceInputs["authorityIdentifier"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["csr"] = undefined /*out*/; - resourceInputs["expiresOn"] = undefined /*out*/; + resourceInputs["expiresAt"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; resourceInputs["years"] = undefined /*out*/; @@ -144,15 +154,12 @@ export interface LetsEncryptCertificateState { */ authorityIdentifier?: pulumi.Input; /** - * Set to true if the certificate will auto-renew + * True if the certificate should auto-renew */ autoRenew?: pulumi.Input; /** - * The contact id for the certificate - * - * @deprecated contact_id is deprecated and has no effect. The attribute will be removed in the next major version. + * The datetime the certificate was created */ - contactId?: pulumi.Input; createdAt?: pulumi.Input; /** * The certificate signing request @@ -162,15 +169,25 @@ export interface LetsEncryptCertificateState { * The domain to be issued the certificate for */ domainId?: pulumi.Input; - expiresOn?: pulumi.Input; + /** + * The datetime the certificate will expire + */ + expiresAt?: pulumi.Input; /** * The certificate name */ name?: pulumi.Input; + /** + * The signature algorithm to use for the certificate + */ + signatureAlgorithm?: pulumi.Input; /** * The state of the certificate */ state?: pulumi.Input; + /** + * The datetime the certificate was last updated + */ updatedAt?: pulumi.Input; /** * The years the certificate will last @@ -183,21 +200,19 @@ export interface LetsEncryptCertificateState { */ export interface LetsEncryptCertificateArgs { /** - * Set to true if the certificate will auto-renew + * True if the certificate should auto-renew */ autoRenew: pulumi.Input; - /** - * The contact id for the certificate - * - * @deprecated contact_id is deprecated and has no effect. The attribute will be removed in the next major version. - */ - contactId?: pulumi.Input; /** * The domain to be issued the certificate for */ - domainId?: pulumi.Input; + domainId: pulumi.Input; /** * The certificate name */ name: pulumi.Input; + /** + * The signature algorithm to use for the certificate + */ + signatureAlgorithm?: pulumi.Input; } diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 22fc253f..bd46e9f5 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -28,11 +28,11 @@ export class Provider extends pulumi.ProviderResource { /** * The account for API operations. */ - public readonly account!: pulumi.Output; + public readonly account!: pulumi.Output; /** * The API v2 token for API operations. */ - public readonly token!: pulumi.Output; + public readonly token!: pulumi.Output; /** * Custom string to append to the user agent used for sending HTTP requests to the API. */ @@ -45,16 +45,10 @@ export class Provider extends pulumi.ProviderResource { * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ - constructor(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions) { + constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; { - if ((!args || args.account === undefined) && !opts.urn) { - throw new Error("Missing required property 'account'"); - } - if ((!args || args.token === undefined) && !opts.urn) { - throw new Error("Missing required property 'token'"); - } resourceInputs["account"] = args ? args.account : undefined; resourceInputs["prefetch"] = pulumi.output(args ? args.prefetch : undefined).apply(JSON.stringify); resourceInputs["sandbox"] = pulumi.output(args ? args.sandbox : undefined).apply(JSON.stringify); @@ -75,7 +69,7 @@ export interface ProviderArgs { /** * The account for API operations. */ - account: pulumi.Input; + account?: pulumi.Input; /** * Flag to enable the prefetch of zone records. */ @@ -87,7 +81,7 @@ export interface ProviderArgs { /** * The API v2 token for API operations. */ - token: pulumi.Input; + token?: pulumi.Input; /** * Custom string to append to the user agent used for sending HTTP requests to the API. */ diff --git a/sdk/nodejs/record.ts b/sdk/nodejs/record.ts deleted file mode 100644 index f482d17a..00000000 --- a/sdk/nodejs/record.ts +++ /dev/null @@ -1,129 +0,0 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -import * as pulumi from "@pulumi/pulumi"; -import * as utilities from "./utilities"; - -import {RecordType} from "./index"; - -/** - * @deprecated This resource is deprecated. -It will be removed in the next major version. - */ -export class Record extends pulumi.CustomResource { - /** - * Get an existing Record resource's state with the given name, ID, and optional extra - * properties used to qualify the lookup. - * - * @param name The _unique_ name of the resulting resource. - * @param id The _unique_ provider ID of the resource to lookup. - * @param state Any extra arguments used during the lookup. - * @param opts Optional settings to control the behavior of the CustomResource. - */ - public static get(name: string, id: pulumi.Input, state?: RecordState, opts?: pulumi.CustomResourceOptions): Record { - pulumi.log.warn("Record is deprecated: This resource is deprecated.\nIt will be removed in the next major version.") - return new Record(name, state, { ...opts, id: id }); - } - - /** @internal */ - public static readonly __pulumiType = 'dnsimple:index/record:Record'; - - /** - * Returns true if the given object is an instance of Record. This is designed to work even - * when multiple copies of the Pulumi SDK have been loaded into the same process. - */ - public static isInstance(obj: any): obj is Record { - if (obj === undefined || obj === null) { - return false; - } - return obj['__pulumiType'] === Record.__pulumiType; - } - - public readonly domain!: pulumi.Output; - public /*out*/ readonly domainId!: pulumi.Output; - public /*out*/ readonly hostname!: pulumi.Output; - public readonly name!: pulumi.Output; - public readonly priority!: pulumi.Output; - public readonly ttl!: pulumi.Output; - public readonly type!: pulumi.Output; - public readonly value!: pulumi.Output; - - /** - * Create a Record resource with the given unique name, arguments, and options. - * - * @param name The _unique_ name of the resource. - * @param args The arguments to use to populate this resource's properties. - * @param opts A bag of options that control this resource's behavior. - */ - /** @deprecated This resource is deprecated. -It will be removed in the next major version. */ - constructor(name: string, args: RecordArgs, opts?: pulumi.CustomResourceOptions) - /** @deprecated This resource is deprecated. -It will be removed in the next major version. */ - constructor(name: string, argsOrState?: RecordArgs | RecordState, opts?: pulumi.CustomResourceOptions) { - pulumi.log.warn("Record is deprecated: This resource is deprecated.\nIt will be removed in the next major version.") - let resourceInputs: pulumi.Inputs = {}; - opts = opts || {}; - if (opts.id) { - const state = argsOrState as RecordState | undefined; - resourceInputs["domain"] = state ? state.domain : undefined; - resourceInputs["domainId"] = state ? state.domainId : undefined; - resourceInputs["hostname"] = state ? state.hostname : undefined; - resourceInputs["name"] = state ? state.name : undefined; - resourceInputs["priority"] = state ? state.priority : undefined; - resourceInputs["ttl"] = state ? state.ttl : undefined; - resourceInputs["type"] = state ? state.type : undefined; - resourceInputs["value"] = state ? state.value : undefined; - } else { - const args = argsOrState as RecordArgs | undefined; - if ((!args || args.domain === undefined) && !opts.urn) { - throw new Error("Missing required property 'domain'"); - } - if ((!args || args.name === undefined) && !opts.urn) { - throw new Error("Missing required property 'name'"); - } - if ((!args || args.type === undefined) && !opts.urn) { - throw new Error("Missing required property 'type'"); - } - if ((!args || args.value === undefined) && !opts.urn) { - throw new Error("Missing required property 'value'"); - } - resourceInputs["domain"] = args ? args.domain : undefined; - resourceInputs["name"] = args ? args.name : undefined; - resourceInputs["priority"] = args ? args.priority : undefined; - resourceInputs["ttl"] = args ? args.ttl : undefined; - resourceInputs["type"] = args ? args.type : undefined; - resourceInputs["value"] = args ? args.value : undefined; - resourceInputs["domainId"] = undefined /*out*/; - resourceInputs["hostname"] = undefined /*out*/; - } - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - super(Record.__pulumiType, name, resourceInputs, opts); - } -} - -/** - * Input properties used for looking up and filtering Record resources. - */ -export interface RecordState { - domain?: pulumi.Input; - domainId?: pulumi.Input; - hostname?: pulumi.Input; - name?: pulumi.Input; - priority?: pulumi.Input; - ttl?: pulumi.Input; - type?: pulumi.Input; - value?: pulumi.Input; -} - -/** - * The set of arguments for constructing a Record resource. - */ -export interface RecordArgs { - domain: pulumi.Input; - name: pulumi.Input; - priority?: pulumi.Input; - ttl?: pulumi.Input; - type: pulumi.Input; - value: pulumi.Input; -} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 13f550d7..0701c198 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -22,7 +22,6 @@ "index.ts", "letsEncryptCertificate.ts", "provider.ts", - "record.ts", "recordType.ts", "utilities.ts", "zoneRecord.ts" diff --git a/sdk/nodejs/zoneRecord.ts b/sdk/nodejs/zoneRecord.ts index a36a64ab..27f05118 100644 --- a/sdk/nodejs/zoneRecord.ts +++ b/sdk/nodejs/zoneRecord.ts @@ -7,11 +7,6 @@ import * as utilities from "./utilities"; /** * Provides a DNSimple zone record resource. * - * ## Deprecation warning - * - * You can still use the _deprecated_ `dnsimple.Record` configuration, but be aware that it will be removed in the - * upcoming 1.0.0 release. - * * ## Example Usage * * ```typescript @@ -24,7 +19,7 @@ import * as utilities from "./utilities"; * name: "", * value: "192.168.0.11", * type: "A", - * ttl: "3600", + * ttl: 3600, * }); * ``` * @@ -38,7 +33,7 @@ import * as utilities from "./utilities"; * name: "terraform", * value: "192.168.0.11", * type: "A", - * ttl: "3600", + * ttl: 3600, * }); * ``` * @@ -46,16 +41,22 @@ import * as utilities from "./utilities"; * * DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID. * - * __Importing record example.com with record ID 1234__ + * **Importing record example.com with record ID 1234** + * + * bash * * ```sh * $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 * ``` - * __Importing record www.example.com with record ID 1234__ + * + * **Importing record www.example.com with record ID 1234** + * + * bash * * ```sh * $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 * ``` + * * The record ID can be found in the URL when editing a record on the DNSimple web dashboard. */ export class ZoneRecord extends pulumi.CustomResource { @@ -93,15 +94,15 @@ export class ZoneRecord extends pulumi.CustomResource { /** * The priority of the record - only useful for some record types */ - public readonly priority!: pulumi.Output; + public readonly priority!: pulumi.Output; /** * The FQDN of the record */ public /*out*/ readonly qualifiedName!: pulumi.Output; /** - * The TTL of the record + * The TTL of the record - defaults to 3600 */ - public readonly ttl!: pulumi.Output; + public readonly ttl!: pulumi.Output; /** * The type of the record */ @@ -179,15 +180,15 @@ export interface ZoneRecordState { /** * The priority of the record - only useful for some record types */ - priority?: pulumi.Input; + priority?: pulumi.Input; /** * The FQDN of the record */ qualifiedName?: pulumi.Input; /** - * The TTL of the record + * The TTL of the record - defaults to 3600 */ - ttl?: pulumi.Input; + ttl?: pulumi.Input; /** * The type of the record */ @@ -217,11 +218,11 @@ export interface ZoneRecordArgs { /** * The priority of the record - only useful for some record types */ - priority?: pulumi.Input; + priority?: pulumi.Input; /** - * The TTL of the record + * The TTL of the record - defaults to 3600 */ - ttl?: pulumi.Input; + ttl?: pulumi.Input; /** * The type of the record */ diff --git a/sdk/python/pulumi_dnsimple/__init__.py b/sdk/python/pulumi_dnsimple/__init__.py index e9d99ad7..bb0d5183 100644 --- a/sdk/python/pulumi_dnsimple/__init__.py +++ b/sdk/python/pulumi_dnsimple/__init__.py @@ -11,7 +11,6 @@ from .get_zone import * from .lets_encrypt_certificate import * from .provider import * -from .record import * from .zone_record import * # Make subpackages available: @@ -48,14 +47,6 @@ "dnsimple:index/letsEncryptCertificate:LetsEncryptCertificate": "LetsEncryptCertificate" } }, - { - "pkg": "dnsimple", - "mod": "index/record", - "fqn": "pulumi_dnsimple", - "classes": { - "dnsimple:index/record:Record": "Record" - } - }, { "pkg": "dnsimple", "mod": "index/zoneRecord", diff --git a/sdk/python/pulumi_dnsimple/_utilities.py b/sdk/python/pulumi_dnsimple/_utilities.py index abad7b41..c92fd32f 100644 --- a/sdk/python/pulumi_dnsimple/_utilities.py +++ b/sdk/python/pulumi_dnsimple/_utilities.py @@ -100,10 +100,6 @@ def _get_semver_version(): _version = _get_semver_version() _version_str = str(_version) - -def get_version(): - return _version_str - def get_resource_opts_defaults() -> pulumi.ResourceOptions: return pulumi.ResourceOptions( version=get_version(), @@ -324,3 +320,6 @@ def deprecated_fn(*args, **kwargs): def get_plugin_download_url(): return None + +def get_version(): + return _version_str diff --git a/sdk/python/pulumi_dnsimple/domain.py b/sdk/python/pulumi_dnsimple/domain.py index 7885d057..4ede8553 100644 --- a/sdk/python/pulumi_dnsimple/domain.py +++ b/sdk/python/pulumi_dnsimple/domain.py @@ -18,6 +18,8 @@ def __init__(__self__, *, """ The set of arguments for constructing a Domain resource. :param pulumi.Input[str] name: The domain name to be created + + # Attributes Reference """ pulumi.set(__self__, "name", name) @@ -26,6 +28,8 @@ def __init__(__self__, *, def name(self) -> pulumi.Input[str]: """ The domain name to be created + + # Attributes Reference """ return pulumi.get(self, "name") @@ -46,7 +50,15 @@ def __init__(__self__, *, unicode_name: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Domain resources. + :param pulumi.Input[int] account_id: The account ID for the domain. + :param pulumi.Input[bool] auto_renew: Whether the domain is set to auto-renew. :param pulumi.Input[str] name: The domain name to be created + + # Attributes Reference + :param pulumi.Input[bool] private_whois: Whether the domain has WhoIs privacy enabled. + :param pulumi.Input[int] registrant_id: The ID of the registrant (contact) for the domain. + :param pulumi.Input[str] state: The state of the domain. + :param pulumi.Input[str] unicode_name: The domain name in Unicode format. """ if account_id is not None: pulumi.set(__self__, "account_id", account_id) @@ -66,6 +78,9 @@ def __init__(__self__, *, @property @pulumi.getter(name="accountId") def account_id(self) -> Optional[pulumi.Input[int]]: + """ + The account ID for the domain. + """ return pulumi.get(self, "account_id") @account_id.setter @@ -75,6 +90,9 @@ def account_id(self, value: Optional[pulumi.Input[int]]): @property @pulumi.getter(name="autoRenew") def auto_renew(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the domain is set to auto-renew. + """ return pulumi.get(self, "auto_renew") @auto_renew.setter @@ -86,6 +104,8 @@ def auto_renew(self, value: Optional[pulumi.Input[bool]]): def name(self) -> Optional[pulumi.Input[str]]: """ The domain name to be created + + # Attributes Reference """ return pulumi.get(self, "name") @@ -96,6 +116,9 @@ def name(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="privateWhois") def private_whois(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the domain has WhoIs privacy enabled. + """ return pulumi.get(self, "private_whois") @private_whois.setter @@ -105,6 +128,9 @@ def private_whois(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter(name="registrantId") def registrant_id(self) -> Optional[pulumi.Input[int]]: + """ + The ID of the registrant (contact) for the domain. + """ return pulumi.get(self, "registrant_id") @registrant_id.setter @@ -114,6 +140,9 @@ def registrant_id(self, value: Optional[pulumi.Input[int]]): @property @pulumi.getter def state(self) -> Optional[pulumi.Input[str]]: + """ + The state of the domain. + """ return pulumi.get(self, "state") @state.setter @@ -123,6 +152,9 @@ def state(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="unicodeName") def unicode_name(self) -> Optional[pulumi.Input[str]]: + """ + The domain name in Unicode format. + """ return pulumi.get(self, "unicode_name") @unicode_name.setter @@ -154,13 +186,17 @@ def __init__(__self__, DNSimple domains can be imported using their numeric record ID. + bash + ```sh $ pulumi import dnsimple:index/domain:Domain resource_name 5678 ``` The record ID can be found within [DNSimple Domains API](https://developer.dnsimple.com/v2/domains/#listDomains). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options. - $ curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq + bash + + curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq { @@ -213,6 +249,8 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: The domain name to be created + + # Attributes Reference """ ... @overload @@ -237,13 +275,17 @@ def __init__(__self__, DNSimple domains can be imported using their numeric record ID. + bash + ```sh $ pulumi import dnsimple:index/domain:Domain resource_name 5678 ``` The record ID can be found within [DNSimple Domains API](https://developer.dnsimple.com/v2/domains/#listDomains). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options. - $ curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq + bash + + curl -u 'EMAIL:PASSWORD' https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq { @@ -351,7 +393,15 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[int] account_id: The account ID for the domain. + :param pulumi.Input[bool] auto_renew: Whether the domain is set to auto-renew. :param pulumi.Input[str] name: The domain name to be created + + # Attributes Reference + :param pulumi.Input[bool] private_whois: Whether the domain has WhoIs privacy enabled. + :param pulumi.Input[int] registrant_id: The ID of the registrant (contact) for the domain. + :param pulumi.Input[str] state: The state of the domain. + :param pulumi.Input[str] unicode_name: The domain name in Unicode format. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -369,11 +419,17 @@ def get(resource_name: str, @property @pulumi.getter(name="accountId") def account_id(self) -> pulumi.Output[int]: + """ + The account ID for the domain. + """ return pulumi.get(self, "account_id") @property @pulumi.getter(name="autoRenew") def auto_renew(self) -> pulumi.Output[bool]: + """ + Whether the domain is set to auto-renew. + """ return pulumi.get(self, "auto_renew") @property @@ -381,26 +437,40 @@ def auto_renew(self) -> pulumi.Output[bool]: def name(self) -> pulumi.Output[str]: """ The domain name to be created + + # Attributes Reference """ return pulumi.get(self, "name") @property @pulumi.getter(name="privateWhois") def private_whois(self) -> pulumi.Output[bool]: + """ + Whether the domain has WhoIs privacy enabled. + """ return pulumi.get(self, "private_whois") @property @pulumi.getter(name="registrantId") def registrant_id(self) -> pulumi.Output[int]: + """ + The ID of the registrant (contact) for the domain. + """ return pulumi.get(self, "registrant_id") @property @pulumi.getter def state(self) -> pulumi.Output[str]: + """ + The state of the domain. + """ return pulumi.get(self, "state") @property @pulumi.getter(name="unicodeName") def unicode_name(self) -> pulumi.Output[str]: + """ + The domain name in Unicode format. + """ return pulumi.get(self, "unicode_name") diff --git a/sdk/python/pulumi_dnsimple/email_forward.py b/sdk/python/pulumi_dnsimple/email_forward.py index e98f3077..4657e3b1 100644 --- a/sdk/python/pulumi_dnsimple/email_forward.py +++ b/sdk/python/pulumi_dnsimple/email_forward.py @@ -20,8 +20,8 @@ def __init__(__self__, *, """ The set of arguments for constructing a EmailForward resource. :param pulumi.Input[str] alias_name: The name part (the part before the @) of the source email address on the domain - :param pulumi.Input[str] destination_email: The destination email address on another domain - :param pulumi.Input[str] domain: The domain to add the email forwarding rule to + :param pulumi.Input[str] destination_email: The destination email address + :param pulumi.Input[str] domain: The domain name to add the email forwarding rule to """ pulumi.set(__self__, "alias_name", alias_name) pulumi.set(__self__, "destination_email", destination_email) @@ -43,7 +43,7 @@ def alias_name(self, value: pulumi.Input[str]): @pulumi.getter(name="destinationEmail") def destination_email(self) -> pulumi.Input[str]: """ - The destination email address on another domain + The destination email address """ return pulumi.get(self, "destination_email") @@ -55,7 +55,7 @@ def destination_email(self, value: pulumi.Input[str]): @pulumi.getter def domain(self) -> pulumi.Input[str]: """ - The domain to add the email forwarding rule to + The domain name to add the email forwarding rule to """ return pulumi.get(self, "domain") @@ -73,10 +73,10 @@ def __init__(__self__, *, domain: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering EmailForward resources. - :param pulumi.Input[str] alias_email: The source email address on the domain + :param pulumi.Input[str] alias_email: The source email address on the domain, in full form. This is a computed attribute. :param pulumi.Input[str] alias_name: The name part (the part before the @) of the source email address on the domain - :param pulumi.Input[str] destination_email: The destination email address on another domain - :param pulumi.Input[str] domain: The domain to add the email forwarding rule to + :param pulumi.Input[str] destination_email: The destination email address + :param pulumi.Input[str] domain: The domain name to add the email forwarding rule to """ if alias_email is not None: pulumi.set(__self__, "alias_email", alias_email) @@ -91,7 +91,7 @@ def __init__(__self__, *, @pulumi.getter(name="aliasEmail") def alias_email(self) -> Optional[pulumi.Input[str]]: """ - The source email address on the domain + The source email address on the domain, in full form. This is a computed attribute. """ return pulumi.get(self, "alias_email") @@ -115,7 +115,7 @@ def alias_name(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="destinationEmail") def destination_email(self) -> Optional[pulumi.Input[str]]: """ - The destination email address on another domain + The destination email address """ return pulumi.get(self, "destination_email") @@ -127,7 +127,7 @@ def destination_email(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def domain(self) -> Optional[pulumi.Input[str]]: """ - The domain to add the email forwarding rule to + The domain name to add the email forwarding rule to """ return pulumi.get(self, "domain") @@ -156,16 +156,28 @@ def __init__(__self__, # Add an email forwarding rule to the domain foobar = dnsimple.EmailForward("foobar", - domain=dnsimple_domain, + domain=dnsimple_domain["name"], alias_name="sales", - destination_email="jane.doe@example.com") + destination_email="alice.appleseed@example.com") + ``` + + ## Import + + DNSimple resources can be imported using the domain name and numeric email forward ID. + + **Importing email forward for example.com with email forward ID 1234** + + bash + + ```sh + $ pulumi import dnsimple:index/emailForward:EmailForward resource_name example.com_1234 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] alias_name: The name part (the part before the @) of the source email address on the domain - :param pulumi.Input[str] destination_email: The destination email address on another domain - :param pulumi.Input[str] domain: The domain to add the email forwarding rule to + :param pulumi.Input[str] destination_email: The destination email address + :param pulumi.Input[str] domain: The domain name to add the email forwarding rule to """ ... @overload @@ -184,9 +196,21 @@ def __init__(__self__, # Add an email forwarding rule to the domain foobar = dnsimple.EmailForward("foobar", - domain=dnsimple_domain, + domain=dnsimple_domain["name"], alias_name="sales", - destination_email="jane.doe@example.com") + destination_email="alice.appleseed@example.com") + ``` + + ## Import + + DNSimple resources can be imported using the domain name and numeric email forward ID. + + **Importing email forward for example.com with email forward ID 1234** + + bash + + ```sh + $ pulumi import dnsimple:index/emailForward:EmailForward resource_name example.com_1234 ``` :param str resource_name: The name of the resource. @@ -247,10 +271,10 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] alias_email: The source email address on the domain + :param pulumi.Input[str] alias_email: The source email address on the domain, in full form. This is a computed attribute. :param pulumi.Input[str] alias_name: The name part (the part before the @) of the source email address on the domain - :param pulumi.Input[str] destination_email: The destination email address on another domain - :param pulumi.Input[str] domain: The domain to add the email forwarding rule to + :param pulumi.Input[str] destination_email: The destination email address + :param pulumi.Input[str] domain: The domain name to add the email forwarding rule to """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -266,7 +290,7 @@ def get(resource_name: str, @pulumi.getter(name="aliasEmail") def alias_email(self) -> pulumi.Output[str]: """ - The source email address on the domain + The source email address on the domain, in full form. This is a computed attribute. """ return pulumi.get(self, "alias_email") @@ -282,7 +306,7 @@ def alias_name(self) -> pulumi.Output[str]: @pulumi.getter(name="destinationEmail") def destination_email(self) -> pulumi.Output[str]: """ - The destination email address on another domain + The destination email address """ return pulumi.get(self, "destination_email") @@ -290,7 +314,7 @@ def destination_email(self) -> pulumi.Output[str]: @pulumi.getter def domain(self) -> pulumi.Output[str]: """ - The domain to add the email forwarding rule to + The domain name to add the email forwarding rule to """ return pulumi.get(self, "domain") diff --git a/sdk/python/pulumi_dnsimple/get_certificate.py b/sdk/python/pulumi_dnsimple/get_certificate.py index 929a65ac..54924e02 100644 --- a/sdk/python/pulumi_dnsimple/get_certificate.py +++ b/sdk/python/pulumi_dnsimple/get_certificate.py @@ -25,8 +25,8 @@ def __init__(__self__, certificate_chains=None, certificate_id=None, domain=None if certificate_chains and not isinstance(certificate_chains, list): raise TypeError("Expected argument 'certificate_chains' to be a list") pulumi.set(__self__, "certificate_chains", certificate_chains) - if certificate_id and not isinstance(certificate_id, str): - raise TypeError("Expected argument 'certificate_id' to be a str") + if certificate_id and not isinstance(certificate_id, int): + raise TypeError("Expected argument 'certificate_id' to be a int") pulumi.set(__self__, "certificate_id", certificate_id) if domain and not isinstance(domain, str): raise TypeError("Expected argument 'domain' to be a str") @@ -54,7 +54,7 @@ def certificate_chains(self) -> Sequence[str]: @property @pulumi.getter(name="certificateId") - def certificate_id(self) -> str: + def certificate_id(self) -> int: return pulumi.get(self, "certificate_id") @property @@ -65,9 +65,6 @@ def domain(self) -> str: @property @pulumi.getter def id(self) -> str: - """ - The provider-assigned unique ID for this managed resource. - """ return pulumi.get(self, "id") @property @@ -110,7 +107,7 @@ def __await__(self): server_certificate=self.server_certificate) -def get_certificate(certificate_id: Optional[str] = None, +def get_certificate(certificate_id: Optional[int] = None, domain: Optional[str] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCertificateResult: """ @@ -127,7 +124,7 @@ def get_certificate(certificate_id: Optional[str] = None, ``` - :param str certificate_id: The ID of the SSL Certificate + :param int certificate_id: The ID of the SSL Certificate :param str domain: The domain of the SSL Certificate """ __args__ = dict() @@ -147,7 +144,7 @@ def get_certificate(certificate_id: Optional[str] = None, @_utilities.lift_output_func(get_certificate) -def get_certificate_output(certificate_id: Optional[pulumi.Input[str]] = None, +def get_certificate_output(certificate_id: Optional[pulumi.Input[int]] = None, domain: Optional[pulumi.Input[str]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCertificateResult]: """ @@ -164,7 +161,7 @@ def get_certificate_output(certificate_id: Optional[pulumi.Input[str]] = None, ``` - :param str certificate_id: The ID of the SSL Certificate + :param int certificate_id: The ID of the SSL Certificate :param str domain: The domain of the SSL Certificate """ ... diff --git a/sdk/python/pulumi_dnsimple/get_zone.py b/sdk/python/pulumi_dnsimple/get_zone.py index a78f2afc..c5d7d174 100644 --- a/sdk/python/pulumi_dnsimple/get_zone.py +++ b/sdk/python/pulumi_dnsimple/get_zone.py @@ -86,11 +86,10 @@ def get_zone(name: Optional[str] = None, * `name` - (Required) The name of the zone - The following attributes are exported: + The following additional attributes are exported: * `id` - The zone ID * `account_id` - The account ID - * `name` - The name of the zone * `reverse` - True for a reverse zone, false for a forward zone. """ __args__ = dict() @@ -124,11 +123,10 @@ def get_zone_output(name: Optional[pulumi.Input[str]] = None, * `name` - (Required) The name of the zone - The following attributes are exported: + The following additional attributes are exported: * `id` - The zone ID * `account_id` - The account ID - * `name` - The name of the zone * `reverse` - True for a reverse zone, false for a forward zone. """ ... diff --git a/sdk/python/pulumi_dnsimple/lets_encrypt_certificate.py b/sdk/python/pulumi_dnsimple/lets_encrypt_certificate.py index 2d614e41..8307eff2 100644 --- a/sdk/python/pulumi_dnsimple/lets_encrypt_certificate.py +++ b/sdk/python/pulumi_dnsimple/lets_encrypt_certificate.py @@ -15,31 +15,27 @@ class LetsEncryptCertificateArgs: def __init__(__self__, *, auto_renew: pulumi.Input[bool], + domain_id: pulumi.Input[str], name: pulumi.Input[str], - contact_id: Optional[pulumi.Input[int]] = None, - domain_id: Optional[pulumi.Input[str]] = None): + signature_algorithm: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a LetsEncryptCertificate resource. - :param pulumi.Input[bool] auto_renew: Set to true if the certificate will auto-renew - :param pulumi.Input[str] name: The certificate name - :param pulumi.Input[int] contact_id: The contact id for the certificate + :param pulumi.Input[bool] auto_renew: True if the certificate should auto-renew :param pulumi.Input[str] domain_id: The domain to be issued the certificate for + :param pulumi.Input[str] name: The certificate name + :param pulumi.Input[str] signature_algorithm: The signature algorithm to use for the certificate """ pulumi.set(__self__, "auto_renew", auto_renew) + pulumi.set(__self__, "domain_id", domain_id) pulumi.set(__self__, "name", name) - if contact_id is not None: - warnings.warn("""contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""", DeprecationWarning) - pulumi.log.warn("""contact_id is deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""") - if contact_id is not None: - pulumi.set(__self__, "contact_id", contact_id) - if domain_id is not None: - pulumi.set(__self__, "domain_id", domain_id) + if signature_algorithm is not None: + pulumi.set(__self__, "signature_algorithm", signature_algorithm) @property @pulumi.getter(name="autoRenew") def auto_renew(self) -> pulumi.Input[bool]: """ - Set to true if the certificate will auto-renew + True if the certificate should auto-renew """ return pulumi.get(self, "auto_renew") @@ -47,6 +43,18 @@ def auto_renew(self) -> pulumi.Input[bool]: def auto_renew(self, value: pulumi.Input[bool]): pulumi.set(self, "auto_renew", value) + @property + @pulumi.getter(name="domainId") + def domain_id(self) -> pulumi.Input[str]: + """ + The domain to be issued the certificate for + """ + return pulumi.get(self, "domain_id") + + @domain_id.setter + def domain_id(self, value: pulumi.Input[str]): + pulumi.set(self, "domain_id", value) + @property @pulumi.getter def name(self) -> pulumi.Input[str]: @@ -60,29 +68,16 @@ def name(self, value: pulumi.Input[str]): pulumi.set(self, "name", value) @property - @pulumi.getter(name="contactId") - @_utilities.deprecated("""contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""") - def contact_id(self) -> Optional[pulumi.Input[int]]: + @pulumi.getter(name="signatureAlgorithm") + def signature_algorithm(self) -> Optional[pulumi.Input[str]]: """ - The contact id for the certificate + The signature algorithm to use for the certificate """ - return pulumi.get(self, "contact_id") + return pulumi.get(self, "signature_algorithm") - @contact_id.setter - def contact_id(self, value: Optional[pulumi.Input[int]]): - pulumi.set(self, "contact_id", value) - - @property - @pulumi.getter(name="domainId") - def domain_id(self) -> Optional[pulumi.Input[str]]: - """ - The domain to be issued the certificate for - """ - return pulumi.get(self, "domain_id") - - @domain_id.setter - def domain_id(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "domain_id", value) + @signature_algorithm.setter + def signature_algorithm(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "signature_algorithm", value) @pulumi.input_type @@ -90,45 +85,45 @@ class _LetsEncryptCertificateState: def __init__(__self__, *, authority_identifier: Optional[pulumi.Input[str]] = None, auto_renew: Optional[pulumi.Input[bool]] = None, - contact_id: Optional[pulumi.Input[int]] = None, created_at: Optional[pulumi.Input[str]] = None, csr: Optional[pulumi.Input[str]] = None, domain_id: Optional[pulumi.Input[str]] = None, - expires_on: Optional[pulumi.Input[str]] = None, + expires_at: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, + signature_algorithm: Optional[pulumi.Input[str]] = None, state: Optional[pulumi.Input[str]] = None, updated_at: Optional[pulumi.Input[str]] = None, years: Optional[pulumi.Input[int]] = None): """ Input properties used for looking up and filtering LetsEncryptCertificate resources. :param pulumi.Input[str] authority_identifier: The identifying certification authority (CA) - :param pulumi.Input[bool] auto_renew: Set to true if the certificate will auto-renew - :param pulumi.Input[int] contact_id: The contact id for the certificate + :param pulumi.Input[bool] auto_renew: True if the certificate should auto-renew + :param pulumi.Input[str] created_at: The datetime the certificate was created :param pulumi.Input[str] csr: The certificate signing request :param pulumi.Input[str] domain_id: The domain to be issued the certificate for + :param pulumi.Input[str] expires_at: The datetime the certificate will expire :param pulumi.Input[str] name: The certificate name + :param pulumi.Input[str] signature_algorithm: The signature algorithm to use for the certificate :param pulumi.Input[str] state: The state of the certificate + :param pulumi.Input[str] updated_at: The datetime the certificate was last updated :param pulumi.Input[int] years: The years the certificate will last """ if authority_identifier is not None: pulumi.set(__self__, "authority_identifier", authority_identifier) if auto_renew is not None: pulumi.set(__self__, "auto_renew", auto_renew) - if contact_id is not None: - warnings.warn("""contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""", DeprecationWarning) - pulumi.log.warn("""contact_id is deprecated: contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""") - if contact_id is not None: - pulumi.set(__self__, "contact_id", contact_id) if created_at is not None: pulumi.set(__self__, "created_at", created_at) if csr is not None: pulumi.set(__self__, "csr", csr) if domain_id is not None: pulumi.set(__self__, "domain_id", domain_id) - if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + if expires_at is not None: + pulumi.set(__self__, "expires_at", expires_at) if name is not None: pulumi.set(__self__, "name", name) + if signature_algorithm is not None: + pulumi.set(__self__, "signature_algorithm", signature_algorithm) if state is not None: pulumi.set(__self__, "state", state) if updated_at is not None: @@ -152,7 +147,7 @@ def authority_identifier(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="autoRenew") def auto_renew(self) -> Optional[pulumi.Input[bool]]: """ - Set to true if the certificate will auto-renew + True if the certificate should auto-renew """ return pulumi.get(self, "auto_renew") @@ -160,22 +155,12 @@ def auto_renew(self) -> Optional[pulumi.Input[bool]]: def auto_renew(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "auto_renew", value) - @property - @pulumi.getter(name="contactId") - @_utilities.deprecated("""contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""") - def contact_id(self) -> Optional[pulumi.Input[int]]: - """ - The contact id for the certificate - """ - return pulumi.get(self, "contact_id") - - @contact_id.setter - def contact_id(self, value: Optional[pulumi.Input[int]]): - pulumi.set(self, "contact_id", value) - @property @pulumi.getter(name="createdAt") def created_at(self) -> Optional[pulumi.Input[str]]: + """ + The datetime the certificate was created + """ return pulumi.get(self, "created_at") @created_at.setter @@ -207,13 +192,16 @@ def domain_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "domain_id", value) @property - @pulumi.getter(name="expiresOn") - def expires_on(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "expires_on") + @pulumi.getter(name="expiresAt") + def expires_at(self) -> Optional[pulumi.Input[str]]: + """ + The datetime the certificate will expire + """ + return pulumi.get(self, "expires_at") - @expires_on.setter - def expires_on(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "expires_on", value) + @expires_at.setter + def expires_at(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "expires_at", value) @property @pulumi.getter @@ -227,6 +215,18 @@ def name(self) -> Optional[pulumi.Input[str]]: def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) + @property + @pulumi.getter(name="signatureAlgorithm") + def signature_algorithm(self) -> Optional[pulumi.Input[str]]: + """ + The signature algorithm to use for the certificate + """ + return pulumi.get(self, "signature_algorithm") + + @signature_algorithm.setter + def signature_algorithm(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "signature_algorithm", value) + @property @pulumi.getter def state(self) -> Optional[pulumi.Input[str]]: @@ -242,6 +242,9 @@ def state(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="updatedAt") def updated_at(self) -> Optional[pulumi.Input[str]]: + """ + The datetime the certificate was last updated + """ return pulumi.get(self, "updated_at") @updated_at.setter @@ -267,9 +270,9 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, auto_renew: Optional[pulumi.Input[bool]] = None, - contact_id: Optional[pulumi.Input[int]] = None, domain_id: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, + signature_algorithm: Optional[pulumi.Input[str]] = None, __props__=None): """ Provides a DNSimple Let's Encrypt certificate resource. @@ -288,10 +291,10 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[bool] auto_renew: Set to true if the certificate will auto-renew - :param pulumi.Input[int] contact_id: The contact id for the certificate + :param pulumi.Input[bool] auto_renew: True if the certificate should auto-renew :param pulumi.Input[str] domain_id: The domain to be issued the certificate for :param pulumi.Input[str] name: The certificate name + :param pulumi.Input[str] signature_algorithm: The signature algorithm to use for the certificate """ ... @overload @@ -330,9 +333,9 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, auto_renew: Optional[pulumi.Input[bool]] = None, - contact_id: Optional[pulumi.Input[int]] = None, domain_id: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, + signature_algorithm: Optional[pulumi.Input[str]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -345,15 +348,17 @@ def _internal_init(__self__, if auto_renew is None and not opts.urn: raise TypeError("Missing required property 'auto_renew'") __props__.__dict__["auto_renew"] = auto_renew - __props__.__dict__["contact_id"] = contact_id + if domain_id is None and not opts.urn: + raise TypeError("Missing required property 'domain_id'") __props__.__dict__["domain_id"] = domain_id if name is None and not opts.urn: raise TypeError("Missing required property 'name'") __props__.__dict__["name"] = name + __props__.__dict__["signature_algorithm"] = signature_algorithm __props__.__dict__["authority_identifier"] = None __props__.__dict__["created_at"] = None __props__.__dict__["csr"] = None - __props__.__dict__["expires_on"] = None + __props__.__dict__["expires_at"] = None __props__.__dict__["state"] = None __props__.__dict__["updated_at"] = None __props__.__dict__["years"] = None @@ -369,12 +374,12 @@ def get(resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, authority_identifier: Optional[pulumi.Input[str]] = None, auto_renew: Optional[pulumi.Input[bool]] = None, - contact_id: Optional[pulumi.Input[int]] = None, created_at: Optional[pulumi.Input[str]] = None, csr: Optional[pulumi.Input[str]] = None, domain_id: Optional[pulumi.Input[str]] = None, - expires_on: Optional[pulumi.Input[str]] = None, + expires_at: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, + signature_algorithm: Optional[pulumi.Input[str]] = None, state: Optional[pulumi.Input[str]] = None, updated_at: Optional[pulumi.Input[str]] = None, years: Optional[pulumi.Input[int]] = None) -> 'LetsEncryptCertificate': @@ -386,12 +391,15 @@ def get(resource_name: str, :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] authority_identifier: The identifying certification authority (CA) - :param pulumi.Input[bool] auto_renew: Set to true if the certificate will auto-renew - :param pulumi.Input[int] contact_id: The contact id for the certificate + :param pulumi.Input[bool] auto_renew: True if the certificate should auto-renew + :param pulumi.Input[str] created_at: The datetime the certificate was created :param pulumi.Input[str] csr: The certificate signing request :param pulumi.Input[str] domain_id: The domain to be issued the certificate for + :param pulumi.Input[str] expires_at: The datetime the certificate will expire :param pulumi.Input[str] name: The certificate name + :param pulumi.Input[str] signature_algorithm: The signature algorithm to use for the certificate :param pulumi.Input[str] state: The state of the certificate + :param pulumi.Input[str] updated_at: The datetime the certificate was last updated :param pulumi.Input[int] years: The years the certificate will last """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -400,12 +408,12 @@ def get(resource_name: str, __props__.__dict__["authority_identifier"] = authority_identifier __props__.__dict__["auto_renew"] = auto_renew - __props__.__dict__["contact_id"] = contact_id __props__.__dict__["created_at"] = created_at __props__.__dict__["csr"] = csr __props__.__dict__["domain_id"] = domain_id - __props__.__dict__["expires_on"] = expires_on + __props__.__dict__["expires_at"] = expires_at __props__.__dict__["name"] = name + __props__.__dict__["signature_algorithm"] = signature_algorithm __props__.__dict__["state"] = state __props__.__dict__["updated_at"] = updated_at __props__.__dict__["years"] = years @@ -423,22 +431,16 @@ def authority_identifier(self) -> pulumi.Output[str]: @pulumi.getter(name="autoRenew") def auto_renew(self) -> pulumi.Output[bool]: """ - Set to true if the certificate will auto-renew + True if the certificate should auto-renew """ return pulumi.get(self, "auto_renew") - @property - @pulumi.getter(name="contactId") - @_utilities.deprecated("""contact_id is deprecated and has no effect. The attribute will be removed in the next major version.""") - def contact_id(self) -> pulumi.Output[Optional[int]]: - """ - The contact id for the certificate - """ - return pulumi.get(self, "contact_id") - @property @pulumi.getter(name="createdAt") def created_at(self) -> pulumi.Output[str]: + """ + The datetime the certificate was created + """ return pulumi.get(self, "created_at") @property @@ -451,16 +453,19 @@ def csr(self) -> pulumi.Output[str]: @property @pulumi.getter(name="domainId") - def domain_id(self) -> pulumi.Output[Optional[str]]: + def domain_id(self) -> pulumi.Output[str]: """ The domain to be issued the certificate for """ return pulumi.get(self, "domain_id") @property - @pulumi.getter(name="expiresOn") - def expires_on(self) -> pulumi.Output[str]: - return pulumi.get(self, "expires_on") + @pulumi.getter(name="expiresAt") + def expires_at(self) -> pulumi.Output[str]: + """ + The datetime the certificate will expire + """ + return pulumi.get(self, "expires_at") @property @pulumi.getter @@ -470,6 +475,14 @@ def name(self) -> pulumi.Output[str]: """ return pulumi.get(self, "name") + @property + @pulumi.getter(name="signatureAlgorithm") + def signature_algorithm(self) -> pulumi.Output[Optional[str]]: + """ + The signature algorithm to use for the certificate + """ + return pulumi.get(self, "signature_algorithm") + @property @pulumi.getter def state(self) -> pulumi.Output[str]: @@ -481,6 +494,9 @@ def state(self) -> pulumi.Output[str]: @property @pulumi.getter(name="updatedAt") def updated_at(self) -> pulumi.Output[str]: + """ + The datetime the certificate was last updated + """ return pulumi.get(self, "updated_at") @property diff --git a/sdk/python/pulumi_dnsimple/provider.py b/sdk/python/pulumi_dnsimple/provider.py index 5e255b2d..a97e3736 100644 --- a/sdk/python/pulumi_dnsimple/provider.py +++ b/sdk/python/pulumi_dnsimple/provider.py @@ -14,52 +14,42 @@ @pulumi.input_type class ProviderArgs: def __init__(__self__, *, - account: pulumi.Input[str], - token: pulumi.Input[str], + account: Optional[pulumi.Input[str]] = None, prefetch: Optional[pulumi.Input[bool]] = None, sandbox: Optional[pulumi.Input[bool]] = None, + token: Optional[pulumi.Input[str]] = None, user_agent: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Provider resource. :param pulumi.Input[str] account: The account for API operations. - :param pulumi.Input[str] token: The API v2 token for API operations. :param pulumi.Input[bool] prefetch: Flag to enable the prefetch of zone records. :param pulumi.Input[bool] sandbox: Flag to enable the sandbox API. + :param pulumi.Input[str] token: The API v2 token for API operations. :param pulumi.Input[str] user_agent: Custom string to append to the user agent used for sending HTTP requests to the API. """ - pulumi.set(__self__, "account", account) - pulumi.set(__self__, "token", token) + if account is not None: + pulumi.set(__self__, "account", account) if prefetch is not None: pulumi.set(__self__, "prefetch", prefetch) if sandbox is not None: pulumi.set(__self__, "sandbox", sandbox) + if token is not None: + pulumi.set(__self__, "token", token) if user_agent is not None: pulumi.set(__self__, "user_agent", user_agent) @property @pulumi.getter - def account(self) -> pulumi.Input[str]: + def account(self) -> Optional[pulumi.Input[str]]: """ The account for API operations. """ return pulumi.get(self, "account") @account.setter - def account(self, value: pulumi.Input[str]): + def account(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "account", value) - @property - @pulumi.getter - def token(self) -> pulumi.Input[str]: - """ - The API v2 token for API operations. - """ - return pulumi.get(self, "token") - - @token.setter - def token(self, value: pulumi.Input[str]): - pulumi.set(self, "token", value) - @property @pulumi.getter def prefetch(self) -> Optional[pulumi.Input[bool]]: @@ -84,6 +74,18 @@ def sandbox(self) -> Optional[pulumi.Input[bool]]: def sandbox(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "sandbox", value) + @property + @pulumi.getter + def token(self) -> Optional[pulumi.Input[str]]: + """ + The API v2 token for API operations. + """ + return pulumi.get(self, "token") + + @token.setter + def token(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "token", value) + @property @pulumi.getter(name="userAgent") def user_agent(self) -> Optional[pulumi.Input[str]]: @@ -126,7 +128,7 @@ def __init__(__self__, @overload def __init__(__self__, resource_name: str, - args: ProviderArgs, + args: Optional[ProviderArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ The provider type for the dnsimple package. By default, resources use package-wide configuration @@ -163,13 +165,9 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProviderArgs.__new__(ProviderArgs) - if account is None and not opts.urn: - raise TypeError("Missing required property 'account'") __props__.__dict__["account"] = account __props__.__dict__["prefetch"] = pulumi.Output.from_input(prefetch).apply(pulumi.runtime.to_json) if prefetch is not None else None __props__.__dict__["sandbox"] = pulumi.Output.from_input(sandbox).apply(pulumi.runtime.to_json) if sandbox is not None else None - if token is None and not opts.urn: - raise TypeError("Missing required property 'token'") __props__.__dict__["token"] = None if token is None else pulumi.Output.secret(token) __props__.__dict__["user_agent"] = user_agent secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["token"]) @@ -182,7 +180,7 @@ def _internal_init(__self__, @property @pulumi.getter - def account(self) -> pulumi.Output[str]: + def account(self) -> pulumi.Output[Optional[str]]: """ The account for API operations. """ @@ -190,7 +188,7 @@ def account(self) -> pulumi.Output[str]: @property @pulumi.getter - def token(self) -> pulumi.Output[str]: + def token(self) -> pulumi.Output[Optional[str]]: """ The API v2 token for API operations. """ diff --git a/sdk/python/pulumi_dnsimple/record.py b/sdk/python/pulumi_dnsimple/record.py deleted file mode 100644 index 6b024dad..00000000 --- a/sdk/python/pulumi_dnsimple/record.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -import copy -import warnings -import pulumi -import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload -from . import _utilities - -__all__ = ['RecordArgs', 'Record'] - -@pulumi.input_type -class RecordArgs: - def __init__(__self__, *, - domain: pulumi.Input[str], - name: pulumi.Input[str], - type: pulumi.Input[str], - value: pulumi.Input[str], - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None): - """ - The set of arguments for constructing a Record resource. - """ - pulumi.set(__self__, "domain", domain) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) - if priority is not None: - pulumi.set(__self__, "priority", priority) - if ttl is not None: - pulumi.set(__self__, "ttl", ttl) - - @property - @pulumi.getter - def domain(self) -> pulumi.Input[str]: - return pulumi.get(self, "domain") - - @domain.setter - def domain(self, value: pulumi.Input[str]): - pulumi.set(self, "domain", value) - - @property - @pulumi.getter - def name(self) -> pulumi.Input[str]: - return pulumi.get(self, "name") - - @name.setter - def name(self, value: pulumi.Input[str]): - pulumi.set(self, "name", value) - - @property - @pulumi.getter - def type(self) -> pulumi.Input[str]: - return pulumi.get(self, "type") - - @type.setter - def type(self, value: pulumi.Input[str]): - pulumi.set(self, "type", value) - - @property - @pulumi.getter - def value(self) -> pulumi.Input[str]: - return pulumi.get(self, "value") - - @value.setter - def value(self, value: pulumi.Input[str]): - pulumi.set(self, "value", value) - - @property - @pulumi.getter - def priority(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "priority") - - @priority.setter - def priority(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "priority", value) - - @property - @pulumi.getter - def ttl(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "ttl") - - @ttl.setter - def ttl(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "ttl", value) - - -@pulumi.input_type -class _RecordState: - def __init__(__self__, *, - domain: Optional[pulumi.Input[str]] = None, - domain_id: Optional[pulumi.Input[str]] = None, - hostname: Optional[pulumi.Input[str]] = None, - name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, - type: Optional[pulumi.Input[str]] = None, - value: Optional[pulumi.Input[str]] = None): - """ - Input properties used for looking up and filtering Record resources. - """ - if domain is not None: - pulumi.set(__self__, "domain", domain) - if domain_id is not None: - pulumi.set(__self__, "domain_id", domain_id) - if hostname is not None: - pulumi.set(__self__, "hostname", hostname) - if name is not None: - pulumi.set(__self__, "name", name) - if priority is not None: - pulumi.set(__self__, "priority", priority) - if ttl is not None: - pulumi.set(__self__, "ttl", ttl) - if type is not None: - pulumi.set(__self__, "type", type) - if value is not None: - pulumi.set(__self__, "value", value) - - @property - @pulumi.getter - def domain(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "domain") - - @domain.setter - def domain(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "domain", value) - - @property - @pulumi.getter(name="domainId") - def domain_id(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "domain_id") - - @domain_id.setter - def domain_id(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "domain_id", value) - - @property - @pulumi.getter - def hostname(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "hostname") - - @hostname.setter - def hostname(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "hostname", value) - - @property - @pulumi.getter - def name(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "name") - - @name.setter - def name(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "name", value) - - @property - @pulumi.getter - def priority(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "priority") - - @priority.setter - def priority(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "priority", value) - - @property - @pulumi.getter - def ttl(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "ttl") - - @ttl.setter - def ttl(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "ttl", value) - - @property - @pulumi.getter - def type(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "type") - - @type.setter - def type(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "type", value) - - @property - @pulumi.getter - def value(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "value") - - @value.setter - def value(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "value", value) - - -warnings.warn("""This resource is deprecated. -It will be removed in the next major version.""", DeprecationWarning) - - -class Record(pulumi.CustomResource): - warnings.warn("""This resource is deprecated. -It will be removed in the next major version.""", DeprecationWarning) - - @overload - def __init__(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - domain: Optional[pulumi.Input[str]] = None, - name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, - type: Optional[pulumi.Input[str]] = None, - value: Optional[pulumi.Input[str]] = None, - __props__=None): - """ - Create a Record resource with the given unique name, props, and options. - :param str resource_name: The name of the resource. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - ... - @overload - def __init__(__self__, - resource_name: str, - args: RecordArgs, - opts: Optional[pulumi.ResourceOptions] = None): - """ - Create a Record resource with the given unique name, props, and options. - :param str resource_name: The name of the resource. - :param RecordArgs args: The arguments to use to populate this resource's properties. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - ... - def __init__(__self__, resource_name: str, *args, **kwargs): - resource_args, opts = _utilities.get_resource_args_opts(RecordArgs, pulumi.ResourceOptions, *args, **kwargs) - if resource_args is not None: - __self__._internal_init(resource_name, opts, **resource_args.__dict__) - else: - __self__._internal_init(resource_name, *args, **kwargs) - - def _internal_init(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - domain: Optional[pulumi.Input[str]] = None, - name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, - type: Optional[pulumi.Input[str]] = None, - value: Optional[pulumi.Input[str]] = None, - __props__=None): - pulumi.log.warn("""Record is deprecated: This resource is deprecated. -It will be removed in the next major version.""") - opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) - if not isinstance(opts, pulumi.ResourceOptions): - raise TypeError('Expected resource options to be a ResourceOptions instance') - if opts.id is None: - if __props__ is not None: - raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') - __props__ = RecordArgs.__new__(RecordArgs) - - if domain is None and not opts.urn: - raise TypeError("Missing required property 'domain'") - __props__.__dict__["domain"] = domain - if name is None and not opts.urn: - raise TypeError("Missing required property 'name'") - __props__.__dict__["name"] = name - __props__.__dict__["priority"] = priority - __props__.__dict__["ttl"] = ttl - if type is None and not opts.urn: - raise TypeError("Missing required property 'type'") - __props__.__dict__["type"] = type - if value is None and not opts.urn: - raise TypeError("Missing required property 'value'") - __props__.__dict__["value"] = value - __props__.__dict__["domain_id"] = None - __props__.__dict__["hostname"] = None - super(Record, __self__).__init__( - 'dnsimple:index/record:Record', - resource_name, - __props__, - opts) - - @staticmethod - def get(resource_name: str, - id: pulumi.Input[str], - opts: Optional[pulumi.ResourceOptions] = None, - domain: Optional[pulumi.Input[str]] = None, - domain_id: Optional[pulumi.Input[str]] = None, - hostname: Optional[pulumi.Input[str]] = None, - name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, - type: Optional[pulumi.Input[str]] = None, - value: Optional[pulumi.Input[str]] = None) -> 'Record': - """ - Get an existing Record resource's state with the given name, id, and optional extra - properties used to qualify the lookup. - - :param str resource_name: The unique name of the resulting resource. - :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) - - __props__ = _RecordState.__new__(_RecordState) - - __props__.__dict__["domain"] = domain - __props__.__dict__["domain_id"] = domain_id - __props__.__dict__["hostname"] = hostname - __props__.__dict__["name"] = name - __props__.__dict__["priority"] = priority - __props__.__dict__["ttl"] = ttl - __props__.__dict__["type"] = type - __props__.__dict__["value"] = value - return Record(resource_name, opts=opts, __props__=__props__) - - @property - @pulumi.getter - def domain(self) -> pulumi.Output[str]: - return pulumi.get(self, "domain") - - @property - @pulumi.getter(name="domainId") - def domain_id(self) -> pulumi.Output[str]: - return pulumi.get(self, "domain_id") - - @property - @pulumi.getter - def hostname(self) -> pulumi.Output[str]: - return pulumi.get(self, "hostname") - - @property - @pulumi.getter - def name(self) -> pulumi.Output[str]: - return pulumi.get(self, "name") - - @property - @pulumi.getter - def priority(self) -> pulumi.Output[str]: - return pulumi.get(self, "priority") - - @property - @pulumi.getter - def ttl(self) -> pulumi.Output[Optional[str]]: - return pulumi.get(self, "ttl") - - @property - @pulumi.getter - def type(self) -> pulumi.Output[str]: - return pulumi.get(self, "type") - - @property - @pulumi.getter - def value(self) -> pulumi.Output[str]: - return pulumi.get(self, "value") - diff --git a/sdk/python/pulumi_dnsimple/zone_record.py b/sdk/python/pulumi_dnsimple/zone_record.py index 19fdc6e9..d3af64c0 100644 --- a/sdk/python/pulumi_dnsimple/zone_record.py +++ b/sdk/python/pulumi_dnsimple/zone_record.py @@ -18,16 +18,16 @@ def __init__(__self__, *, type: pulumi.Input[str], value: pulumi.Input[str], zone_name: pulumi.Input[str], - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None): + priority: Optional[pulumi.Input[int]] = None, + ttl: Optional[pulumi.Input[int]] = None): """ The set of arguments for constructing a ZoneRecord resource. :param pulumi.Input[str] name: The name of the record :param pulumi.Input[str] type: The type of the record :param pulumi.Input[str] value: The value of the record :param pulumi.Input[str] zone_name: The domain to add the record to - :param pulumi.Input[str] priority: The priority of the record - only useful for some record types - :param pulumi.Input[str] ttl: The TTL of the record + :param pulumi.Input[int] priority: The priority of the record - only useful for some record types + :param pulumi.Input[int] ttl: The TTL of the record - defaults to 3600 """ pulumi.set(__self__, "name", name) pulumi.set(__self__, "type", type) @@ -88,26 +88,26 @@ def zone_name(self, value: pulumi.Input[str]): @property @pulumi.getter - def priority(self) -> Optional[pulumi.Input[str]]: + def priority(self) -> Optional[pulumi.Input[int]]: """ The priority of the record - only useful for some record types """ return pulumi.get(self, "priority") @priority.setter - def priority(self, value: Optional[pulumi.Input[str]]): + def priority(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "priority", value) @property @pulumi.getter - def ttl(self) -> Optional[pulumi.Input[str]]: + def ttl(self) -> Optional[pulumi.Input[int]]: """ - The TTL of the record + The TTL of the record - defaults to 3600 """ return pulumi.get(self, "ttl") @ttl.setter - def ttl(self, value: Optional[pulumi.Input[str]]): + def ttl(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "ttl", value) @@ -115,9 +115,9 @@ def ttl(self, value: Optional[pulumi.Input[str]]): class _ZoneRecordState: def __init__(__self__, *, name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, qualified_name: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, type: Optional[pulumi.Input[str]] = None, value: Optional[pulumi.Input[str]] = None, zone_id: Optional[pulumi.Input[str]] = None, @@ -125,9 +125,9 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering ZoneRecord resources. :param pulumi.Input[str] name: The name of the record - :param pulumi.Input[str] priority: The priority of the record - only useful for some record types + :param pulumi.Input[int] priority: The priority of the record - only useful for some record types :param pulumi.Input[str] qualified_name: The FQDN of the record - :param pulumi.Input[str] ttl: The TTL of the record + :param pulumi.Input[int] ttl: The TTL of the record - defaults to 3600 :param pulumi.Input[str] type: The type of the record :param pulumi.Input[str] value: The value of the record :param pulumi.Input[str] zone_id: The domain ID of the record @@ -164,14 +164,14 @@ def name(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def priority(self) -> Optional[pulumi.Input[str]]: + def priority(self) -> Optional[pulumi.Input[int]]: """ The priority of the record - only useful for some record types """ return pulumi.get(self, "priority") @priority.setter - def priority(self, value: Optional[pulumi.Input[str]]): + def priority(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "priority", value) @property @@ -188,14 +188,14 @@ def qualified_name(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def ttl(self) -> Optional[pulumi.Input[str]]: + def ttl(self) -> Optional[pulumi.Input[int]]: """ - The TTL of the record + The TTL of the record - defaults to 3600 """ return pulumi.get(self, "ttl") @ttl.setter - def ttl(self, value: Optional[pulumi.Input[str]]): + def ttl(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "ttl", value) @property @@ -253,8 +253,8 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + ttl: Optional[pulumi.Input[int]] = None, type: Optional[pulumi.Input[str]] = None, value: Optional[pulumi.Input[str]] = None, zone_name: Optional[pulumi.Input[str]] = None, @@ -262,11 +262,6 @@ def __init__(__self__, """ Provides a DNSimple zone record resource. - ## Deprecation warning - - You can still use the _deprecated_ `Record` configuration, but be aware that it will be removed in the - upcoming 1.0.0 release. - ## Example Usage ```python @@ -279,7 +274,7 @@ def __init__(__self__, name="", value="192.168.0.11", type="A", - ttl="3600") + ttl=3600) ``` ```python @@ -292,30 +287,36 @@ def __init__(__self__, name="terraform", value="192.168.0.11", type="A", - ttl="3600") + ttl=3600) ``` ## Import DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID. - __Importing record example.com with record ID 1234__ + **Importing record example.com with record ID 1234** + + bash ```sh $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 ``` - __Importing record www.example.com with record ID 1234__ + + **Importing record www.example.com with record ID 1234** + + bash ```sh $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 ``` + The record ID can be found in the URL when editing a record on the DNSimple web dashboard. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: The name of the record - :param pulumi.Input[str] priority: The priority of the record - only useful for some record types - :param pulumi.Input[str] ttl: The TTL of the record + :param pulumi.Input[int] priority: The priority of the record - only useful for some record types + :param pulumi.Input[int] ttl: The TTL of the record - defaults to 3600 :param pulumi.Input[str] type: The type of the record :param pulumi.Input[str] value: The value of the record :param pulumi.Input[str] zone_name: The domain to add the record to @@ -329,11 +330,6 @@ def __init__(__self__, """ Provides a DNSimple zone record resource. - ## Deprecation warning - - You can still use the _deprecated_ `Record` configuration, but be aware that it will be removed in the - upcoming 1.0.0 release. - ## Example Usage ```python @@ -346,7 +342,7 @@ def __init__(__self__, name="", value="192.168.0.11", type="A", - ttl="3600") + ttl=3600) ``` ```python @@ -359,23 +355,29 @@ def __init__(__self__, name="terraform", value="192.168.0.11", type="A", - ttl="3600") + ttl=3600) ``` ## Import DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID. - __Importing record example.com with record ID 1234__ + **Importing record example.com with record ID 1234** + + bash ```sh $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 ``` - __Importing record www.example.com with record ID 1234__ + + **Importing record www.example.com with record ID 1234** + + bash ```sh $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234 ``` + The record ID can be found in the URL when editing a record on the DNSimple web dashboard. :param str resource_name: The name of the resource. @@ -394,8 +396,8 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + ttl: Optional[pulumi.Input[int]] = None, type: Optional[pulumi.Input[str]] = None, value: Optional[pulumi.Input[str]] = None, zone_name: Optional[pulumi.Input[str]] = None, @@ -435,9 +437,9 @@ def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, name: Optional[pulumi.Input[str]] = None, - priority: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, qualified_name: Optional[pulumi.Input[str]] = None, - ttl: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, type: Optional[pulumi.Input[str]] = None, value: Optional[pulumi.Input[str]] = None, zone_id: Optional[pulumi.Input[str]] = None, @@ -450,9 +452,9 @@ def get(resource_name: str, :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: The name of the record - :param pulumi.Input[str] priority: The priority of the record - only useful for some record types + :param pulumi.Input[int] priority: The priority of the record - only useful for some record types :param pulumi.Input[str] qualified_name: The FQDN of the record - :param pulumi.Input[str] ttl: The TTL of the record + :param pulumi.Input[int] ttl: The TTL of the record - defaults to 3600 :param pulumi.Input[str] type: The type of the record :param pulumi.Input[str] value: The value of the record :param pulumi.Input[str] zone_id: The domain ID of the record @@ -482,7 +484,7 @@ def name(self) -> pulumi.Output[str]: @property @pulumi.getter - def priority(self) -> pulumi.Output[str]: + def priority(self) -> pulumi.Output[int]: """ The priority of the record - only useful for some record types """ @@ -498,9 +500,9 @@ def qualified_name(self) -> pulumi.Output[str]: @property @pulumi.getter - def ttl(self) -> pulumi.Output[Optional[str]]: + def ttl(self) -> pulumi.Output[int]: """ - The TTL of the record + The TTL of the record - defaults to 3600 """ return pulumi.get(self, "ttl")