diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index d33c3a2..0548fb4 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 6c4e834..79664ce 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-splunk/examples 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 8ef9011..01fb8a5 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/cmd/pulumi-resource-minio/schema.json b/provider/cmd/pulumi-resource-minio/schema.json index f606567..9cdff16 100644 --- a/provider/cmd/pulumi-resource-minio/schema.json +++ b/provider/cmd/pulumi-resource-minio/schema.json @@ -932,7 +932,7 @@ } }, "minio:index/ilmPolicy:IlmPolicy": { - "description": "`minio.IlmPolicy` handles lifecycle settings for a given `minio.S3Bucket`.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst bucket = new minio.S3Bucket(\"bucket\", {bucket: \"bucket\"});\nconst bucket_lifecycle_rules = new minio.IlmPolicy(\"bucket-lifecycle-rules\", {\n bucket: bucket.bucket,\n rules: [{\n id: \"expire-7d\",\n expiration: \"7d\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nbucket = minio.S3Bucket(\"bucket\", bucket=\"bucket\")\nbucket_lifecycle_rules = minio.IlmPolicy(\"bucket-lifecycle-rules\",\n bucket=bucket.bucket,\n rules=[minio.IlmPolicyRuleArgs(\n id=\"expire-7d\",\n expiration=\"7d\",\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bucket = new Minio.S3Bucket(\"bucket\", new()\n {\n Bucket = \"bucket\",\n });\n\n var bucket_lifecycle_rules = new Minio.IlmPolicy(\"bucket-lifecycle-rules\", new()\n {\n Bucket = bucket.Bucket,\n Rules = new[]\n {\n new Minio.Inputs.IlmPolicyRuleArgs\n {\n Id = \"expire-7d\",\n Expiration = \"7d\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tbucket, err := minio.NewS3Bucket(ctx, \"bucket\", \u0026minio.S3BucketArgs{\n\t\t\tBucket: pulumi.String(\"bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = minio.NewIlmPolicy(ctx, \"bucket-lifecycle-rules\", \u0026minio.IlmPolicyArgs{\n\t\t\tBucket: bucket.Bucket,\n\t\t\tRules: minio.IlmPolicyRuleArray{\n\t\t\t\t\u0026minio.IlmPolicyRuleArgs{\n\t\t\t\t\tId: pulumi.String(\"expire-7d\"),\n\t\t\t\t\tExpiration: pulumi.String(\"7d\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.S3Bucket;\nimport com.pulumi.minio.S3BucketArgs;\nimport com.pulumi.minio.IlmPolicy;\nimport com.pulumi.minio.IlmPolicyArgs;\nimport com.pulumi.minio.inputs.IlmPolicyRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bucket = new S3Bucket(\"bucket\", S3BucketArgs.builder()\n .bucket(\"bucket\")\n .build());\n\n var bucket_lifecycle_rules = new IlmPolicy(\"bucket-lifecycle-rules\", IlmPolicyArgs.builder()\n .bucket(bucket.bucket())\n .rules(IlmPolicyRuleArgs.builder()\n .id(\"expire-7d\")\n .expiration(\"7d\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: minio:S3Bucket\n properties:\n bucket: bucket\n bucket-lifecycle-rules:\n type: minio:IlmPolicy\n properties:\n bucket: ${bucket.bucket}\n rules:\n - id: expire-7d\n expiration: 7d\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "`minio.IlmPolicy` handles lifecycle settings for a given `minio.S3Bucket`.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst bucket = new minio.S3Bucket(\"bucket\", {bucket: \"bucket\"});\nconst bucket_lifecycle_rules = new minio.IlmPolicy(\"bucket-lifecycle-rules\", {\n bucket: bucket.bucket,\n rules: [{\n id: \"expire-7d\",\n expiration: \"7d\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nbucket = minio.S3Bucket(\"bucket\", bucket=\"bucket\")\nbucket_lifecycle_rules = minio.IlmPolicy(\"bucket-lifecycle-rules\",\n bucket=bucket.bucket,\n rules=[{\n \"id\": \"expire-7d\",\n \"expiration\": \"7d\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bucket = new Minio.S3Bucket(\"bucket\", new()\n {\n Bucket = \"bucket\",\n });\n\n var bucket_lifecycle_rules = new Minio.IlmPolicy(\"bucket-lifecycle-rules\", new()\n {\n Bucket = bucket.Bucket,\n Rules = new[]\n {\n new Minio.Inputs.IlmPolicyRuleArgs\n {\n Id = \"expire-7d\",\n Expiration = \"7d\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tbucket, err := minio.NewS3Bucket(ctx, \"bucket\", \u0026minio.S3BucketArgs{\n\t\t\tBucket: pulumi.String(\"bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = minio.NewIlmPolicy(ctx, \"bucket-lifecycle-rules\", \u0026minio.IlmPolicyArgs{\n\t\t\tBucket: bucket.Bucket,\n\t\t\tRules: minio.IlmPolicyRuleArray{\n\t\t\t\t\u0026minio.IlmPolicyRuleArgs{\n\t\t\t\t\tId: pulumi.String(\"expire-7d\"),\n\t\t\t\t\tExpiration: pulumi.String(\"7d\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.S3Bucket;\nimport com.pulumi.minio.S3BucketArgs;\nimport com.pulumi.minio.IlmPolicy;\nimport com.pulumi.minio.IlmPolicyArgs;\nimport com.pulumi.minio.inputs.IlmPolicyRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bucket = new S3Bucket(\"bucket\", S3BucketArgs.builder()\n .bucket(\"bucket\")\n .build());\n\n var bucket_lifecycle_rules = new IlmPolicy(\"bucket-lifecycle-rules\", IlmPolicyArgs.builder()\n .bucket(bucket.bucket())\n .rules(IlmPolicyRuleArgs.builder()\n .id(\"expire-7d\")\n .expiration(\"7d\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: minio:S3Bucket\n properties:\n bucket: bucket\n bucket-lifecycle-rules:\n type: minio:IlmPolicy\n properties:\n bucket: ${bucket.bucket}\n rules:\n - id: expire-7d\n expiration: 7d\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "bucket": { "type": "string" @@ -1379,7 +1379,7 @@ }, "functions": { "minio:index/getIamPolicyDocument:getIamPolicyDocument": { - "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst example = minio.getIamPolicyDocument({\n statements: [\n {\n sid: \"1\",\n actions: [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources: [\"arn:aws:s3:::*\"],\n },\n {\n actions: [\"s3:ListBucket\"],\n resources: [\"arn:aws:s3:::state-terraform-s3\"],\n conditions: [{\n test: \"StringLike\",\n variable: \"s3:prefix\",\n values: [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n actions: [\"s3:PutObject\"],\n resources: [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n ],\n});\nconst testPolicy = new minio.IamPolicy(\"test_policy\", {\n name: \"state-terraform-s3\",\n policy: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nexample = minio.get_iam_policy_document(statements=[\n minio.GetIamPolicyDocumentStatementArgs(\n sid=\"1\",\n actions=[\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources=[\"arn:aws:s3:::*\"],\n ),\n minio.GetIamPolicyDocumentStatementArgs(\n actions=[\"s3:ListBucket\"],\n resources=[\"arn:aws:s3:::state-terraform-s3\"],\n conditions=[minio.GetIamPolicyDocumentStatementConditionArgs(\n test=\"StringLike\",\n variable=\"s3:prefix\",\n values=[\n \"\",\n \"home/\",\n ],\n )],\n ),\n minio.GetIamPolicyDocumentStatementArgs(\n actions=[\"s3:PutObject\"],\n resources=[\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n ),\n])\ntest_policy = minio.IamPolicy(\"test_policy\",\n name=\"state-terraform-s3\",\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Minio.GetIamPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::*\",\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:ListBucket\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n },\n Conditions = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringLike\",\n Variable = \"s3:prefix\",\n Values = new[]\n {\n \"\",\n \"home/\",\n },\n },\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n },\n },\n },\n });\n\n var testPolicy = new Minio.IamPolicy(\"test_policy\", new()\n {\n Name = \"state-terraform-s3\",\n Policy = example.Apply(getIamPolicyDocumentResult =\u003e getIamPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := minio.GetIamPolicyDocument(ctx, \u0026minio.GetIamPolicyDocumentArgs{\n\t\t\tStatements: []minio.GetIamPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:GetBucketLocation\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t},\n\t\t\t\t\tConditions: []minio.GetIamPolicyDocumentStatementCondition{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTest: \"StringLike\",\n\t\t\t\t\t\t\tVariable: \"s3:prefix\",\n\t\t\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"home/\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3/*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = minio.NewIamPolicy(ctx, \"test_policy\", \u0026minio.IamPolicyArgs{\n\t\t\tName: pulumi.String(\"state-terraform-s3\"),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.MinioFunctions;\nimport com.pulumi.minio.inputs.GetIamPolicyDocumentArgs;\nimport com.pulumi.minio.IamPolicy;\nimport com.pulumi.minio.IamPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = MinioFunctions.getIamPolicyDocument(GetIamPolicyDocumentArgs.builder()\n .statements( \n GetIamPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions( \n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\")\n .resources(\"arn:aws:s3:::*\")\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:ListBucket\")\n .resources(\"arn:aws:s3:::state-terraform-s3\")\n .conditions(GetIamPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringLike\")\n .variable(\"s3:prefix\")\n .values( \n \"\",\n \"home/\")\n .build())\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:PutObject\")\n .resources( \n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\")\n .build())\n .build());\n\n var testPolicy = new IamPolicy(\"testPolicy\", IamPolicyArgs.builder()\n .name(\"state-terraform-s3\")\n .policy(example.applyValue(getIamPolicyDocumentResult -\u003e getIamPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testPolicy:\n type: minio:IamPolicy\n name: test_policy\n properties:\n name: state-terraform-s3\n policy: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: minio:getIamPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListAllMyBuckets\n - s3:GetBucketLocation\n resources:\n - arn:aws:s3:::*\n - actions:\n - s3:ListBucket\n resources:\n - arn:aws:s3:::state-terraform-s3\n conditions:\n - test: StringLike\n variable: s3:prefix\n values:\n -\n - home/\n - actions:\n - s3:PutObject\n resources:\n - arn:aws:s3:::state-terraform-s3\n - arn:aws:s3:::state-terraform-s3/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst example = minio.getIamPolicyDocument({\n statements: [\n {\n sid: \"1\",\n actions: [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources: [\"arn:aws:s3:::*\"],\n },\n {\n actions: [\"s3:ListBucket\"],\n resources: [\"arn:aws:s3:::state-terraform-s3\"],\n conditions: [{\n test: \"StringLike\",\n variable: \"s3:prefix\",\n values: [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n actions: [\"s3:PutObject\"],\n resources: [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n ],\n});\nconst testPolicy = new minio.IamPolicy(\"test_policy\", {\n name: \"state-terraform-s3\",\n policy: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nexample = minio.get_iam_policy_document(statements=[\n {\n \"sid\": \"1\",\n \"actions\": [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n \"resources\": [\"arn:aws:s3:::*\"],\n },\n {\n \"actions\": [\"s3:ListBucket\"],\n \"resources\": [\"arn:aws:s3:::state-terraform-s3\"],\n \"conditions\": [{\n \"test\": \"StringLike\",\n \"variable\": \"s3:prefix\",\n \"values\": [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n])\ntest_policy = minio.IamPolicy(\"test_policy\",\n name=\"state-terraform-s3\",\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Minio.GetIamPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::*\",\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:ListBucket\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n },\n Conditions = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringLike\",\n Variable = \"s3:prefix\",\n Values = new[]\n {\n \"\",\n \"home/\",\n },\n },\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n },\n },\n },\n });\n\n var testPolicy = new Minio.IamPolicy(\"test_policy\", new()\n {\n Name = \"state-terraform-s3\",\n Policy = example.Apply(getIamPolicyDocumentResult =\u003e getIamPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := minio.GetIamPolicyDocument(ctx, \u0026minio.GetIamPolicyDocumentArgs{\n\t\t\tStatements: []minio.GetIamPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:GetBucketLocation\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t},\n\t\t\t\t\tConditions: []minio.GetIamPolicyDocumentStatementCondition{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTest: \"StringLike\",\n\t\t\t\t\t\t\tVariable: \"s3:prefix\",\n\t\t\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"home/\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3/*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = minio.NewIamPolicy(ctx, \"test_policy\", \u0026minio.IamPolicyArgs{\n\t\t\tName: pulumi.String(\"state-terraform-s3\"),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.MinioFunctions;\nimport com.pulumi.minio.inputs.GetIamPolicyDocumentArgs;\nimport com.pulumi.minio.IamPolicy;\nimport com.pulumi.minio.IamPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = MinioFunctions.getIamPolicyDocument(GetIamPolicyDocumentArgs.builder()\n .statements( \n GetIamPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions( \n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\")\n .resources(\"arn:aws:s3:::*\")\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:ListBucket\")\n .resources(\"arn:aws:s3:::state-terraform-s3\")\n .conditions(GetIamPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringLike\")\n .variable(\"s3:prefix\")\n .values( \n \"\",\n \"home/\")\n .build())\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:PutObject\")\n .resources( \n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\")\n .build())\n .build());\n\n var testPolicy = new IamPolicy(\"testPolicy\", IamPolicyArgs.builder()\n .name(\"state-terraform-s3\")\n .policy(example.applyValue(getIamPolicyDocumentResult -\u003e getIamPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testPolicy:\n type: minio:IamPolicy\n name: test_policy\n properties:\n name: state-terraform-s3\n policy: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: minio:getIamPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListAllMyBuckets\n - s3:GetBucketLocation\n resources:\n - arn:aws:s3:::*\n - actions:\n - s3:ListBucket\n resources:\n - arn:aws:s3:::state-terraform-s3\n conditions:\n - test: StringLike\n variable: s3:prefix\n values:\n -\n - home/\n - actions:\n - s3:PutObject\n resources:\n - arn:aws:s3:::state-terraform-s3\n - arn:aws:s3:::state-terraform-s3/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getIamPolicyDocument.\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index 8cf9f52..887d7bf 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -6,7 +6,7 @@ replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraf require ( github.com/aminueza/terraform-provider-minio v1.20.1 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0 ) require ( @@ -178,8 +178,8 @@ 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/sdk/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.128.0 // indirect + github.com/pulumi/pulumi/sdk/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 @@ -218,6 +218,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/yusufpapurcu/wmi v1.2.3 // indirect github.com/zclconf/go-cty v1.14.2 // indirect go.opencensus.io v0.24.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index 7a547c3..60dcf3a 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1937,16 +1937,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= @@ -2084,6 +2084,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/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= diff --git a/sdk/go.mod b/sdk/go.mod index 1a32446..c9d6c83 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 4a60806..6185e55 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 bc87d5d..05ef31d 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/minio/IamGroup.java b/sdk/java/src/main/java/com/pulumi/minio/IamGroup.java index 1cb22ee..707dc95 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamGroup.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamGroup.java @@ -92,7 +92,7 @@ public Output name() { * * @param name The _unique_ name of the resulting resource. */ - public IamGroup(String name) { + public IamGroup(java.lang.String name) { this(name, IamGroupArgs.Empty); } /** @@ -100,7 +100,7 @@ public IamGroup(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamGroup(String name, @Nullable IamGroupArgs args) { + public IamGroup(java.lang.String name, @Nullable IamGroupArgs args) { this(name, args, null); } /** @@ -109,15 +109,22 @@ public IamGroup(String name, @Nullable IamGroupArgs 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 IamGroup(String name, @Nullable IamGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroup:IamGroup", name, args == null ? IamGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamGroup(java.lang.String name, @Nullable IamGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroup:IamGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamGroup(String name, Output id, @Nullable IamGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroup:IamGroup", name, state, makeResourceOptions(options, id)); + private IamGroup(java.lang.String name, Output id, @Nullable IamGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroup:IamGroup", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamGroupArgs makeArgs(@Nullable IamGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamGroupArgs.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(); @@ -133,7 +140,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamGroup get(String name, Output id, @Nullable IamGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamGroup get(java.lang.String name, Output id, @Nullable IamGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamGroup(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamGroupMembership.java b/sdk/java/src/main/java/com/pulumi/minio/IamGroupMembership.java index fb9e933..93a8e3f 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamGroupMembership.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamGroupMembership.java @@ -63,7 +63,7 @@ public Output> users() { * * @param name The _unique_ name of the resulting resource. */ - public IamGroupMembership(String name) { + public IamGroupMembership(java.lang.String name) { this(name, IamGroupMembershipArgs.Empty); } /** @@ -71,7 +71,7 @@ public IamGroupMembership(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamGroupMembership(String name, IamGroupMembershipArgs args) { + public IamGroupMembership(java.lang.String name, IamGroupMembershipArgs args) { this(name, args, null); } /** @@ -80,15 +80,22 @@ public IamGroupMembership(String name, IamGroupMembershipArgs 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 IamGroupMembership(String name, IamGroupMembershipArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupMembership:IamGroupMembership", name, args == null ? IamGroupMembershipArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamGroupMembership(java.lang.String name, IamGroupMembershipArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupMembership:IamGroupMembership", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamGroupMembership(String name, Output id, @Nullable IamGroupMembershipState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupMembership:IamGroupMembership", name, state, makeResourceOptions(options, id)); + private IamGroupMembership(java.lang.String name, Output id, @Nullable IamGroupMembershipState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupMembership:IamGroupMembership", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamGroupMembershipArgs makeArgs(IamGroupMembershipArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamGroupMembershipArgs.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(); @@ -104,7 +111,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamGroupMembership get(String name, Output id, @Nullable IamGroupMembershipState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamGroupMembership get(java.lang.String name, Output id, @Nullable IamGroupMembershipState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamGroupMembership(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicy.java b/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicy.java index beeb958..72f9347 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicy.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicy.java @@ -106,7 +106,7 @@ public Output policy() { * * @param name The _unique_ name of the resulting resource. */ - public IamGroupPolicy(String name) { + public IamGroupPolicy(java.lang.String name) { this(name, IamGroupPolicyArgs.Empty); } /** @@ -114,7 +114,7 @@ public IamGroupPolicy(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamGroupPolicy(String name, IamGroupPolicyArgs args) { + public IamGroupPolicy(java.lang.String name, IamGroupPolicyArgs args) { this(name, args, null); } /** @@ -123,15 +123,22 @@ public IamGroupPolicy(String name, IamGroupPolicyArgs 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 IamGroupPolicy(String name, IamGroupPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupPolicy:IamGroupPolicy", name, args == null ? IamGroupPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamGroupPolicy(java.lang.String name, IamGroupPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupPolicy:IamGroupPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamGroupPolicy(String name, Output id, @Nullable IamGroupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupPolicy:IamGroupPolicy", name, state, makeResourceOptions(options, id)); + private IamGroupPolicy(java.lang.String name, Output id, @Nullable IamGroupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupPolicy:IamGroupPolicy", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamGroupPolicyArgs makeArgs(IamGroupPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamGroupPolicyArgs.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(); @@ -147,7 +154,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamGroupPolicy get(String name, Output id, @Nullable IamGroupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamGroupPolicy get(java.lang.String name, Output id, @Nullable IamGroupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamGroupPolicy(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicyAttachment.java b/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicyAttachment.java index c7eb003..dd929ca 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicyAttachment.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamGroupPolicyAttachment.java @@ -36,7 +36,7 @@ public Output policyName() { * * @param name The _unique_ name of the resulting resource. */ - public IamGroupPolicyAttachment(String name) { + public IamGroupPolicyAttachment(java.lang.String name) { this(name, IamGroupPolicyAttachmentArgs.Empty); } /** @@ -44,7 +44,7 @@ public IamGroupPolicyAttachment(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamGroupPolicyAttachment(String name, IamGroupPolicyAttachmentArgs args) { + public IamGroupPolicyAttachment(java.lang.String name, IamGroupPolicyAttachmentArgs args) { this(name, args, null); } /** @@ -53,15 +53,22 @@ public IamGroupPolicyAttachment(String name, IamGroupPolicyAttachmentArgs 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 IamGroupPolicyAttachment(String name, IamGroupPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupPolicyAttachment:IamGroupPolicyAttachment", name, args == null ? IamGroupPolicyAttachmentArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamGroupPolicyAttachment(java.lang.String name, IamGroupPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupPolicyAttachment:IamGroupPolicyAttachment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamGroupPolicyAttachment(String name, Output id, @Nullable IamGroupPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupPolicyAttachment:IamGroupPolicyAttachment", name, state, makeResourceOptions(options, id)); + private IamGroupPolicyAttachment(java.lang.String name, Output id, @Nullable IamGroupPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupPolicyAttachment:IamGroupPolicyAttachment", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamGroupPolicyAttachmentArgs makeArgs(IamGroupPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamGroupPolicyAttachmentArgs.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(); @@ -77,7 +84,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamGroupPolicyAttachment get(String name, Output id, @Nullable IamGroupPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamGroupPolicyAttachment get(java.lang.String name, Output id, @Nullable IamGroupPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamGroupPolicyAttachment(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamGroupUserAttachment.java b/sdk/java/src/main/java/com/pulumi/minio/IamGroupUserAttachment.java index eac6c2e..c37f79c 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamGroupUserAttachment.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamGroupUserAttachment.java @@ -85,7 +85,7 @@ public Output userName() { * * @param name The _unique_ name of the resulting resource. */ - public IamGroupUserAttachment(String name) { + public IamGroupUserAttachment(java.lang.String name) { this(name, IamGroupUserAttachmentArgs.Empty); } /** @@ -93,7 +93,7 @@ public IamGroupUserAttachment(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamGroupUserAttachment(String name, IamGroupUserAttachmentArgs args) { + public IamGroupUserAttachment(java.lang.String name, IamGroupUserAttachmentArgs args) { this(name, args, null); } /** @@ -102,15 +102,22 @@ public IamGroupUserAttachment(String name, IamGroupUserAttachmentArgs 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 IamGroupUserAttachment(String name, IamGroupUserAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupUserAttachment:IamGroupUserAttachment", name, args == null ? IamGroupUserAttachmentArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamGroupUserAttachment(java.lang.String name, IamGroupUserAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupUserAttachment:IamGroupUserAttachment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamGroupUserAttachment(String name, Output id, @Nullable IamGroupUserAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamGroupUserAttachment:IamGroupUserAttachment", name, state, makeResourceOptions(options, id)); + private IamGroupUserAttachment(java.lang.String name, Output id, @Nullable IamGroupUserAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamGroupUserAttachment:IamGroupUserAttachment", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamGroupUserAttachmentArgs makeArgs(IamGroupUserAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamGroupUserAttachmentArgs.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(); @@ -126,7 +133,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamGroupUserAttachment get(String name, Output id, @Nullable IamGroupUserAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamGroupUserAttachment get(java.lang.String name, Output id, @Nullable IamGroupUserAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamGroupUserAttachment(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamPolicy.java b/sdk/java/src/main/java/com/pulumi/minio/IamPolicy.java index 4794177..d017b90 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamPolicy.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamPolicy.java @@ -92,7 +92,7 @@ public Output policy() { * * @param name The _unique_ name of the resulting resource. */ - public IamPolicy(String name) { + public IamPolicy(java.lang.String name) { this(name, IamPolicyArgs.Empty); } /** @@ -100,7 +100,7 @@ public IamPolicy(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamPolicy(String name, IamPolicyArgs args) { + public IamPolicy(java.lang.String name, IamPolicyArgs args) { this(name, args, null); } /** @@ -109,15 +109,22 @@ public IamPolicy(String name, IamPolicyArgs 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 IamPolicy(String name, IamPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamPolicy:IamPolicy", name, args == null ? IamPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamPolicy(java.lang.String name, IamPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamPolicy:IamPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamPolicy(String name, Output id, @Nullable IamPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamPolicy:IamPolicy", name, state, makeResourceOptions(options, id)); + private IamPolicy(java.lang.String name, Output id, @Nullable IamPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamPolicy:IamPolicy", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamPolicyArgs makeArgs(IamPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamPolicyArgs.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(); @@ -133,7 +140,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamPolicy get(String name, Output id, @Nullable IamPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamPolicy get(java.lang.String name, Output id, @Nullable IamPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamPolicy(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamServiceAccount.java b/sdk/java/src/main/java/com/pulumi/minio/IamServiceAccount.java index 01ae9f4..46d8b7c 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamServiceAccount.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamServiceAccount.java @@ -136,7 +136,7 @@ public Output> updateSecret() { * * @param name The _unique_ name of the resulting resource. */ - public IamServiceAccount(String name) { + public IamServiceAccount(java.lang.String name) { this(name, IamServiceAccountArgs.Empty); } /** @@ -144,7 +144,7 @@ public IamServiceAccount(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamServiceAccount(String name, IamServiceAccountArgs args) { + public IamServiceAccount(java.lang.String name, IamServiceAccountArgs args) { this(name, args, null); } /** @@ -153,15 +153,22 @@ public IamServiceAccount(String name, IamServiceAccountArgs 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 IamServiceAccount(String name, IamServiceAccountArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamServiceAccount:IamServiceAccount", name, args == null ? IamServiceAccountArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamServiceAccount(java.lang.String name, IamServiceAccountArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamServiceAccount:IamServiceAccount", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamServiceAccount(String name, Output id, @Nullable IamServiceAccountState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamServiceAccount:IamServiceAccount", name, state, makeResourceOptions(options, id)); + private IamServiceAccount(java.lang.String name, Output id, @Nullable IamServiceAccountState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamServiceAccount:IamServiceAccount", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamServiceAccountArgs makeArgs(IamServiceAccountArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamServiceAccountArgs.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( @@ -180,7 +187,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamServiceAccount get(String name, Output id, @Nullable IamServiceAccountState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamServiceAccount get(java.lang.String name, Output id, @Nullable IamServiceAccountState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamServiceAccount(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamUser.java b/sdk/java/src/main/java/com/pulumi/minio/IamUser.java index 6edf51f..b5ee926 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamUser.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamUser.java @@ -125,7 +125,7 @@ public Output> updateSecret() { * * @param name The _unique_ name of the resulting resource. */ - public IamUser(String name) { + public IamUser(java.lang.String name) { this(name, IamUserArgs.Empty); } /** @@ -133,7 +133,7 @@ public IamUser(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamUser(String name, @Nullable IamUserArgs args) { + public IamUser(java.lang.String name, @Nullable IamUserArgs args) { this(name, args, null); } /** @@ -142,15 +142,22 @@ public IamUser(String name, @Nullable IamUserArgs 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 IamUser(String name, @Nullable IamUserArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamUser:IamUser", name, args == null ? IamUserArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamUser(java.lang.String name, @Nullable IamUserArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamUser:IamUser", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamUser(String name, Output id, @Nullable IamUserState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamUser:IamUser", name, state, makeResourceOptions(options, id)); + private IamUser(java.lang.String name, Output id, @Nullable IamUserState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamUser:IamUser", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamUserArgs makeArgs(@Nullable IamUserArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamUserArgs.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( @@ -169,7 +176,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamUser get(String name, Output id, @Nullable IamUserState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamUser get(java.lang.String name, Output id, @Nullable IamUserState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamUser(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IamUserPolicyAttachment.java b/sdk/java/src/main/java/com/pulumi/minio/IamUserPolicyAttachment.java index 38f9934..c4e375a 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IamUserPolicyAttachment.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IamUserPolicyAttachment.java @@ -36,7 +36,7 @@ public Output userName() { * * @param name The _unique_ name of the resulting resource. */ - public IamUserPolicyAttachment(String name) { + public IamUserPolicyAttachment(java.lang.String name) { this(name, IamUserPolicyAttachmentArgs.Empty); } /** @@ -44,7 +44,7 @@ public IamUserPolicyAttachment(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IamUserPolicyAttachment(String name, IamUserPolicyAttachmentArgs args) { + public IamUserPolicyAttachment(java.lang.String name, IamUserPolicyAttachmentArgs args) { this(name, args, null); } /** @@ -53,15 +53,22 @@ public IamUserPolicyAttachment(String name, IamUserPolicyAttachmentArgs 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 IamUserPolicyAttachment(String name, IamUserPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamUserPolicyAttachment:IamUserPolicyAttachment", name, args == null ? IamUserPolicyAttachmentArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IamUserPolicyAttachment(java.lang.String name, IamUserPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamUserPolicyAttachment:IamUserPolicyAttachment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IamUserPolicyAttachment(String name, Output id, @Nullable IamUserPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/iamUserPolicyAttachment:IamUserPolicyAttachment", name, state, makeResourceOptions(options, id)); + private IamUserPolicyAttachment(java.lang.String name, Output id, @Nullable IamUserPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/iamUserPolicyAttachment:IamUserPolicyAttachment", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IamUserPolicyAttachmentArgs makeArgs(IamUserPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IamUserPolicyAttachmentArgs.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(); @@ -77,7 +84,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IamUserPolicyAttachment get(String name, Output id, @Nullable IamUserPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IamUserPolicyAttachment get(java.lang.String name, Output id, @Nullable IamUserPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IamUserPolicyAttachment(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/IlmPolicy.java b/sdk/java/src/main/java/com/pulumi/minio/IlmPolicy.java index 9a2a4d1..1ba6cdd 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/IlmPolicy.java +++ b/sdk/java/src/main/java/com/pulumi/minio/IlmPolicy.java @@ -84,7 +84,7 @@ public Output> rules() { * * @param name The _unique_ name of the resulting resource. */ - public IlmPolicy(String name) { + public IlmPolicy(java.lang.String name) { this(name, IlmPolicyArgs.Empty); } /** @@ -92,7 +92,7 @@ public IlmPolicy(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public IlmPolicy(String name, IlmPolicyArgs args) { + public IlmPolicy(java.lang.String name, IlmPolicyArgs args) { this(name, args, null); } /** @@ -101,15 +101,22 @@ public IlmPolicy(String name, IlmPolicyArgs 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 IlmPolicy(String name, IlmPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/ilmPolicy:IlmPolicy", name, args == null ? IlmPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public IlmPolicy(java.lang.String name, IlmPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/ilmPolicy:IlmPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private IlmPolicy(String name, Output id, @Nullable IlmPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/ilmPolicy:IlmPolicy", name, state, makeResourceOptions(options, id)); + private IlmPolicy(java.lang.String name, Output id, @Nullable IlmPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/ilmPolicy:IlmPolicy", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static IlmPolicyArgs makeArgs(IlmPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IlmPolicyArgs.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(); @@ -125,7 +132,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static IlmPolicy get(String name, Output id, @Nullable IlmPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static IlmPolicy get(java.lang.String name, Output id, @Nullable IlmPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IlmPolicy(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/KmsKey.java b/sdk/java/src/main/java/com/pulumi/minio/KmsKey.java index d3ec404..1761de6 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/KmsKey.java +++ b/sdk/java/src/main/java/com/pulumi/minio/KmsKey.java @@ -26,7 +26,7 @@ public Output keyId() { * * @param name The _unique_ name of the resulting resource. */ - public KmsKey(String name) { + public KmsKey(java.lang.String name) { this(name, KmsKeyArgs.Empty); } /** @@ -34,7 +34,7 @@ public KmsKey(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public KmsKey(String name, KmsKeyArgs args) { + public KmsKey(java.lang.String name, KmsKeyArgs args) { this(name, args, null); } /** @@ -43,15 +43,22 @@ public KmsKey(String name, KmsKeyArgs 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 KmsKey(String name, KmsKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/kmsKey:KmsKey", name, args == null ? KmsKeyArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public KmsKey(java.lang.String name, KmsKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/kmsKey:KmsKey", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private KmsKey(String name, Output id, @Nullable KmsKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/kmsKey:KmsKey", name, state, makeResourceOptions(options, id)); + private KmsKey(java.lang.String name, Output id, @Nullable KmsKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/kmsKey:KmsKey", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static KmsKeyArgs makeArgs(KmsKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? KmsKeyArgs.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(); @@ -67,7 +74,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static KmsKey get(String name, Output id, @Nullable KmsKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static KmsKey get(java.lang.String name, Output id, @Nullable KmsKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new KmsKey(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/Provider.java b/sdk/java/src/main/java/com/pulumi/minio/Provider.java index 014c64c..70913e4 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/minio/Provider.java @@ -165,7 +165,7 @@ public Output> minioUser() { * * @param name The _unique_ name of the resulting resource. */ - public Provider(String name) { + public Provider(java.lang.String name) { this(name, ProviderArgs.Empty); } /** @@ -173,7 +173,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); } /** @@ -182,11 +182,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("minio", 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("minio", 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/minio/S3Bucket.java b/sdk/java/src/main/java/com/pulumi/minio/S3Bucket.java index d241ab1..412b596 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/S3Bucket.java +++ b/sdk/java/src/main/java/com/pulumi/minio/S3Bucket.java @@ -111,7 +111,7 @@ public Output> quota() { * * @param name The _unique_ name of the resulting resource. */ - public S3Bucket(String name) { + public S3Bucket(java.lang.String name) { this(name, S3BucketArgs.Empty); } /** @@ -119,7 +119,7 @@ public S3Bucket(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public S3Bucket(String name, @Nullable S3BucketArgs args) { + public S3Bucket(java.lang.String name, @Nullable S3BucketArgs args) { this(name, args, null); } /** @@ -128,15 +128,22 @@ public S3Bucket(String name, @Nullable S3BucketArgs 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 S3Bucket(String name, @Nullable S3BucketArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3Bucket:S3Bucket", name, args == null ? S3BucketArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public S3Bucket(java.lang.String name, @Nullable S3BucketArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3Bucket:S3Bucket", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private S3Bucket(String name, Output id, @Nullable S3BucketState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3Bucket:S3Bucket", name, state, makeResourceOptions(options, id)); + private S3Bucket(java.lang.String name, Output id, @Nullable S3BucketState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3Bucket:S3Bucket", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static S3BucketArgs makeArgs(@Nullable S3BucketArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? S3BucketArgs.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(); @@ -152,7 +159,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static S3Bucket get(String name, Output id, @Nullable S3BucketState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static S3Bucket get(java.lang.String name, Output id, @Nullable S3BucketState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new S3Bucket(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/S3BucketNotification.java b/sdk/java/src/main/java/com/pulumi/minio/S3BucketNotification.java index f840b8a..281423d 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/S3BucketNotification.java +++ b/sdk/java/src/main/java/com/pulumi/minio/S3BucketNotification.java @@ -35,7 +35,7 @@ public Output>> queues() { * * @param name The _unique_ name of the resulting resource. */ - public S3BucketNotification(String name) { + public S3BucketNotification(java.lang.String name) { this(name, S3BucketNotificationArgs.Empty); } /** @@ -43,7 +43,7 @@ public S3BucketNotification(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public S3BucketNotification(String name, S3BucketNotificationArgs args) { + public S3BucketNotification(java.lang.String name, S3BucketNotificationArgs args) { this(name, args, null); } /** @@ -52,15 +52,22 @@ public S3BucketNotification(String name, S3BucketNotificationArgs 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 S3BucketNotification(String name, S3BucketNotificationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketNotification:S3BucketNotification", name, args == null ? S3BucketNotificationArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public S3BucketNotification(java.lang.String name, S3BucketNotificationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketNotification:S3BucketNotification", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private S3BucketNotification(String name, Output id, @Nullable S3BucketNotificationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketNotification:S3BucketNotification", name, state, makeResourceOptions(options, id)); + private S3BucketNotification(java.lang.String name, Output id, @Nullable S3BucketNotificationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketNotification:S3BucketNotification", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static S3BucketNotificationArgs makeArgs(S3BucketNotificationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? S3BucketNotificationArgs.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(); @@ -76,7 +83,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static S3BucketNotification get(String name, Output id, @Nullable S3BucketNotificationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static S3BucketNotification get(java.lang.String name, Output id, @Nullable S3BucketNotificationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new S3BucketNotification(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/S3BucketPolicy.java b/sdk/java/src/main/java/com/pulumi/minio/S3BucketPolicy.java index e60e202..e5faa25 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/S3BucketPolicy.java +++ b/sdk/java/src/main/java/com/pulumi/minio/S3BucketPolicy.java @@ -32,7 +32,7 @@ public Output policy() { * * @param name The _unique_ name of the resulting resource. */ - public S3BucketPolicy(String name) { + public S3BucketPolicy(java.lang.String name) { this(name, S3BucketPolicyArgs.Empty); } /** @@ -40,7 +40,7 @@ public S3BucketPolicy(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public S3BucketPolicy(String name, S3BucketPolicyArgs args) { + public S3BucketPolicy(java.lang.String name, S3BucketPolicyArgs args) { this(name, args, null); } /** @@ -49,15 +49,22 @@ public S3BucketPolicy(String name, S3BucketPolicyArgs 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 S3BucketPolicy(String name, S3BucketPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketPolicy:S3BucketPolicy", name, args == null ? S3BucketPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public S3BucketPolicy(java.lang.String name, S3BucketPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketPolicy:S3BucketPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private S3BucketPolicy(String name, Output id, @Nullable S3BucketPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketPolicy:S3BucketPolicy", name, state, makeResourceOptions(options, id)); + private S3BucketPolicy(java.lang.String name, Output id, @Nullable S3BucketPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketPolicy:S3BucketPolicy", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static S3BucketPolicyArgs makeArgs(S3BucketPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? S3BucketPolicyArgs.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(); @@ -73,7 +80,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static S3BucketPolicy get(String name, Output id, @Nullable S3BucketPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static S3BucketPolicy get(java.lang.String name, Output id, @Nullable S3BucketPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new S3BucketPolicy(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/S3BucketServerSideEncryption.java b/sdk/java/src/main/java/com/pulumi/minio/S3BucketServerSideEncryption.java index c2888cf..7ec24d3 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/S3BucketServerSideEncryption.java +++ b/sdk/java/src/main/java/com/pulumi/minio/S3BucketServerSideEncryption.java @@ -38,7 +38,7 @@ public Output kmsKeyId() { * * @param name The _unique_ name of the resulting resource. */ - public S3BucketServerSideEncryption(String name) { + public S3BucketServerSideEncryption(java.lang.String name) { this(name, S3BucketServerSideEncryptionArgs.Empty); } /** @@ -46,7 +46,7 @@ public S3BucketServerSideEncryption(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public S3BucketServerSideEncryption(String name, S3BucketServerSideEncryptionArgs args) { + public S3BucketServerSideEncryption(java.lang.String name, S3BucketServerSideEncryptionArgs args) { this(name, args, null); } /** @@ -55,15 +55,22 @@ public S3BucketServerSideEncryption(String name, S3BucketServerSideEncryptionArg * @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 S3BucketServerSideEncryption(String name, S3BucketServerSideEncryptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketServerSideEncryption:S3BucketServerSideEncryption", name, args == null ? S3BucketServerSideEncryptionArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public S3BucketServerSideEncryption(java.lang.String name, S3BucketServerSideEncryptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketServerSideEncryption:S3BucketServerSideEncryption", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private S3BucketServerSideEncryption(String name, Output id, @Nullable S3BucketServerSideEncryptionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketServerSideEncryption:S3BucketServerSideEncryption", name, state, makeResourceOptions(options, id)); + private S3BucketServerSideEncryption(java.lang.String name, Output id, @Nullable S3BucketServerSideEncryptionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketServerSideEncryption:S3BucketServerSideEncryption", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static S3BucketServerSideEncryptionArgs makeArgs(S3BucketServerSideEncryptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? S3BucketServerSideEncryptionArgs.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(); @@ -79,7 +86,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static S3BucketServerSideEncryption get(String name, Output id, @Nullable S3BucketServerSideEncryptionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static S3BucketServerSideEncryption get(java.lang.String name, Output id, @Nullable S3BucketServerSideEncryptionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new S3BucketServerSideEncryption(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/S3BucketVersioning.java b/sdk/java/src/main/java/com/pulumi/minio/S3BucketVersioning.java index 461d013..441e1a6 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/S3BucketVersioning.java +++ b/sdk/java/src/main/java/com/pulumi/minio/S3BucketVersioning.java @@ -33,7 +33,7 @@ public Output versioningConfiguration * * @param name The _unique_ name of the resulting resource. */ - public S3BucketVersioning(String name) { + public S3BucketVersioning(java.lang.String name) { this(name, S3BucketVersioningArgs.Empty); } /** @@ -41,7 +41,7 @@ public S3BucketVersioning(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public S3BucketVersioning(String name, S3BucketVersioningArgs args) { + public S3BucketVersioning(java.lang.String name, S3BucketVersioningArgs args) { this(name, args, null); } /** @@ -50,15 +50,22 @@ public S3BucketVersioning(String name, S3BucketVersioningArgs 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 S3BucketVersioning(String name, S3BucketVersioningArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketVersioning:S3BucketVersioning", name, args == null ? S3BucketVersioningArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public S3BucketVersioning(java.lang.String name, S3BucketVersioningArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketVersioning:S3BucketVersioning", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private S3BucketVersioning(String name, Output id, @Nullable S3BucketVersioningState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3BucketVersioning:S3BucketVersioning", name, state, makeResourceOptions(options, id)); + private S3BucketVersioning(java.lang.String name, Output id, @Nullable S3BucketVersioningState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3BucketVersioning:S3BucketVersioning", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static S3BucketVersioningArgs makeArgs(S3BucketVersioningArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? S3BucketVersioningArgs.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(); @@ -74,7 +81,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static S3BucketVersioning get(String name, Output id, @Nullable S3BucketVersioningState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static S3BucketVersioning get(java.lang.String name, Output id, @Nullable S3BucketVersioningState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new S3BucketVersioning(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/S3Object.java b/sdk/java/src/main/java/com/pulumi/minio/S3Object.java index 5443514..6dace70 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/S3Object.java +++ b/sdk/java/src/main/java/com/pulumi/minio/S3Object.java @@ -120,7 +120,7 @@ public Output versionId() { * * @param name The _unique_ name of the resulting resource. */ - public S3Object(String name) { + public S3Object(java.lang.String name) { this(name, S3ObjectArgs.Empty); } /** @@ -128,7 +128,7 @@ public S3Object(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public S3Object(String name, S3ObjectArgs args) { + public S3Object(java.lang.String name, S3ObjectArgs args) { this(name, args, null); } /** @@ -137,15 +137,22 @@ public S3Object(String name, S3ObjectArgs 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 S3Object(String name, S3ObjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3Object:S3Object", name, args == null ? S3ObjectArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public S3Object(java.lang.String name, S3ObjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3Object:S3Object", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private S3Object(String name, Output id, @Nullable S3ObjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("minio:index/s3Object:S3Object", name, state, makeResourceOptions(options, id)); + private S3Object(java.lang.String name, Output id, @Nullable S3ObjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("minio:index/s3Object:S3Object", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static S3ObjectArgs makeArgs(S3ObjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? S3ObjectArgs.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(); @@ -161,7 +168,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static S3Object get(String name, Output id, @Nullable S3ObjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static S3Object get(java.lang.String name, Output id, @Nullable S3ObjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new S3Object(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/minio/Utilities.java b/sdk/java/src/main/java/com/pulumi/minio/Utilities.java index e169e38..b9245c9 100644 --- a/sdk/java/src/main/java/com/pulumi/minio/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/minio/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/python/pulumi_minio/get_iam_policy_document.py b/sdk/python/pulumi_minio/get_iam_policy_document.py index 08ba41e..0b3ea20 100644 --- a/sdk/python/pulumi_minio/get_iam_policy_document.py +++ b/sdk/python/pulumi_minio/get_iam_policy_document.py @@ -103,7 +103,7 @@ def __await__(self): def get_iam_policy_document(override_json: Optional[str] = None, policy_id: Optional[str] = None, source_json: Optional[str] = None, - statements: Optional[Sequence[pulumi.InputType['GetIamPolicyDocumentStatementArgs']]] = None, + statements: Optional[Sequence[Union['GetIamPolicyDocumentStatementArgs', 'GetIamPolicyDocumentStatementArgsDict']]] = None, version: Optional[str] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetIamPolicyDocumentResult: """ @@ -114,33 +114,33 @@ def get_iam_policy_document(override_json: Optional[str] = None, import pulumi_minio as minio example = minio.get_iam_policy_document(statements=[ - minio.GetIamPolicyDocumentStatementArgs( - sid="1", - actions=[ + { + "sid": "1", + "actions": [ "s3:ListAllMyBuckets", "s3:GetBucketLocation", ], - resources=["arn:aws:s3:::*"], - ), - minio.GetIamPolicyDocumentStatementArgs( - actions=["s3:ListBucket"], - resources=["arn:aws:s3:::state-terraform-s3"], - conditions=[minio.GetIamPolicyDocumentStatementConditionArgs( - test="StringLike", - variable="s3:prefix", - values=[ + "resources": ["arn:aws:s3:::*"], + }, + { + "actions": ["s3:ListBucket"], + "resources": ["arn:aws:s3:::state-terraform-s3"], + "conditions": [{ + "test": "StringLike", + "variable": "s3:prefix", + "values": [ "", "home/", ], - )], - ), - minio.GetIamPolicyDocumentStatementArgs( - actions=["s3:PutObject"], - resources=[ + }], + }, + { + "actions": ["s3:PutObject"], + "resources": [ "arn:aws:s3:::state-terraform-s3", "arn:aws:s3:::state-terraform-s3/*", ], - ), + }, ]) test_policy = minio.IamPolicy("test_policy", name="state-terraform-s3", @@ -170,7 +170,7 @@ def get_iam_policy_document(override_json: Optional[str] = None, def get_iam_policy_document_output(override_json: Optional[pulumi.Input[Optional[str]]] = None, policy_id: Optional[pulumi.Input[Optional[str]]] = None, source_json: Optional[pulumi.Input[Optional[str]]] = None, - statements: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetIamPolicyDocumentStatementArgs']]]]] = None, + statements: Optional[pulumi.Input[Optional[Sequence[Union['GetIamPolicyDocumentStatementArgs', 'GetIamPolicyDocumentStatementArgsDict']]]]] = None, version: Optional[pulumi.Input[Optional[str]]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetIamPolicyDocumentResult]: """ @@ -181,33 +181,33 @@ def get_iam_policy_document_output(override_json: Optional[pulumi.Input[Optional import pulumi_minio as minio example = minio.get_iam_policy_document(statements=[ - minio.GetIamPolicyDocumentStatementArgs( - sid="1", - actions=[ + { + "sid": "1", + "actions": [ "s3:ListAllMyBuckets", "s3:GetBucketLocation", ], - resources=["arn:aws:s3:::*"], - ), - minio.GetIamPolicyDocumentStatementArgs( - actions=["s3:ListBucket"], - resources=["arn:aws:s3:::state-terraform-s3"], - conditions=[minio.GetIamPolicyDocumentStatementConditionArgs( - test="StringLike", - variable="s3:prefix", - values=[ + "resources": ["arn:aws:s3:::*"], + }, + { + "actions": ["s3:ListBucket"], + "resources": ["arn:aws:s3:::state-terraform-s3"], + "conditions": [{ + "test": "StringLike", + "variable": "s3:prefix", + "values": [ "", "home/", ], - )], - ), - minio.GetIamPolicyDocumentStatementArgs( - actions=["s3:PutObject"], - resources=[ + }], + }, + { + "actions": ["s3:PutObject"], + "resources": [ "arn:aws:s3:::state-terraform-s3", "arn:aws:s3:::state-terraform-s3/*", ], - ), + }, ]) test_policy = minio.IamPolicy("test_policy", name="state-terraform-s3", diff --git a/sdk/python/pulumi_minio/ilm_policy.py b/sdk/python/pulumi_minio/ilm_policy.py index 50ea70b..c3e1e4e 100644 --- a/sdk/python/pulumi_minio/ilm_policy.py +++ b/sdk/python/pulumi_minio/ilm_policy.py @@ -81,7 +81,7 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['IlmPolicyRuleArgs']]]]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['IlmPolicyRuleArgs', 'IlmPolicyRuleArgsDict']]]]] = None, __props__=None): """ `IlmPolicy` handles lifecycle settings for a given `S3Bucket`. @@ -95,10 +95,10 @@ def __init__(__self__, bucket = minio.S3Bucket("bucket", bucket="bucket") bucket_lifecycle_rules = minio.IlmPolicy("bucket-lifecycle-rules", bucket=bucket.bucket, - rules=[minio.IlmPolicyRuleArgs( - id="expire-7d", - expiration="7d", - )]) + rules=[{ + "id": "expire-7d", + "expiration": "7d", + }]) ``` :param str resource_name: The name of the resource. @@ -122,10 +122,10 @@ def __init__(__self__, bucket = minio.S3Bucket("bucket", bucket="bucket") bucket_lifecycle_rules = minio.IlmPolicy("bucket-lifecycle-rules", bucket=bucket.bucket, - rules=[minio.IlmPolicyRuleArgs( - id="expire-7d", - expiration="7d", - )]) + rules=[{ + "id": "expire-7d", + "expiration": "7d", + }]) ``` :param str resource_name: The name of the resource. @@ -144,7 +144,7 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['IlmPolicyRuleArgs']]]]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['IlmPolicyRuleArgs', 'IlmPolicyRuleArgsDict']]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -171,7 +171,7 @@ def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['IlmPolicyRuleArgs']]]]] = None) -> 'IlmPolicy': + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['IlmPolicyRuleArgs', 'IlmPolicyRuleArgsDict']]]]] = None) -> 'IlmPolicy': """ Get an existing IlmPolicy resource's state with the given name, id, and optional extra properties used to qualify the lookup. diff --git a/sdk/python/pulumi_minio/s3_bucket_notification.py b/sdk/python/pulumi_minio/s3_bucket_notification.py index ed4c9d1..5a45856 100644 --- a/sdk/python/pulumi_minio/s3_bucket_notification.py +++ b/sdk/python/pulumi_minio/s3_bucket_notification.py @@ -82,7 +82,7 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - queues: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['S3BucketNotificationQueueArgs']]]]] = None, + queues: Optional[pulumi.Input[Sequence[pulumi.Input[Union['S3BucketNotificationQueueArgs', 'S3BucketNotificationQueueArgsDict']]]]] = None, __props__=None): """ Create a S3BucketNotification resource with the given unique name, props, and options. @@ -113,7 +113,7 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - queues: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['S3BucketNotificationQueueArgs']]]]] = None, + queues: Optional[pulumi.Input[Sequence[pulumi.Input[Union['S3BucketNotificationQueueArgs', 'S3BucketNotificationQueueArgsDict']]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -138,7 +138,7 @@ def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - queues: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['S3BucketNotificationQueueArgs']]]]] = None) -> 'S3BucketNotification': + queues: Optional[pulumi.Input[Sequence[pulumi.Input[Union['S3BucketNotificationQueueArgs', 'S3BucketNotificationQueueArgsDict']]]]] = None) -> 'S3BucketNotification': """ Get an existing S3BucketNotification resource's state with the given name, id, and optional extra properties used to qualify the lookup. diff --git a/sdk/python/pulumi_minio/s3_bucket_versioning.py b/sdk/python/pulumi_minio/s3_bucket_versioning.py index b793654..0ce7d12 100644 --- a/sdk/python/pulumi_minio/s3_bucket_versioning.py +++ b/sdk/python/pulumi_minio/s3_bucket_versioning.py @@ -81,7 +81,7 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - versioning_configuration: Optional[pulumi.Input[pulumi.InputType['S3BucketVersioningVersioningConfigurationArgs']]] = None, + versioning_configuration: Optional[pulumi.Input[Union['S3BucketVersioningVersioningConfigurationArgs', 'S3BucketVersioningVersioningConfigurationArgsDict']]] = None, __props__=None): """ Create a S3BucketVersioning resource with the given unique name, props, and options. @@ -112,7 +112,7 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - versioning_configuration: Optional[pulumi.Input[pulumi.InputType['S3BucketVersioningVersioningConfigurationArgs']]] = None, + versioning_configuration: Optional[pulumi.Input[Union['S3BucketVersioningVersioningConfigurationArgs', 'S3BucketVersioningVersioningConfigurationArgsDict']]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -139,7 +139,7 @@ def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, bucket: Optional[pulumi.Input[str]] = None, - versioning_configuration: Optional[pulumi.Input[pulumi.InputType['S3BucketVersioningVersioningConfigurationArgs']]] = None) -> 'S3BucketVersioning': + versioning_configuration: Optional[pulumi.Input[Union['S3BucketVersioningVersioningConfigurationArgs', 'S3BucketVersioningVersioningConfigurationArgsDict']]] = None) -> 'S3BucketVersioning': """ Get an existing S3BucketVersioning resource's state with the given name, id, and optional extra properties used to qualify the lookup.