From 8a793a1d4cf1d0e4c899a7458b1eba490acf3feb Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Fri, 13 Dec 2024 17:34:44 +0000 Subject: [PATCH] make build_sdks --- sdk/dotnet/GetCertificate.cs | 25 +++ sdk/dotnet/GetRegistrantChangeCheck.cs | 41 +++++ sdk/dotnet/GetZone.cs | 36 ++++ sdk/dotnet/Utilities.cs | 7 + sdk/go/dnsimple/getCertificate.go | 16 +- sdk/go/dnsimple/getRegistrantChangeCheck.go | 16 +- sdk/go/dnsimple/getZone.go | 16 +- sdk/java/build.gradle | 2 +- .../pulumi/dnsimple/DnsimpleFunctions.java | 157 ++++++++++++++++++ .../java/com/pulumi/dnsimple/Utilities.java | 31 +++- sdk/nodejs/package.json | 2 +- sdk/python/pyproject.toml | 4 +- 12 files changed, 301 insertions(+), 52 deletions(-) diff --git a/sdk/dotnet/GetCertificate.cs b/sdk/dotnet/GetCertificate.cs index 01bf04e4..8f8e8740 100644 --- a/sdk/dotnet/GetCertificate.cs +++ b/sdk/dotnet/GetCertificate.cs @@ -60,6 +60,31 @@ public static Task InvokeAsync(GetCertificateArgs args, In /// public static Output Invoke(GetCertificateInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("dnsimple:index/getCertificate:getCertificate", args ?? new GetCertificateInvokeArgs(), options.WithDefaults()); + + /// + /// Provides a DNSimple certificate data source. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DNSimple = Pulumi.DNSimple; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foobar = DNSimple.GetCertificate.Invoke(new() + /// { + /// Domain = dnsimpleDomain, + /// CertificateId = dnsimpleCertificateId, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetCertificateInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("dnsimple:index/getCertificate:getCertificate", args ?? new GetCertificateInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetRegistrantChangeCheck.cs b/sdk/dotnet/GetRegistrantChangeCheck.cs index f713e5f9..3b7ac7c4 100644 --- a/sdk/dotnet/GetRegistrantChangeCheck.cs +++ b/sdk/dotnet/GetRegistrantChangeCheck.cs @@ -92,6 +92,47 @@ public static Task InvokeAsync(GetRegistrantChan /// public static Output Invoke(GetRegistrantChangeCheckInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("dnsimple:index/getRegistrantChangeCheck:getRegistrantChangeCheck", args ?? new GetRegistrantChangeCheckInvokeArgs(), options.WithDefaults()); + + /// + /// Get information on the requirements of a registrant change. + /// + /// > **Note:** The registrant change API is currently in developer preview and is subject to change. + /// + /// Get registrant change requirements for the `dnsimple.com` domain and the contact with ID `1234`: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DNSimple = Pulumi.DNSimple; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DNSimple.GetRegistrantChangeCheck.Invoke(new() + /// { + /// DomainId = "dnsimple.com", + /// ContactId = "1234", + /// }); + /// + /// }); + /// ``` + /// + /// The following arguments are supported: + /// + /// * `domain_id` - (Required) The name or ID of the domain. + /// * `contact_id` - (Required) The ID of the contact you are planning to change to. + /// + /// The following additional attributes are exported: + /// + /// * `contact_id` - The ID of the contact you are planning to change to. + /// * `domain_id` - The name or ID of the domain. + /// * `extended_attributes` - (List) A list of extended attributes that are required for the registrant change. (see below for nested schema) + /// * `registry_owner_change` - (Boolean) Whether the registrant change is going to result in an owner change at the registry. + /// + /// <a id="nestedblock--extended_attributes"></a> + /// + public static Output Invoke(GetRegistrantChangeCheckInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("dnsimple:index/getRegistrantChangeCheck:getRegistrantChangeCheck", args ?? new GetRegistrantChangeCheckInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetZone.cs b/sdk/dotnet/GetZone.cs index 10dd9239..f1caa91a 100644 --- a/sdk/dotnet/GetZone.cs +++ b/sdk/dotnet/GetZone.cs @@ -82,6 +82,42 @@ public static Task InvokeAsync(GetZoneArgs args, InvokeOptions? o /// public static Output Invoke(GetZoneInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("dnsimple:index/getZone:getZone", args ?? new GetZoneInvokeArgs(), options.WithDefaults()); + + /// + /// Get information about a DNSimple zone. + /// + /// !> Data source is getting deprecated in favor of `dnsimple\_zone` resource. + /// + /// Get zone: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DNSimple = Pulumi.DNSimple; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foobar = DNSimple.GetZone.Invoke(new() + /// { + /// Name = "dnsimple.com", + /// }); + /// + /// }); + /// ``` + /// + /// The following arguments are supported: + /// + /// * `name` - (Required) The name of the zone + /// + /// The following additional attributes are exported: + /// + /// * `id` - The zone ID + /// * `account_id` - The account ID + /// * `reverse` - True for a reverse zone, false for a forward zone. + /// + public static Output Invoke(GetZoneInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("dnsimple:index/getZone:getZone", args ?? new GetZoneInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index 583946ad..dfe6232f 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -56,6 +56,13 @@ static class Utilities return dst; } + public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src) + { + var dst = src ?? new global::Pulumi.InvokeOutputOptions{}; + dst.Version = src?.Version ?? Version; + return dst; + } + private readonly static string version; public static string Version => version; diff --git a/sdk/go/dnsimple/getCertificate.go b/sdk/go/dnsimple/getCertificate.go index 257f06fc..5742e2d6 100644 --- a/sdk/go/dnsimple/getCertificate.go +++ b/sdk/go/dnsimple/getCertificate.go @@ -75,21 +75,11 @@ type GetCertificateResult struct { } func GetCertificateOutput(ctx *pulumi.Context, args GetCertificateOutputArgs, opts ...pulumi.InvokeOption) GetCertificateResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetCertificateResultOutput, error) { args := v.(GetCertificateArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetCertificateResult - secret, err := ctx.InvokePackageRaw("dnsimple:index/getCertificate:getCertificate", args, &rv, "", opts...) - if err != nil { - return GetCertificateResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetCertificateResultOutput) - if secret { - return pulumi.ToSecret(output).(GetCertificateResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("dnsimple:index/getCertificate:getCertificate", args, GetCertificateResultOutput{}, options).(GetCertificateResultOutput), nil }).(GetCertificateResultOutput) } diff --git a/sdk/go/dnsimple/getRegistrantChangeCheck.go b/sdk/go/dnsimple/getRegistrantChangeCheck.go index 441e3939..c3607f38 100644 --- a/sdk/go/dnsimple/getRegistrantChangeCheck.go +++ b/sdk/go/dnsimple/getRegistrantChangeCheck.go @@ -81,21 +81,11 @@ type GetRegistrantChangeCheckResult struct { } func GetRegistrantChangeCheckOutput(ctx *pulumi.Context, args GetRegistrantChangeCheckOutputArgs, opts ...pulumi.InvokeOption) GetRegistrantChangeCheckResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetRegistrantChangeCheckResultOutput, error) { args := v.(GetRegistrantChangeCheckArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetRegistrantChangeCheckResult - secret, err := ctx.InvokePackageRaw("dnsimple:index/getRegistrantChangeCheck:getRegistrantChangeCheck", args, &rv, "", opts...) - if err != nil { - return GetRegistrantChangeCheckResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetRegistrantChangeCheckResultOutput) - if secret { - return pulumi.ToSecret(output).(GetRegistrantChangeCheckResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("dnsimple:index/getRegistrantChangeCheck:getRegistrantChangeCheck", args, GetRegistrantChangeCheckResultOutput{}, options).(GetRegistrantChangeCheckResultOutput), nil }).(GetRegistrantChangeCheckResultOutput) } diff --git a/sdk/go/dnsimple/getZone.go b/sdk/go/dnsimple/getZone.go index 6a6a7be9..697ea43e 100644 --- a/sdk/go/dnsimple/getZone.go +++ b/sdk/go/dnsimple/getZone.go @@ -74,21 +74,11 @@ type LookupZoneResult struct { } func LookupZoneOutput(ctx *pulumi.Context, args LookupZoneOutputArgs, opts ...pulumi.InvokeOption) LookupZoneResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupZoneResultOutput, error) { args := v.(LookupZoneArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupZoneResult - secret, err := ctx.InvokePackageRaw("dnsimple:index/getZone:getZone", args, &rv, "", opts...) - if err != nil { - return LookupZoneResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupZoneResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupZoneResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("dnsimple:index/getZone:getZone", args, LookupZoneResultOutput{}, options).(LookupZoneResultOutput), nil }).(LookupZoneResultOutput) } diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index 7a9c1293..73412174 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.18.0") + implementation("com.pulumi:pulumi:0.20.0") } task sourcesJar(type: Jar) { 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 9d40427e..3e4926a7 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/DnsimpleFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/DnsimpleFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.dnsimple.Utilities; import com.pulumi.dnsimple.inputs.GetCertificateArgs; import com.pulumi.dnsimple.inputs.GetCertificatePlainArgs; @@ -149,6 +150,49 @@ public static CompletableFuture getCertificatePlain(GetCer public static Output getCertificate(GetCertificateArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("dnsimple:index/getCertificate:getCertificate", TypeShape.of(GetCertificateResult.class), args, Utilities.withVersion(options)); } + /** + * Provides a DNSimple certificate data source. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.dnsimple.DnsimpleFunctions;
+     * import com.pulumi.dnsimple.inputs.GetCertificateArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var foobar = DnsimpleFunctions.getCertificate(GetCertificateArgs.builder()
+     *             .domain(dnsimpleDomain)
+     *             .certificateId(dnsimpleCertificateId)
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getCertificate(GetCertificateArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("dnsimple:index/getCertificate:getCertificate", TypeShape.of(GetCertificateResult.class), args, Utilities.withVersion(options)); + } /** * Provides a DNSimple certificate data source. * @@ -369,6 +413,65 @@ public static CompletableFuture getRegistrantCha public static Output getRegistrantChangeCheck(GetRegistrantChangeCheckArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("dnsimple:index/getRegistrantChangeCheck:getRegistrantChangeCheck", TypeShape.of(GetRegistrantChangeCheckResult.class), args, Utilities.withVersion(options)); } + /** + * Get information on the requirements of a registrant change. + * + * > **Note:** The registrant change API is currently in developer preview and is subject to change. + * + * Get registrant change requirements for the `dnsimple.com` domain and the contact with ID `1234`: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.dnsimple.DnsimpleFunctions;
+     * import com.pulumi.dnsimple.inputs.GetRegistrantChangeCheckArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DnsimpleFunctions.getRegistrantChangeCheck(GetRegistrantChangeCheckArgs.builder()
+     *             .domainId("dnsimple.com")
+     *             .contactId("1234")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * The following arguments are supported: + * + * * `domain_id` - (Required) The name or ID of the domain. + * * `contact_id` - (Required) The ID of the contact you are planning to change to. + * + * The following additional attributes are exported: + * + * * `contact_id` - The ID of the contact you are planning to change to. + * * `domain_id` - The name or ID of the domain. + * * `extended_attributes` - (List) A list of extended attributes that are required for the registrant change. (see below for nested schema) + * * `registry_owner_change` - (Boolean) Whether the registrant change is going to result in an owner change at the registry. + * + * <a id="nestedblock--extended_attributes"></a> + * + */ + public static Output getRegistrantChangeCheck(GetRegistrantChangeCheckArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("dnsimple:index/getRegistrantChangeCheck:getRegistrantChangeCheck", TypeShape.of(GetRegistrantChangeCheckResult.class), args, Utilities.withVersion(options)); + } /** * Get information on the requirements of a registrant change. * @@ -590,6 +693,60 @@ public static CompletableFuture getZonePlain(GetZonePlainArgs arg public static Output getZone(GetZoneArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("dnsimple:index/getZone:getZone", TypeShape.of(GetZoneResult.class), args, Utilities.withVersion(options)); } + /** + * Get information about a DNSimple zone. + * + * !> Data source is getting deprecated in favor of `dnsimple\_zone` resource. + * + * Get zone: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.dnsimple.DnsimpleFunctions;
+     * import com.pulumi.dnsimple.inputs.GetZoneArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var foobar = DnsimpleFunctions.getZone(GetZoneArgs.builder()
+     *             .name("dnsimple.com")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * The following arguments are supported: + * + * * `name` - (Required) The name of the zone + * + * The following additional attributes are exported: + * + * * `id` - The zone ID + * * `account_id` - The account ID + * * `reverse` - True for a reverse zone, false for a forward zone. + * + */ + public static Output getZone(GetZoneArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("dnsimple:index/getZone:getZone", TypeShape.of(GetZoneResult.class), args, Utilities.withVersion(options)); + } /** * Get information about a DNSimple zone. * diff --git a/sdk/java/src/main/java/com/pulumi/dnsimple/Utilities.java b/sdk/java/src/main/java/com/pulumi/dnsimple/Utilities.java index f9988a27..5c5b2d13 100644 --- a/sdk/java/src/main/java/com/pulumi/dnsimple/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/dnsimple/Utilities.java @@ -14,6 +14,7 @@ import javax.annotation.Nullable; import com.pulumi.core.internal.Environment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; public class Utilities { @@ -57,16 +58,28 @@ public static Optional getEnvDouble(java.lang.String... names) return Optional.empty(); } - public static InvokeOptions withVersion(@Nullable InvokeOptions options) { - if (options != null && options.getVersion().isPresent()) { - return options; - } - return new InvokeOptions( - options == null ? null : options.getParent().orElse(null), - options == null ? null : options.getProvider().orElse(null), - getVersion() - ); + public static InvokeOptions withVersion(@Nullable InvokeOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; + } + return new InvokeOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion() + ); + } + + public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; } + return new InvokeOutputOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion(), + options == null ? null : options.getDependsOn() + ); + } private static final java.lang.String version; public static java.lang.String getVersion() { diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index acf2c7ea..cf4f4a05 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -13,7 +13,7 @@ "build": "tsc" }, "dependencies": { - "@pulumi/pulumi": "^3.136.0" + "@pulumi/pulumi": "^3.142.0" }, "devDependencies": { "@types/mime": "^2.0.0", diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index e4123c75..dee589e4 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "pulumi_dnsimple" description = "A Pulumi package for creating and managing dnsimple cloud resources." - dependencies = ["parver>=0.2.1", "pulumi>=3.136.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] + dependencies = ["parver>=0.2.1", "pulumi>=3.142.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] keywords = ["pulumi", "dnsimple"] readme = "README.md" - requires-python = ">=3.8" + requires-python = ">=3.9" version = "4.0.0a0+dev" [project.license] text = "Apache-2.0"