diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index d33c3a21..0548fb4e 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.12.0 \ No newline at end of file +0.14.0 \ No newline at end of file diff --git a/examples/go.mod b/examples/go.mod index 13855aac..92eafa75 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-mailgun/examples/v3 go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.126.0 +require github.com/pulumi/pulumi/pkg/v3 v3.128.0 require ( cloud.google.com/go v0.112.1 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.9.1 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.128.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index 8ef90117..01fb8a55 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -342,10 +342,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= -github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.128.0 h1:K3qtJYjHg4DkA7LxknY/MoQZ+QHdHQDh/k2njjmjHXM= +github.com/pulumi/pulumi/pkg/v3 v3.128.0/go.mod h1:/spoJXy/mqQ8fBLgXBEbUrAnL7pHdfXOviIo5fZROEY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/provider/go.mod b/provider/go.mod index d72b0bfd..224896ee 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -3,8 +3,8 @@ module github.com/pulumi/pulumi-mailgun/provider/v3 go 1.21.12 require ( - github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 - github.com/pulumi/pulumi/sdk/v3 v3.126.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0 + github.com/pulumi/pulumi/sdk/v3 v3.128.0 github.com/wgebis/terraform-provider-mailgun v0.0.0 ) @@ -174,7 +174,7 @@ require ( github.com/pulumi/pulumi-java/pkg v0.11.0 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect github.com/pulumi/pulumi-yaml v1.9.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.128.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -205,6 +205,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/yuin/goldmark v1.7.4 // indirect github.com/zclconf/go-cty v1.14.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index c44087b5..7dc73de0 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1918,16 +1918,16 @@ github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2p github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-java/pkg v0.11.0 h1:Jw9gBvyfmfOMq/EkYDm9+zGPxsDAA8jfeMpHmtZ+1oA= github.com/pulumi/pulumi-java/pkg v0.11.0/go.mod h1:sXAk25P47AQVQL6ilAbFmRNgZykC7og/+87ihnqzFTc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 h1:0W2Y3Fk7VAWHpjD3FwzVnqWo7g1hD+96C0YDobMnvDU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0/go.mod h1:QSDiqiCMMbfzrsp3oyRPWgSVE/dkVH5ujxoFappqjdo= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0 h1:Om0Yw07/5dVABB2ou8+XBCmbp9TUUtDZJEh2B5jPGgI= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0/go.mod h1:EWGqRo+ogMPty23b6rVUajgJXUDSNXU+WqcZTPlzyEI= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= github.com/pulumi/pulumi-yaml v1.9.1 h1:JPeI80M23SPactxgnCFS1casZlSr7ZhAXwSx4H55QQ4= github.com/pulumi/pulumi-yaml v1.9.1/go.mod h1:OH0R34yJxA5u6zjYBN4JXcWoEvfkRoOVWi6viu8buoA= -github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= -github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.128.0 h1:K3qtJYjHg4DkA7LxknY/MoQZ+QHdHQDh/k2njjmjHXM= +github.com/pulumi/pulumi/pkg/v3 v3.128.0/go.mod h1:/spoJXy/mqQ8fBLgXBEbUrAnL7pHdfXOviIo5fZROEY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -2047,6 +2047,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= +github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= diff --git a/sdk/go.mod b/sdk/go.mod index c3af593e..11fd0a3b 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.126.0 + github.com/pulumi/pulumi/sdk/v3 v3.128.0 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index c4e7aede..2543199c 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index 7981fa13..48228f63 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.12.0") + implementation("com.pulumi:pulumi:0.14.0") } task sourcesJar(type: Jar) { @@ -150,4 +150,4 @@ if (signingKey) { useInMemoryPgpKeys(signingKey, signingPassword) sign publishing.publications.mainPublication } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/pulumi/mailgun/Domain.java b/sdk/java/src/main/java/com/pulumi/mailgun/Domain.java index f80c03d1..0eabf9ec 100644 --- a/sdk/java/src/main/java/com/pulumi/mailgun/Domain.java +++ b/sdk/java/src/main/java/com/pulumi/mailgun/Domain.java @@ -323,7 +323,7 @@ public Output> wildcard() { * * @param name The _unique_ name of the resulting resource. */ - public Domain(String name) { + public Domain(java.lang.String name) { this(name, DomainArgs.Empty); } /** @@ -331,7 +331,7 @@ public Domain(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Domain(String name, @Nullable DomainArgs args) { + public Domain(java.lang.String name, @Nullable DomainArgs args) { this(name, args, null); } /** @@ -340,15 +340,22 @@ public Domain(String name, @Nullable DomainArgs 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 Domain(String name, @Nullable DomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/domain:Domain", name, args == null ? DomainArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Domain(java.lang.String name, @Nullable DomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/domain:Domain", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Domain(String name, Output id, @Nullable DomainState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/domain:Domain", name, state, makeResourceOptions(options, id)); + private Domain(java.lang.String name, Output id, @Nullable DomainState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/domain:Domain", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static DomainArgs makeArgs(@Nullable DomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? DomainArgs.Empty : args; + } + + 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()) .additionalSecretOutputs(List.of( @@ -367,7 +374,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Domain get(String name, Output id, @Nullable DomainState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Domain get(java.lang.String name, Output id, @Nullable DomainState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Domain(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/mailgun/DomainCredential.java b/sdk/java/src/main/java/com/pulumi/mailgun/DomainCredential.java index a38e27d8..d3c6c801 100644 --- a/sdk/java/src/main/java/com/pulumi/mailgun/DomainCredential.java +++ b/sdk/java/src/main/java/com/pulumi/mailgun/DomainCredential.java @@ -135,7 +135,7 @@ public Output> region() { * * @param name The _unique_ name of the resulting resource. */ - public DomainCredential(String name) { + public DomainCredential(java.lang.String name) { this(name, DomainCredentialArgs.Empty); } /** @@ -143,7 +143,7 @@ public DomainCredential(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public DomainCredential(String name, DomainCredentialArgs args) { + public DomainCredential(java.lang.String name, DomainCredentialArgs args) { this(name, args, null); } /** @@ -152,15 +152,22 @@ public DomainCredential(String name, DomainCredentialArgs 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 DomainCredential(String name, DomainCredentialArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/domainCredential:DomainCredential", name, args == null ? DomainCredentialArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public DomainCredential(java.lang.String name, DomainCredentialArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/domainCredential:DomainCredential", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private DomainCredential(String name, Output id, @Nullable DomainCredentialState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/domainCredential:DomainCredential", name, state, makeResourceOptions(options, id)); + private DomainCredential(java.lang.String name, Output id, @Nullable DomainCredentialState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/domainCredential:DomainCredential", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static DomainCredentialArgs makeArgs(DomainCredentialArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? DomainCredentialArgs.Empty : args; + } + + 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()) .additionalSecretOutputs(List.of( @@ -179,7 +186,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static DomainCredential get(String name, Output id, @Nullable DomainCredentialState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static DomainCredential get(java.lang.String name, Output id, @Nullable DomainCredentialState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DomainCredential(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/mailgun/Provider.java b/sdk/java/src/main/java/com/pulumi/mailgun/Provider.java index ae58f650..8c467b4b 100644 --- a/sdk/java/src/main/java/com/pulumi/mailgun/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/mailgun/Provider.java @@ -32,7 +32,7 @@ public Output apiKey() { * * @param name The _unique_ name of the resulting resource. */ - public Provider(String name) { + public Provider(java.lang.String name) { this(name, ProviderArgs.Empty); } /** @@ -40,7 +40,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(java.lang.String name, ProviderArgs args) { this(name, args, null); } /** @@ -49,11 +49,18 @@ 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) { - super("mailgun", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Provider(java.lang.String name, ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ProviderArgs makeArgs(ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ProviderArgs.Empty : args; + } + + 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(); diff --git a/sdk/java/src/main/java/com/pulumi/mailgun/Route.java b/sdk/java/src/main/java/com/pulumi/mailgun/Route.java index ddfba626..5fbb7cc8 100644 --- a/sdk/java/src/main/java/com/pulumi/mailgun/Route.java +++ b/sdk/java/src/main/java/com/pulumi/mailgun/Route.java @@ -38,24 +38,24 @@ * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * // Create a new Mailgun route * var default_ = new Route("default", RouteArgs.builder() * .priority("0") * .description("inbound") - * .expression("match_recipient('.*{@literal @}foo.example.com')") + * .expression("match_recipient('.*}{@literal @}{@code foo.example.com')") * .actions( * "forward('http://example.com/api/v1/foos/')", * "stop()") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> @@ -132,7 +132,7 @@ public Output> region() { * * @param name The _unique_ name of the resulting resource. */ - public Route(String name) { + public Route(java.lang.String name) { this(name, RouteArgs.Empty); } /** @@ -140,7 +140,7 @@ public Route(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Route(String name, RouteArgs args) { + public Route(java.lang.String name, RouteArgs args) { this(name, args, null); } /** @@ -149,15 +149,22 @@ public Route(String name, RouteArgs 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 Route(String name, RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/route:Route", name, args == null ? RouteArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Route(java.lang.String name, RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/route:Route", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private Route(java.lang.String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/route:Route", name, state, makeResourceOptions(options, id), false); } - private Route(String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/route:Route", name, state, makeResourceOptions(options, id)); + private static RouteArgs makeArgs(RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? RouteArgs.Empty : args; } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output 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(); @@ -173,7 +180,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Route get(String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Route get(java.lang.String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Route(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/mailgun/Utilities.java b/sdk/java/src/main/java/com/pulumi/mailgun/Utilities.java index a159271d..5a30433a 100644 --- a/sdk/java/src/main/java/com/pulumi/mailgun/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/mailgun/Utilities.java @@ -17,7 +17,7 @@ public class Utilities { - public static Optional getEnv(String... names) { + public static Optional getEnv(java.lang.String... names) { for (var n : names) { var value = Environment.getEnvironmentVariable(n); if (value.isValue()) { @@ -27,7 +27,7 @@ public static Optional getEnv(String... names) { return Optional.empty(); } - public static Optional getEnvBoolean(String... names) { + public static Optional getEnvBoolean(java.lang.String... names) { for (var n : names) { var value = Environment.getBooleanEnvironmentVariable(n); if (value.isValue()) { @@ -37,7 +37,7 @@ public static Optional getEnvBoolean(String... names) { return Optional.empty(); } - public static Optional getEnvInteger(String... names) { + public static Optional getEnvInteger(java.lang.String... names) { for (var n : names) { var value = Environment.getIntegerEnvironmentVariable(n); if (value.isValue()) { @@ -47,7 +47,7 @@ public static Optional getEnvInteger(String... names) { return Optional.empty(); } - public static Optional getEnvDouble(String... names) { + public static Optional getEnvDouble(java.lang.String... names) { for (var n : names) { var value = Environment.getDoubleEnvironmentVariable(n); if (value.isValue()) { @@ -68,8 +68,8 @@ public static InvokeOptions withVersion(@Nullable InvokeOptions options) { ); } - private static final String version; - public static String getVersion() { + private static final java.lang.String version; + public static java.lang.String getVersion() { return version; } @@ -78,7 +78,7 @@ public static String getVersion() { var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); if (versionFile == null) { throw new IllegalStateException( - String.format("expected resource '%s' on Classpath, not found", resourceName) + java.lang.String.format("expected resource '%s' on Classpath, not found", resourceName) ); } version = new BufferedReader(new InputStreamReader(versionFile)) diff --git a/sdk/java/src/main/java/com/pulumi/mailgun/Webhook.java b/sdk/java/src/main/java/com/pulumi/mailgun/Webhook.java index 41e60742..79509155 100644 --- a/sdk/java/src/main/java/com/pulumi/mailgun/Webhook.java +++ b/sdk/java/src/main/java/com/pulumi/mailgun/Webhook.java @@ -122,7 +122,7 @@ public Output> urls() { * * @param name The _unique_ name of the resulting resource. */ - public Webhook(String name) { + public Webhook(java.lang.String name) { this(name, WebhookArgs.Empty); } /** @@ -130,7 +130,7 @@ public Webhook(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Webhook(String name, WebhookArgs args) { + public Webhook(java.lang.String name, WebhookArgs args) { this(name, args, null); } /** @@ -139,15 +139,22 @@ public Webhook(String name, WebhookArgs 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 Webhook(String name, WebhookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/webhook:Webhook", name, args == null ? WebhookArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Webhook(java.lang.String name, WebhookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/webhook:Webhook", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Webhook(String name, Output id, @Nullable WebhookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("mailgun:index/webhook:Webhook", name, state, makeResourceOptions(options, id)); + private Webhook(java.lang.String name, Output id, @Nullable WebhookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("mailgun:index/webhook:Webhook", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static WebhookArgs makeArgs(WebhookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? WebhookArgs.Empty : args; + } + + 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(); @@ -163,7 +170,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Webhook get(String name, Output id, @Nullable WebhookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Webhook get(java.lang.String name, Output id, @Nullable WebhookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Webhook(name, id, state, options); } } diff --git a/sdk/python/pulumi_mailgun/domain.py b/sdk/python/pulumi_mailgun/domain.py index b82df42d..1ae59018 100644 --- a/sdk/python/pulumi_mailgun/domain.py +++ b/sdk/python/pulumi_mailgun/domain.py @@ -652,11 +652,11 @@ def get(resource_name: str, force_dkim_authority: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, open_tracking: Optional[pulumi.Input[bool]] = None, - receiving_records: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainReceivingRecordArgs']]]]] = None, - receiving_records_sets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainReceivingRecordsSetArgs']]]]] = None, + receiving_records: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainReceivingRecordArgs', 'DomainReceivingRecordArgsDict']]]]] = None, + receiving_records_sets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainReceivingRecordsSetArgs', 'DomainReceivingRecordsSetArgsDict']]]]] = None, region: Optional[pulumi.Input[str]] = None, - sending_records: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainSendingRecordArgs']]]]] = None, - sending_records_sets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainSendingRecordsSetArgs']]]]] = None, + sending_records: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainSendingRecordArgs', 'DomainSendingRecordArgsDict']]]]] = None, + sending_records_sets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainSendingRecordsSetArgs', 'DomainSendingRecordsSetArgsDict']]]]] = None, smtp_login: Optional[pulumi.Input[str]] = None, smtp_password: Optional[pulumi.Input[str]] = None, spam_action: Optional[pulumi.Input[str]] = None, @@ -675,11 +675,11 @@ def get(resource_name: str, :param pulumi.Input[bool] force_dkim_authority: If set to true, the domain will be the DKIM authority for itself even if the root domain is registered on the same mailgun account. If set to false, the domain will have the same DKIM authority as the root domain registered on the same mailgun account. The default is `false`. :param pulumi.Input[str] name: The domain to add to Mailgun :param pulumi.Input[bool] open_tracking: (Enum: `yes` or `no`) The open tracking settings for the domain. Default: `no` - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainReceivingRecordArgs']]]] receiving_records: A list of DNS records for receiving validation. **Deprecated** Use `receiving_records_set` instead. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainReceivingRecordsSetArgs']]]] receiving_records_sets: A set of DNS records for receiving validation. + :param pulumi.Input[Sequence[pulumi.Input[Union['DomainReceivingRecordArgs', 'DomainReceivingRecordArgsDict']]]] receiving_records: A list of DNS records for receiving validation. **Deprecated** Use `receiving_records_set` instead. + :param pulumi.Input[Sequence[pulumi.Input[Union['DomainReceivingRecordsSetArgs', 'DomainReceivingRecordsSetArgsDict']]]] receiving_records_sets: A set of DNS records for receiving validation. :param pulumi.Input[str] region: The region where domain will be created. Default value is `us`. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainSendingRecordArgs']]]] sending_records: A list of DNS records for sending validation. **Deprecated** Use `sending_records_set` instead. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DomainSendingRecordsSetArgs']]]] sending_records_sets: A set of DNS records for sending validation. + :param pulumi.Input[Sequence[pulumi.Input[Union['DomainSendingRecordArgs', 'DomainSendingRecordArgsDict']]]] sending_records: A list of DNS records for sending validation. **Deprecated** Use `sending_records_set` instead. + :param pulumi.Input[Sequence[pulumi.Input[Union['DomainSendingRecordsSetArgs', 'DomainSendingRecordsSetArgsDict']]]] sending_records_sets: A set of DNS records for sending validation. :param pulumi.Input[str] smtp_login: The login email for the SMTP server. :param pulumi.Input[str] smtp_password: Password for SMTP authentication :param pulumi.Input[str] spam_action: `disabled` or `tag` Disable, no spam