From 1a84ecdb3b0c738cb7924e502bc34783370e7122 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Thu, 20 Feb 2025 03:11:57 +0000 Subject: [PATCH 1/2] make tfgen --- .../bridge-metadata.json | 26 ++ .../cmd/pulumi-resource-aiven/schema.json | 239 +++++++++++++++++- upstream | 2 +- 3 files changed, 260 insertions(+), 7 deletions(-) diff --git a/provider/cmd/pulumi-resource-aiven/bridge-metadata.json b/provider/cmd/pulumi-resource-aiven/bridge-metadata.json index a22afcd4..8f6a6b54 100644 --- a/provider/cmd/pulumi-resource-aiven/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-aiven/bridge-metadata.json @@ -1469,6 +1469,18 @@ } } }, + "aiven_organization_project": { + "current": "aiven:index/organizationProject:OrganizationProject", + "majorVersion": 6, + "fields": { + "tag": { + "maxItemsOne": false + }, + "technical_emails": { + "maxItemsOne": false + } + } + }, "aiven_organization_user": { "current": "aiven:index/organizationUser:OrganizationUser", "majorVersion": 6 @@ -3551,6 +3563,18 @@ "current": "aiven:index/getOrganizationApplicationUser:getOrganizationApplicationUser", "majorVersion": 6 }, + "aiven_organization_project": { + "current": "aiven:index/getOrganizationProject:getOrganizationProject", + "majorVersion": 6, + "fields": { + "tag": { + "maxItemsOne": false + }, + "technical_emails": { + "maxItemsOne": false + } + } + }, "aiven_organization_user": { "current": "aiven:index/getOrganizationUser:getOrganizationUser", "majorVersion": 6 @@ -4310,6 +4334,7 @@ "aiven:index/organizationApplicationUserToken:OrganizationApplicationUserToken": 0, "aiven:index/organizationGroupProject:OrganizationGroupProject": 1, "aiven:index/organizationPermission:OrganizationPermission": 0, + "aiven:index/organizationProject:OrganizationProject": 0, "aiven:index/organizationUser:OrganizationUser": 0, "aiven:index/organizationUserGroup:OrganizationUserGroup": 0, "aiven:index/organizationUserGroupMember:OrganizationUserGroupMember": 1, @@ -4386,6 +4411,7 @@ "aiven:index/getOpensearchUser:getOpensearchUser": 0, "aiven:index/getOrganization:getOrganization": 1, "aiven:index/getOrganizationApplicationUser:getOrganizationApplicationUser": 0, + "aiven:index/getOrganizationProject:getOrganizationProject": 0, "aiven:index/getOrganizationUser:getOrganizationUser": 0, "aiven:index/getOrganizationUserGroup:getOrganizationUserGroup": 0, "aiven:index/getOrganizationUserList:getOrganizationUserList": 0, diff --git a/provider/cmd/pulumi-resource-aiven/schema.json b/provider/cmd/pulumi-resource-aiven/schema.json index fe6c6b9a..fadd721c 100644 --- a/provider/cmd/pulumi-resource-aiven/schema.json +++ b/provider/cmd/pulumi-resource-aiven/schema.json @@ -7303,6 +7303,23 @@ } } }, + "aiven:index/OrganizationProjectTag:OrganizationProjectTag": { + "properties": { + "key": { + "type": "string", + "description": "Project tag key.\n" + }, + "value": { + "type": "string", + "description": "Project tag value.\n" + } + }, + "type": "object", + "required": [ + "key", + "value" + ] + }, "aiven:index/OrganizationTimeouts:OrganizationTimeouts": { "properties": { "create": { @@ -18216,6 +18233,28 @@ } } }, + "aiven:index/getOrganizationProjectTag:getOrganizationProjectTag": { + "properties": { + "key": { + "type": "string", + "description": "Project tag key.\n" + }, + "value": { + "type": "string", + "description": "Project tag value.\n" + } + }, + "type": "object", + "required": [ + "key", + "value" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "aiven:index/getOrganizationUserListUser:getOrganizationUserListUser": { "properties": { "isSuperAdmin": { @@ -21792,7 +21831,7 @@ }, "resources": { "aiven:index/account:Account": { - "description": "Creates and manages an Aiven account.\n\n\u003e **This resource is deprecated**.\n\nThis resource will be removed in v5.0.0. Use `aiven.Organization` instead.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst account1 = new aiven.Account(\"account1\", {name: \"\u003cACCOUNT_NAME\u003e\"});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\naccount1 = aiven.Account(\"account1\", name=\"\u003cACCOUNT_NAME\u003e\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var account1 = new Aiven.Account(\"account1\", new()\n {\n Name = \"\u003cACCOUNT_NAME\u003e\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.NewAccount(ctx, \"account1\", \u0026aiven.AccountArgs{\n\t\t\tName: pulumi.String(\"\u003cACCOUNT_NAME\u003e\"),\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.aiven.Account;\nimport com.pulumi.aiven.AccountArgs;\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 account1 = new Account(\"account1\", AccountArgs.builder()\n .name(\"\u003cACCOUNT_NAME\u003e\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n account1:\n type: aiven:Account\n properties:\n name: \u003cACCOUNT_NAME\u003e\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import aiven:index/account:Account account1 account_id\n```\n\n", + "description": "Creates and manages an Aiven account.\n\n\u003e **This resource is deprecated**\nThis resource will be removed in v5.0.0. Use `aiven.Organization` instead.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst account1 = new aiven.Account(\"account1\", {name: \"\u003cACCOUNT_NAME\u003e\"});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\naccount1 = aiven.Account(\"account1\", name=\"\u003cACCOUNT_NAME\u003e\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var account1 = new Aiven.Account(\"account1\", new()\n {\n Name = \"\u003cACCOUNT_NAME\u003e\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.NewAccount(ctx, \"account1\", \u0026aiven.AccountArgs{\n\t\t\tName: pulumi.String(\"\u003cACCOUNT_NAME\u003e\"),\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.aiven.Account;\nimport com.pulumi.aiven.AccountArgs;\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 account1 = new Account(\"account1\", AccountArgs.builder()\n .name(\"\u003cACCOUNT_NAME\u003e\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n account1:\n type: aiven:Account\n properties:\n name: \u003cACCOUNT_NAME\u003e\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import aiven:index/account:Account account1 account_id\n```\n\n", "properties": { "accountId": { "type": "string", @@ -21897,7 +21936,7 @@ } }, "aiven:index/accountAuthentication:AccountAuthentication": { - "description": "Creates and manages an authentication method.\n\n\u003e **This resource is deprecated**.\n\nTo set up an identity provider as an authentication method for your organization,\n[use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers).\nIt guides you through the steps and explains the settings.\n\n## Import\n\n```sh\n$ pulumi import aiven:index/accountAuthentication:AccountAuthentication foo ACCOUNT_ID/AUTHENTICATION_ID\n```\n\n", + "description": "Creates and manages an authentication method.\n\n\u003e **This resource is deprecated**\nTo set up an identity provider as an authentication method for your organization,\n[use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers).\nIt guides you through the steps and explains the settings.\n\n## Import\n\n```sh\n$ pulumi import aiven:index/accountAuthentication:AccountAuthentication foo ACCOUNT_ID/AUTHENTICATION_ID\n```\n\n", "properties": { "accountId": { "type": "string", @@ -33334,6 +33373,124 @@ "type": "object" } }, + "aiven:index/organizationProject:OrganizationProject": { + "description": "Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). \n\n**This resource is in the beta stage and may change without notice.** Set\nthe `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst foo = new aiven.OrganizationProject(\"foo\", {\n projectId: \"example-project\",\n organizationId: fooAivenOrganization.id,\n billingGroupId: fooAivenBillingGroup.id,\n tags: [{\n key: \"key_1\",\n value: \"value_1\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\nfoo = aiven.OrganizationProject(\"foo\",\n project_id=\"example-project\",\n organization_id=foo_aiven_organization[\"id\"],\n billing_group_id=foo_aiven_billing_group[\"id\"],\n tags=[{\n \"key\": \"key_1\",\n \"value\": \"value_1\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = new Aiven.OrganizationProject(\"foo\", new()\n {\n ProjectId = \"example-project\",\n OrganizationId = fooAivenOrganization.Id,\n BillingGroupId = fooAivenBillingGroup.Id,\n Tags = new[]\n {\n new Aiven.Inputs.OrganizationProjectTagArgs\n {\n Key = \"key_1\",\n Value = \"value_1\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.NewOrganizationProject(ctx, \"foo\", \u0026aiven.OrganizationProjectArgs{\n\t\t\tProjectId: pulumi.String(\"example-project\"),\n\t\t\tOrganizationId: pulumi.Any(fooAivenOrganization.Id),\n\t\t\tBillingGroupId: pulumi.Any(fooAivenBillingGroup.Id),\n\t\t\tTags: aiven.OrganizationProjectTagArray{\n\t\t\t\t\u0026aiven.OrganizationProjectTagArgs{\n\t\t\t\t\tKey: pulumi.String(\"key_1\"),\n\t\t\t\t\tValue: pulumi.String(\"value_1\"),\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.aiven.OrganizationProject;\nimport com.pulumi.aiven.OrganizationProjectArgs;\nimport com.pulumi.aiven.inputs.OrganizationProjectTagArgs;\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 foo = new OrganizationProject(\"foo\", OrganizationProjectArgs.builder()\n .projectId(\"example-project\")\n .organizationId(fooAivenOrganization.id())\n .billingGroupId(fooAivenBillingGroup.id())\n .tags(OrganizationProjectTagArgs.builder()\n .key(\"key_1\")\n .value(\"value_1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aiven:OrganizationProject\n properties:\n projectId: example-project\n organizationId: ${fooAivenOrganization.id}\n billingGroupId: ${fooAivenBillingGroup.id}\n tags:\n - key: key_1\n value: value_1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID\n```\n\n", + "properties": { + "billingGroupId": { + "type": "string", + "description": "Billing group ID to assign to the project.\n" + }, + "organizationId": { + "type": "string", + "description": "ID of an organization. Changing this property forces recreation of the resource.\n" + }, + "parentId": { + "type": "string", + "description": "Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference.\n" + }, + "projectId": { + "type": "string", + "description": "Unique identifier for the project that also serves as the project name.\n" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/types/aiven:index/OrganizationProjectTag:OrganizationProjectTag" + }, + "description": "Tags are key-value pairs that allow you to categorize projects.\n" + }, + "technicalEmails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project.\n" + } + }, + "required": [ + "billingGroupId", + "organizationId", + "parentId", + "projectId" + ], + "inputProperties": { + "billingGroupId": { + "type": "string", + "description": "Billing group ID to assign to the project.\n" + }, + "organizationId": { + "type": "string", + "description": "ID of an organization. Changing this property forces recreation of the resource.\n", + "willReplaceOnChanges": true + }, + "parentId": { + "type": "string", + "description": "Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference.\n" + }, + "projectId": { + "type": "string", + "description": "Unique identifier for the project that also serves as the project name.\n", + "willReplaceOnChanges": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/types/aiven:index/OrganizationProjectTag:OrganizationProjectTag" + }, + "description": "Tags are key-value pairs that allow you to categorize projects.\n" + }, + "technicalEmails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project.\n" + } + }, + "requiredInputs": [ + "billingGroupId", + "organizationId", + "projectId" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering OrganizationProject resources.\n", + "properties": { + "billingGroupId": { + "type": "string", + "description": "Billing group ID to assign to the project.\n" + }, + "organizationId": { + "type": "string", + "description": "ID of an organization. Changing this property forces recreation of the resource.\n", + "willReplaceOnChanges": true + }, + "parentId": { + "type": "string", + "description": "Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference.\n" + }, + "projectId": { + "type": "string", + "description": "Unique identifier for the project that also serves as the project name.\n", + "willReplaceOnChanges": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/types/aiven:index/OrganizationProjectTag:OrganizationProjectTag" + }, + "description": "Tags are key-value pairs that allow you to categorize projects.\n" + }, + "technicalEmails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project.\n" + } + }, + "type": "object" + } + }, "aiven:index/organizationUser:OrganizationUser": { "properties": { "accepted": { @@ -34505,7 +34662,7 @@ } }, "aiven:index/projectUser:ProjectUser": { - "description": "Creates and manages an Aiven project member.\n\n**This resource is deprecated.** Use `aiven.OrganizationPermission` and\nmigrate existing aiven.ProjectUser resources \nto the new resource.\n\t\t\n\n\u003e **This resource is deprecated**.\n\nUse `aiven.OrganizationPermission` instead.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst mytestuser = new aiven.ProjectUser(\"mytestuser\", {\n project: myproject.project,\n email: \"john.doe@example.com\",\n memberType: \"admin\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\nmytestuser = aiven.ProjectUser(\"mytestuser\",\n project=myproject[\"project\"],\n email=\"john.doe@example.com\",\n member_type=\"admin\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mytestuser = new Aiven.ProjectUser(\"mytestuser\", new()\n {\n Project = myproject.Project,\n Email = \"john.doe@example.com\",\n MemberType = \"admin\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.NewProjectUser(ctx, \"mytestuser\", \u0026aiven.ProjectUserArgs{\n\t\t\tProject: pulumi.Any(myproject.Project),\n\t\t\tEmail: pulumi.String(\"john.doe@example.com\"),\n\t\t\tMemberType: pulumi.String(\"admin\"),\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.aiven.ProjectUser;\nimport com.pulumi.aiven.ProjectUserArgs;\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 mytestuser = new ProjectUser(\"mytestuser\", ProjectUserArgs.builder()\n .project(myproject.project())\n .email(\"john.doe@example.com\")\n .memberType(\"admin\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mytestuser:\n type: aiven:ProjectUser\n properties:\n project: ${myproject.project}\n email: john.doe@example.com\n memberType: admin\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import aiven:index/projectUser:ProjectUser mytestuser PROJECT/EMAIL\n```\n\n", + "description": "Creates and manages an Aiven project member.\n\n\u003e **This resource is deprecated**\nUse `aiven.OrganizationPermission` instead and\nmigrate existing `aiven.ProjectUser` resources \nto the new resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst mytestuser = new aiven.ProjectUser(\"mytestuser\", {\n project: myproject.project,\n email: \"john.doe@example.com\",\n memberType: \"admin\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\nmytestuser = aiven.ProjectUser(\"mytestuser\",\n project=myproject[\"project\"],\n email=\"john.doe@example.com\",\n member_type=\"admin\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mytestuser = new Aiven.ProjectUser(\"mytestuser\", new()\n {\n Project = myproject.Project,\n Email = \"john.doe@example.com\",\n MemberType = \"admin\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.NewProjectUser(ctx, \"mytestuser\", \u0026aiven.ProjectUserArgs{\n\t\t\tProject: pulumi.Any(myproject.Project),\n\t\t\tEmail: pulumi.String(\"john.doe@example.com\"),\n\t\t\tMemberType: pulumi.String(\"admin\"),\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.aiven.ProjectUser;\nimport com.pulumi.aiven.ProjectUserArgs;\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 mytestuser = new ProjectUser(\"mytestuser\", ProjectUserArgs.builder()\n .project(myproject.project())\n .email(\"john.doe@example.com\")\n .memberType(\"admin\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mytestuser:\n type: aiven:ProjectUser\n properties:\n project: ${myproject.project}\n email: john.doe@example.com\n memberType: admin\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import aiven:index/projectUser:ProjectUser mytestuser PROJECT/EMAIL\n```\n\n", "properties": { "accepted": { "type": "boolean", @@ -37058,7 +37215,7 @@ }, "functions": { "aiven:index/getAccount:getAccount": { - "description": "The Account data source provides information about the existing Aiven Account.\n\n\u003e **This resource is deprecated**.\n\nThis resource will be removed in v5.0.0. Use `aiven.Organization` instead.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst account1 = aiven.getAccount({\n name: \"\u003cACCOUNT_NAME\u003e\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\naccount1 = aiven.get_account(name=\"\u003cACCOUNT_NAME\u003e\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var account1 = Aiven.GetAccount.Invoke(new()\n {\n Name = \"\u003cACCOUNT_NAME\u003e\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.LookupAccount(ctx, \u0026aiven.LookupAccountArgs{\n\t\t\tName: \"\u003cACCOUNT_NAME\u003e\",\n\t\t}, nil)\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.aiven.AivenFunctions;\nimport com.pulumi.aiven.inputs.GetAccountArgs;\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 account1 = AivenFunctions.getAccount(GetAccountArgs.builder()\n .name(\"\u003cACCOUNT_NAME\u003e\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n account1:\n fn::invoke:\n function: aiven:getAccount\n arguments:\n name: \u003cACCOUNT_NAME\u003e\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The Account data source provides information about the existing Aiven Account.\n\n\u003e **This resource is deprecated**\nThis resource will be removed in v5.0.0. Use `aiven.Organization` instead.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst account1 = aiven.getAccount({\n name: \"\u003cACCOUNT_NAME\u003e\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\naccount1 = aiven.get_account(name=\"\u003cACCOUNT_NAME\u003e\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var account1 = Aiven.GetAccount.Invoke(new()\n {\n Name = \"\u003cACCOUNT_NAME\u003e\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.LookupAccount(ctx, \u0026aiven.LookupAccountArgs{\n\t\t\tName: \"\u003cACCOUNT_NAME\u003e\",\n\t\t}, nil)\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.aiven.AivenFunctions;\nimport com.pulumi.aiven.inputs.GetAccountArgs;\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 account1 = AivenFunctions.getAccount(GetAccountArgs.builder()\n .name(\"\u003cACCOUNT_NAME\u003e\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n account1:\n fn::invoke:\n function: aiven:getAccount\n arguments:\n name: \u003cACCOUNT_NAME\u003e\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getAccount.\n", "properties": { @@ -37127,7 +37284,7 @@ } }, "aiven:index/getAccountAuthentication:getAccountAuthentication": { - "description": "The Account Authentication data source provides information about the existing Aiven Account Authentication.\n\n\u003e **This resource is deprecated**.\n\nThis resource is deprecated\n\n", + "description": "The Account Authentication data source provides information about the existing Aiven Account Authentication.\n\n\u003e **This resource is deprecated**\nThis resource is deprecated\n\n", "inputs": { "description": "A collection of arguments for invoking getAccountAuthentication.\n", "properties": { @@ -43024,6 +43181,76 @@ "type": "object" } }, + "aiven:index/getOrganizationProject:getOrganizationProject": { + "description": "Gets information about an Aiven project. \n\n**This resource is in the beta stage and may change without notice.** Set\nthe `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst example = aiven.getOrganizationProject({\n projectId: foo.projectId,\n organizationId: foo.organizationId,\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\nexample = aiven.get_organization_project(project_id=foo[\"projectId\"],\n organization_id=foo[\"organizationId\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aiven.GetOrganizationProject.Invoke(new()\n {\n ProjectId = foo.ProjectId,\n OrganizationId = foo.OrganizationId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.LookupOrganizationProject(ctx, \u0026aiven.LookupOrganizationProjectArgs{\n\t\t\tProjectId: foo.ProjectId,\n\t\t\tOrganizationId: foo.OrganizationId,\n\t\t}, nil)\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.aiven.AivenFunctions;\nimport com.pulumi.aiven.inputs.GetOrganizationProjectArgs;\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 = AivenFunctions.getOrganizationProject(GetOrganizationProjectArgs.builder()\n .projectId(foo.projectId())\n .organizationId(foo.organizationId())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n function: aiven:getOrganizationProject\n arguments:\n projectId: ${foo.projectId}\n organizationId: ${foo.organizationId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "inputs": { + "description": "A collection of arguments for invoking getOrganizationProject.\n", + "properties": { + "organizationId": { + "type": "string", + "description": "ID of an organization. Changing this property forces recreation of the resource.\n" + }, + "projectId": { + "type": "string", + "description": "Unique identifier for the project that also serves as the project name.\n" + } + }, + "type": "object", + "required": [ + "organizationId", + "projectId" + ] + }, + "outputs": { + "description": "A collection of values returned by getOrganizationProject.\n", + "properties": { + "billingGroupId": { + "description": "Billing group ID to assign to the project.\n", + "type": "string" + }, + "id": { + "description": "The provider-assigned unique ID for this managed resource.\n", + "type": "string" + }, + "organizationId": { + "description": "ID of an organization. Changing this property forces recreation of the resource.\n", + "type": "string" + }, + "parentId": { + "description": "Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference.\n", + "type": "string" + }, + "projectId": { + "description": "Unique identifier for the project that also serves as the project name.\n", + "type": "string" + }, + "tags": { + "description": "Tags are key-value pairs that allow you to categorize projects.\n", + "items": { + "$ref": "#/types/aiven:index/getOrganizationProjectTag:getOrganizationProjectTag" + }, + "type": "array" + }, + "technicalEmails": { + "description": "The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project.\n", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "billingGroupId", + "organizationId", + "parentId", + "projectId", + "tags", + "technicalEmails", + "id" + ], + "type": "object" + } + }, "aiven:index/getOrganizationUser:getOrganizationUser": { "inputs": { "description": "A collection of arguments for invoking getOrganizationUser.\n", @@ -43692,7 +43919,7 @@ } }, "aiven:index/getProjectUser:getProjectUser": { - "description": "The Project User data source provides information about the existing Aiven Project User.\n\n\u003e **This resource is deprecated**.\n\nUse `aiven.OrganizationPermission` instead.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst mytestuser = aiven.getProjectUser({\n project: myproject.project,\n email: \"john.doe@example.com\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\nmytestuser = aiven.get_project_user(project=myproject[\"project\"],\n email=\"john.doe@example.com\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mytestuser = Aiven.GetProjectUser.Invoke(new()\n {\n Project = myproject.Project,\n Email = \"john.doe@example.com\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.LookupProjectUser(ctx, \u0026aiven.LookupProjectUserArgs{\n\t\t\tProject: myproject.Project,\n\t\t\tEmail: \"john.doe@example.com\",\n\t\t}, nil)\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.aiven.AivenFunctions;\nimport com.pulumi.aiven.inputs.GetProjectUserArgs;\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 mytestuser = AivenFunctions.getProjectUser(GetProjectUserArgs.builder()\n .project(myproject.project())\n .email(\"john.doe@example.com\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n mytestuser:\n fn::invoke:\n function: aiven:getProjectUser\n arguments:\n project: ${myproject.project}\n email: john.doe@example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The Project User data source provides information about the existing Aiven Project User.\n\n\u003e **This resource is deprecated**\nUse `aiven.OrganizationPermission` instead and\nmigrate existing `aiven.ProjectUser` resources \nto the new resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aiven from \"@pulumi/aiven\";\n\nconst mytestuser = aiven.getProjectUser({\n project: myproject.project,\n email: \"john.doe@example.com\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aiven as aiven\n\nmytestuser = aiven.get_project_user(project=myproject[\"project\"],\n email=\"john.doe@example.com\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aiven = Pulumi.Aiven;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mytestuser = Aiven.GetProjectUser.Invoke(new()\n {\n Project = myproject.Project,\n Email = \"john.doe@example.com\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aiven.LookupProjectUser(ctx, \u0026aiven.LookupProjectUserArgs{\n\t\t\tProject: myproject.Project,\n\t\t\tEmail: \"john.doe@example.com\",\n\t\t}, nil)\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.aiven.AivenFunctions;\nimport com.pulumi.aiven.inputs.GetProjectUserArgs;\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 mytestuser = AivenFunctions.getProjectUser(GetProjectUserArgs.builder()\n .project(myproject.project())\n .email(\"john.doe@example.com\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n mytestuser:\n fn::invoke:\n function: aiven:getProjectUser\n arguments:\n project: ${myproject.project}\n email: john.doe@example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getProjectUser.\n", "properties": { diff --git a/upstream b/upstream index 109a2f41..c5094e31 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 109a2f414cc6280544e9cb6256f06151c3ddf343 +Subproject commit c5094e313bd562e10d51c54b09ca79145638c053 From 958b3daf3cc3fa9c938e2bda3e9fd8bac08e0235 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Thu, 20 Feb 2025 03:14:09 +0000 Subject: [PATCH 2/2] make build_sdks --- sdk/dotnet/Account.cs | 3 +- sdk/dotnet/AccountAuthentication.cs | 3 +- sdk/dotnet/GetAccount.cs | 9 +- sdk/dotnet/GetAccountAuthentication.cs | 9 +- sdk/dotnet/GetOrganizationProject.cs | 198 ++++++++ sdk/dotnet/GetProjectUser.cs | 21 +- .../Inputs/OrganizationProjectTagArgs.cs | 32 ++ .../Inputs/OrganizationProjectTagGetArgs.cs | 32 ++ sdk/dotnet/OrganizationProject.cs | 246 ++++++++++ .../GetOrganizationProjectTagResult.cs | 35 ++ sdk/dotnet/Outputs/OrganizationProjectTag.cs | 35 ++ sdk/dotnet/ProjectUser.cs | 9 +- sdk/go/aiven/account.go | 3 +- sdk/go/aiven/accountAuthentication.go | 3 +- sdk/go/aiven/getAccount.go | 3 +- sdk/go/aiven/getAccountAuthentication.go | 3 +- sdk/go/aiven/getOrganizationProject.go | 154 ++++++ sdk/go/aiven/getProjectUser.go | 7 +- sdk/go/aiven/init.go | 7 + sdk/go/aiven/organizationProject.go | 343 ++++++++++++++ sdk/go/aiven/projectUser.go | 9 +- sdk/go/aiven/pulumiTypes.go | 403 +++++----------- sdk/go/aiven/pulumiTypes1.go | 403 ++++++++++++++++ .../main/java/com/pulumi/aiven/Account.java | 3 +- .../pulumi/aiven/AccountAuthentication.java | 3 +- .../java/com/pulumi/aiven/AivenFunctions.java | 298 ++++++++++-- .../com/pulumi/aiven/OrganizationProject.java | 216 +++++++++ .../pulumi/aiven/OrganizationProjectArgs.java | 300 ++++++++++++ .../java/com/pulumi/aiven/ProjectUser.java | 9 +- .../inputs/GetOrganizationProjectArgs.java | 125 +++++ .../GetOrganizationProjectPlainArgs.java | 104 +++++ .../inputs/OrganizationProjectState.java | 290 ++++++++++++ .../inputs/OrganizationProjectTagArgs.java | 125 +++++ .../outputs/GetOrganizationProjectResult.java | 204 ++++++++ .../outputs/GetOrganizationProjectTag.java | 81 ++++ .../aiven/outputs/OrganizationProjectTag.java | 81 ++++ sdk/nodejs/account.ts | 3 +- sdk/nodejs/accountAuthentication.ts | 3 +- sdk/nodejs/getAccount.ts | 6 +- sdk/nodejs/getAccountAuthentication.ts | 6 +- sdk/nodejs/getOrganizationProject.ts | 120 +++++ sdk/nodejs/getProjectUser.ts | 14 +- sdk/nodejs/index.ts | 13 + sdk/nodejs/organizationProject.ts | 191 ++++++++ sdk/nodejs/projectUser.ts | 9 +- sdk/nodejs/tsconfig.json | 2 + sdk/nodejs/types/input.ts | 11 + sdk/nodejs/types/output.ts | 22 + sdk/python/pulumi_aiven/__init__.py | 10 + sdk/python/pulumi_aiven/_inputs.py | 52 +++ sdk/python/pulumi_aiven/account.py | 6 +- .../pulumi_aiven/account_authentication.py | 6 +- sdk/python/pulumi_aiven/get_account.py | 6 +- .../get_account_authentication.py | 6 +- .../pulumi_aiven/get_organization_project.py | 197 ++++++++ sdk/python/pulumi_aiven/get_project_user.py | 14 +- .../pulumi_aiven/organization_project.py | 440 ++++++++++++++++++ sdk/python/pulumi_aiven/outputs.py | 60 +++ sdk/python/pulumi_aiven/project_user.py | 18 +- 59 files changed, 4580 insertions(+), 444 deletions(-) create mode 100644 sdk/dotnet/GetOrganizationProject.cs create mode 100644 sdk/dotnet/Inputs/OrganizationProjectTagArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationProjectTagGetArgs.cs create mode 100644 sdk/dotnet/OrganizationProject.cs create mode 100644 sdk/dotnet/Outputs/GetOrganizationProjectTagResult.cs create mode 100644 sdk/dotnet/Outputs/OrganizationProjectTag.cs create mode 100644 sdk/go/aiven/getOrganizationProject.go create mode 100644 sdk/go/aiven/organizationProject.go create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/OrganizationProject.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/OrganizationProjectArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectPlainArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectState.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectTagArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectResult.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectTag.java create mode 100644 sdk/java/src/main/java/com/pulumi/aiven/outputs/OrganizationProjectTag.java create mode 100644 sdk/nodejs/getOrganizationProject.ts create mode 100644 sdk/nodejs/organizationProject.ts create mode 100644 sdk/python/pulumi_aiven/get_organization_project.py create mode 100644 sdk/python/pulumi_aiven/organization_project.py diff --git a/sdk/dotnet/Account.cs b/sdk/dotnet/Account.cs index 6500d46f..868790da 100644 --- a/sdk/dotnet/Account.cs +++ b/sdk/dotnet/Account.cs @@ -12,8 +12,7 @@ namespace Pulumi.Aiven /// /// Creates and manages an Aiven account. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource will be removed in v5.0.0. Use `aiven.Organization` instead. /// /// ## Example Usage diff --git a/sdk/dotnet/AccountAuthentication.cs b/sdk/dotnet/AccountAuthentication.cs index 5fd2a3fa..41738f6a 100644 --- a/sdk/dotnet/AccountAuthentication.cs +++ b/sdk/dotnet/AccountAuthentication.cs @@ -12,8 +12,7 @@ namespace Pulumi.Aiven /// /// Creates and manages an authentication method. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// To set up an identity provider as an authentication method for your organization, /// [use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers). /// It guides you through the steps and explains the settings. diff --git a/sdk/dotnet/GetAccount.cs b/sdk/dotnet/GetAccount.cs index a40f0edf..4df20d13 100644 --- a/sdk/dotnet/GetAccount.cs +++ b/sdk/dotnet/GetAccount.cs @@ -14,8 +14,7 @@ public static class GetAccount /// /// The Account data source provides information about the existing Aiven Account. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource will be removed in v5.0.0. Use `aiven.Organization` instead. /// /// ## Example Usage @@ -42,8 +41,7 @@ public static Task InvokeAsync(GetAccountArgs args, InvokeOpti /// /// The Account data source provides information about the existing Aiven Account. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource will be removed in v5.0.0. Use `aiven.Organization` instead. /// /// ## Example Usage @@ -70,8 +68,7 @@ public static Output Invoke(GetAccountInvokeArgs args, InvokeO /// /// The Account data source provides information about the existing Aiven Account. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource will be removed in v5.0.0. Use `aiven.Organization` instead. /// /// ## Example Usage diff --git a/sdk/dotnet/GetAccountAuthentication.cs b/sdk/dotnet/GetAccountAuthentication.cs index e3a1f749..9e7529de 100644 --- a/sdk/dotnet/GetAccountAuthentication.cs +++ b/sdk/dotnet/GetAccountAuthentication.cs @@ -14,8 +14,7 @@ public static class GetAccountAuthentication /// /// The Account Authentication data source provides information about the existing Aiven Account Authentication. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource is deprecated /// public static Task InvokeAsync(GetAccountAuthenticationArgs args, InvokeOptions? options = null) @@ -24,8 +23,7 @@ public static Task InvokeAsync(GetAccountAuthent /// /// The Account Authentication data source provides information about the existing Aiven Account Authentication. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource is deprecated /// public static Output Invoke(GetAccountAuthenticationInvokeArgs args, InvokeOptions? options = null) @@ -34,8 +32,7 @@ public static Output Invoke(GetAccountAuthentica /// /// The Account Authentication data source provides information about the existing Aiven Account Authentication. /// - /// > **This resource is deprecated**. - /// + /// > **This resource is deprecated** /// This resource is deprecated /// public static Output Invoke(GetAccountAuthenticationInvokeArgs args, InvokeOutputOptions options) diff --git a/sdk/dotnet/GetOrganizationProject.cs b/sdk/dotnet/GetOrganizationProject.cs new file mode 100644 index 00000000..03717ce1 --- /dev/null +++ b/sdk/dotnet/GetOrganizationProject.cs @@ -0,0 +1,198 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Aiven +{ + public static class GetOrganizationProject + { + /// + /// Gets information about an Aiven project. + /// + /// **This resource is in the beta stage and may change without notice.** Set + /// the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Aiven = Pulumi.Aiven; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Aiven.GetOrganizationProject.Invoke(new() + /// { + /// ProjectId = foo.ProjectId, + /// OrganizationId = foo.OrganizationId, + /// }); + /// + /// }); + /// ``` + /// + public static Task InvokeAsync(GetOrganizationProjectArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("aiven:index/getOrganizationProject:getOrganizationProject", args ?? new GetOrganizationProjectArgs(), options.WithDefaults()); + + /// + /// Gets information about an Aiven project. + /// + /// **This resource is in the beta stage and may change without notice.** Set + /// the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Aiven = Pulumi.Aiven; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Aiven.GetOrganizationProject.Invoke(new() + /// { + /// ProjectId = foo.ProjectId, + /// OrganizationId = foo.OrganizationId, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetOrganizationProjectInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("aiven:index/getOrganizationProject:getOrganizationProject", args ?? new GetOrganizationProjectInvokeArgs(), options.WithDefaults()); + + /// + /// Gets information about an Aiven project. + /// + /// **This resource is in the beta stage and may change without notice.** Set + /// the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Aiven = Pulumi.Aiven; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Aiven.GetOrganizationProject.Invoke(new() + /// { + /// ProjectId = foo.ProjectId, + /// OrganizationId = foo.OrganizationId, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetOrganizationProjectInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("aiven:index/getOrganizationProject:getOrganizationProject", args ?? new GetOrganizationProjectInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetOrganizationProjectArgs : global::Pulumi.InvokeArgs + { + /// + /// ID of an organization. Changing this property forces recreation of the resource. + /// + [Input("organizationId", required: true)] + public string OrganizationId { get; set; } = null!; + + /// + /// Unique identifier for the project that also serves as the project name. + /// + [Input("projectId", required: true)] + public string ProjectId { get; set; } = null!; + + public GetOrganizationProjectArgs() + { + } + public static new GetOrganizationProjectArgs Empty => new GetOrganizationProjectArgs(); + } + + public sealed class GetOrganizationProjectInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// ID of an organization. Changing this property forces recreation of the resource. + /// + [Input("organizationId", required: true)] + public Input OrganizationId { get; set; } = null!; + + /// + /// Unique identifier for the project that also serves as the project name. + /// + [Input("projectId", required: true)] + public Input ProjectId { get; set; } = null!; + + public GetOrganizationProjectInvokeArgs() + { + } + public static new GetOrganizationProjectInvokeArgs Empty => new GetOrganizationProjectInvokeArgs(); + } + + + [OutputType] + public sealed class GetOrganizationProjectResult + { + /// + /// Billing group ID to assign to the project. + /// + public readonly string BillingGroupId; + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + /// + /// ID of an organization. Changing this property forces recreation of the resource. + /// + public readonly string OrganizationId; + /// + /// Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + /// + public readonly string ParentId; + /// + /// Unique identifier for the project that also serves as the project name. + /// + public readonly string ProjectId; + /// + /// Tags are key-value pairs that allow you to categorize projects. + /// + public readonly ImmutableArray Tags; + /// + /// The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + /// + public readonly ImmutableArray TechnicalEmails; + + [OutputConstructor] + private GetOrganizationProjectResult( + string billingGroupId, + + string id, + + string organizationId, + + string parentId, + + string projectId, + + ImmutableArray tags, + + ImmutableArray technicalEmails) + { + BillingGroupId = billingGroupId; + Id = id; + OrganizationId = organizationId; + ParentId = parentId; + ProjectId = projectId; + Tags = tags; + TechnicalEmails = technicalEmails; + } + } +} diff --git a/sdk/dotnet/GetProjectUser.cs b/sdk/dotnet/GetProjectUser.cs index e7863bb0..b8850265 100644 --- a/sdk/dotnet/GetProjectUser.cs +++ b/sdk/dotnet/GetProjectUser.cs @@ -14,9 +14,10 @@ public static class GetProjectUser /// /// The Project User data source provides information about the existing Aiven Project User. /// - /// > **This resource is deprecated**. - /// - /// Use `aiven.OrganizationPermission` instead. + /// > **This resource is deprecated** + /// Use `aiven.OrganizationPermission` instead and + /// migrate existing `aiven.ProjectUser` resources + /// to the new resource. /// /// ## Example Usage /// @@ -43,9 +44,10 @@ public static Task InvokeAsync(GetProjectUserArgs args, In /// /// The Project User data source provides information about the existing Aiven Project User. /// - /// > **This resource is deprecated**. - /// - /// Use `aiven.OrganizationPermission` instead. + /// > **This resource is deprecated** + /// Use `aiven.OrganizationPermission` instead and + /// migrate existing `aiven.ProjectUser` resources + /// to the new resource. /// /// ## Example Usage /// @@ -72,9 +74,10 @@ public static Output Invoke(GetProjectUserInvokeArgs args, /// /// The Project User data source provides information about the existing Aiven Project User. /// - /// > **This resource is deprecated**. - /// - /// Use `aiven.OrganizationPermission` instead. + /// > **This resource is deprecated** + /// Use `aiven.OrganizationPermission` instead and + /// migrate existing `aiven.ProjectUser` resources + /// to the new resource. /// /// ## Example Usage /// diff --git a/sdk/dotnet/Inputs/OrganizationProjectTagArgs.cs b/sdk/dotnet/Inputs/OrganizationProjectTagArgs.cs new file mode 100644 index 00000000..6a1cf181 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationProjectTagArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Aiven.Inputs +{ + + public sealed class OrganizationProjectTagArgs : global::Pulumi.ResourceArgs + { + /// + /// Project tag key. + /// + [Input("key", required: true)] + public Input Key { get; set; } = null!; + + /// + /// Project tag value. + /// + [Input("value", required: true)] + public Input Value { get; set; } = null!; + + public OrganizationProjectTagArgs() + { + } + public static new OrganizationProjectTagArgs Empty => new OrganizationProjectTagArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationProjectTagGetArgs.cs b/sdk/dotnet/Inputs/OrganizationProjectTagGetArgs.cs new file mode 100644 index 00000000..75f1d2a9 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationProjectTagGetArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Aiven.Inputs +{ + + public sealed class OrganizationProjectTagGetArgs : global::Pulumi.ResourceArgs + { + /// + /// Project tag key. + /// + [Input("key", required: true)] + public Input Key { get; set; } = null!; + + /// + /// Project tag value. + /// + [Input("value", required: true)] + public Input Value { get; set; } = null!; + + public OrganizationProjectTagGetArgs() + { + } + public static new OrganizationProjectTagGetArgs Empty => new OrganizationProjectTagGetArgs(); + } +} diff --git a/sdk/dotnet/OrganizationProject.cs b/sdk/dotnet/OrganizationProject.cs new file mode 100644 index 00000000..b6d43fb9 --- /dev/null +++ b/sdk/dotnet/OrganizationProject.cs @@ -0,0 +1,246 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Aiven +{ + /// + /// Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). + /// + /// **This resource is in the beta stage and may change without notice.** Set + /// the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Aiven = Pulumi.Aiven; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new Aiven.OrganizationProject("foo", new() + /// { + /// ProjectId = "example-project", + /// OrganizationId = fooAivenOrganization.Id, + /// BillingGroupId = fooAivenBillingGroup.Id, + /// Tags = new[] + /// { + /// new Aiven.Inputs.OrganizationProjectTagArgs + /// { + /// Key = "key_1", + /// Value = "value_1", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// ```sh + /// $ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID + /// ``` + /// + [AivenResourceType("aiven:index/organizationProject:OrganizationProject")] + public partial class OrganizationProject : global::Pulumi.CustomResource + { + /// + /// Billing group ID to assign to the project. + /// + [Output("billingGroupId")] + public Output BillingGroupId { get; private set; } = null!; + + /// + /// ID of an organization. Changing this property forces recreation of the resource. + /// + [Output("organizationId")] + public Output OrganizationId { get; private set; } = null!; + + /// + /// Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + /// + [Output("parentId")] + public Output ParentId { get; private set; } = null!; + + /// + /// Unique identifier for the project that also serves as the project name. + /// + [Output("projectId")] + public Output ProjectId { get; private set; } = null!; + + /// + /// Tags are key-value pairs that allow you to categorize projects. + /// + [Output("tags")] + public Output> Tags { get; private set; } = null!; + + /// + /// The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + /// + [Output("technicalEmails")] + public Output> TechnicalEmails { get; private set; } = null!; + + + /// + /// Create a OrganizationProject resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public OrganizationProject(string name, OrganizationProjectArgs args, CustomResourceOptions? options = null) + : base("aiven:index/organizationProject:OrganizationProject", name, args ?? new OrganizationProjectArgs(), MakeResourceOptions(options, "")) + { + } + + private OrganizationProject(string name, Input id, OrganizationProjectState? state = null, CustomResourceOptions? options = null) + : base("aiven:index/organizationProject:OrganizationProject", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing OrganizationProject resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static OrganizationProject Get(string name, Input id, OrganizationProjectState? state = null, CustomResourceOptions? options = null) + { + return new OrganizationProject(name, id, state, options); + } + } + + public sealed class OrganizationProjectArgs : global::Pulumi.ResourceArgs + { + /// + /// Billing group ID to assign to the project. + /// + [Input("billingGroupId", required: true)] + public Input BillingGroupId { get; set; } = null!; + + /// + /// ID of an organization. Changing this property forces recreation of the resource. + /// + [Input("organizationId", required: true)] + public Input OrganizationId { get; set; } = null!; + + /// + /// Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + /// + [Input("parentId")] + public Input? ParentId { get; set; } + + /// + /// Unique identifier for the project that also serves as the project name. + /// + [Input("projectId", required: true)] + public Input ProjectId { get; set; } = null!; + + [Input("tags")] + private InputList? _tags; + + /// + /// Tags are key-value pairs that allow you to categorize projects. + /// + public InputList Tags + { + get => _tags ?? (_tags = new InputList()); + set => _tags = value; + } + + [Input("technicalEmails")] + private InputList? _technicalEmails; + + /// + /// The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + /// + public InputList TechnicalEmails + { + get => _technicalEmails ?? (_technicalEmails = new InputList()); + set => _technicalEmails = value; + } + + public OrganizationProjectArgs() + { + } + public static new OrganizationProjectArgs Empty => new OrganizationProjectArgs(); + } + + public sealed class OrganizationProjectState : global::Pulumi.ResourceArgs + { + /// + /// Billing group ID to assign to the project. + /// + [Input("billingGroupId")] + public Input? BillingGroupId { get; set; } + + /// + /// ID of an organization. Changing this property forces recreation of the resource. + /// + [Input("organizationId")] + public Input? OrganizationId { get; set; } + + /// + /// Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + /// + [Input("parentId")] + public Input? ParentId { get; set; } + + /// + /// Unique identifier for the project that also serves as the project name. + /// + [Input("projectId")] + public Input? ProjectId { get; set; } + + [Input("tags")] + private InputList? _tags; + + /// + /// Tags are key-value pairs that allow you to categorize projects. + /// + public InputList Tags + { + get => _tags ?? (_tags = new InputList()); + set => _tags = value; + } + + [Input("technicalEmails")] + private InputList? _technicalEmails; + + /// + /// The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + /// + public InputList TechnicalEmails + { + get => _technicalEmails ?? (_technicalEmails = new InputList()); + set => _technicalEmails = value; + } + + public OrganizationProjectState() + { + } + public static new OrganizationProjectState Empty => new OrganizationProjectState(); + } +} diff --git a/sdk/dotnet/Outputs/GetOrganizationProjectTagResult.cs b/sdk/dotnet/Outputs/GetOrganizationProjectTagResult.cs new file mode 100644 index 00000000..0323020b --- /dev/null +++ b/sdk/dotnet/Outputs/GetOrganizationProjectTagResult.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Aiven.Outputs +{ + + [OutputType] + public sealed class GetOrganizationProjectTagResult + { + /// + /// Project tag key. + /// + public readonly string Key; + /// + /// Project tag value. + /// + public readonly string Value; + + [OutputConstructor] + private GetOrganizationProjectTagResult( + string key, + + string value) + { + Key = key; + Value = value; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationProjectTag.cs b/sdk/dotnet/Outputs/OrganizationProjectTag.cs new file mode 100644 index 00000000..a04e80c0 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationProjectTag.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Aiven.Outputs +{ + + [OutputType] + public sealed class OrganizationProjectTag + { + /// + /// Project tag key. + /// + public readonly string Key; + /// + /// Project tag value. + /// + public readonly string Value; + + [OutputConstructor] + private OrganizationProjectTag( + string key, + + string value) + { + Key = key; + Value = value; + } + } +} diff --git a/sdk/dotnet/ProjectUser.cs b/sdk/dotnet/ProjectUser.cs index ddd67604..2138f7fc 100644 --- a/sdk/dotnet/ProjectUser.cs +++ b/sdk/dotnet/ProjectUser.cs @@ -12,14 +12,11 @@ namespace Pulumi.Aiven /// /// Creates and manages an Aiven project member. /// - /// **This resource is deprecated.** Use `aiven.OrganizationPermission` and - /// migrate existing aiven.ProjectUser resources + /// > **This resource is deprecated** + /// Use `aiven.OrganizationPermission` instead and + /// migrate existing `aiven.ProjectUser` resources /// to the new resource. /// - /// > **This resource is deprecated**. - /// - /// Use `aiven.OrganizationPermission` instead. - /// /// ## Example Usage /// /// ```csharp diff --git a/sdk/go/aiven/account.go b/sdk/go/aiven/account.go index f5a70a16..97fc5fa5 100644 --- a/sdk/go/aiven/account.go +++ b/sdk/go/aiven/account.go @@ -13,8 +13,7 @@ import ( // Creates and manages an Aiven account. // -// > **This resource is deprecated**. -// +// > **This resource is deprecated** // This resource will be removed in v5.0.0. Use `Organization` instead. // // ## Example Usage diff --git a/sdk/go/aiven/accountAuthentication.go b/sdk/go/aiven/accountAuthentication.go index c8c1a29d..47976eeb 100644 --- a/sdk/go/aiven/accountAuthentication.go +++ b/sdk/go/aiven/accountAuthentication.go @@ -14,8 +14,7 @@ import ( // Creates and manages an authentication method. // -// > **This resource is deprecated**. -// +// > **This resource is deprecated** // To set up an identity provider as an authentication method for your organization, // [use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers). // It guides you through the steps and explains the settings. diff --git a/sdk/go/aiven/getAccount.go b/sdk/go/aiven/getAccount.go index 0675fc16..4e3ff6b0 100644 --- a/sdk/go/aiven/getAccount.go +++ b/sdk/go/aiven/getAccount.go @@ -13,8 +13,7 @@ import ( // The Account data source provides information about the existing Aiven Account. // -// > **This resource is deprecated**. -// +// > **This resource is deprecated** // This resource will be removed in v5.0.0. Use `Organization` instead. // // ## Example Usage diff --git a/sdk/go/aiven/getAccountAuthentication.go b/sdk/go/aiven/getAccountAuthentication.go index 83385e71..b0a07cec 100644 --- a/sdk/go/aiven/getAccountAuthentication.go +++ b/sdk/go/aiven/getAccountAuthentication.go @@ -13,8 +13,7 @@ import ( // The Account Authentication data source provides information about the existing Aiven Account Authentication. // -// > **This resource is deprecated**. -// +// > **This resource is deprecated** // This resource is deprecated func LookupAccountAuthentication(ctx *pulumi.Context, args *LookupAccountAuthenticationArgs, opts ...pulumi.InvokeOption) (*LookupAccountAuthenticationResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) diff --git a/sdk/go/aiven/getOrganizationProject.go b/sdk/go/aiven/getOrganizationProject.go new file mode 100644 index 00000000..b811ceb5 --- /dev/null +++ b/sdk/go/aiven/getOrganizationProject.go @@ -0,0 +1,154 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package aiven + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Gets information about an Aiven project. +// +// **This resource is in the beta stage and may change without notice.** Set +// the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := aiven.LookupOrganizationProject(ctx, &aiven.LookupOrganizationProjectArgs{ +// ProjectId: foo.ProjectId, +// OrganizationId: foo.OrganizationId, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func LookupOrganizationProject(ctx *pulumi.Context, args *LookupOrganizationProjectArgs, opts ...pulumi.InvokeOption) (*LookupOrganizationProjectResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupOrganizationProjectResult + err := ctx.Invoke("aiven:index/getOrganizationProject:getOrganizationProject", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getOrganizationProject. +type LookupOrganizationProjectArgs struct { + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId string `pulumi:"organizationId"` + // Unique identifier for the project that also serves as the project name. + ProjectId string `pulumi:"projectId"` +} + +// A collection of values returned by getOrganizationProject. +type LookupOrganizationProjectResult struct { + // Billing group ID to assign to the project. + BillingGroupId string `pulumi:"billingGroupId"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId string `pulumi:"organizationId"` + // Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + ParentId string `pulumi:"parentId"` + // Unique identifier for the project that also serves as the project name. + ProjectId string `pulumi:"projectId"` + // Tags are key-value pairs that allow you to categorize projects. + Tags []GetOrganizationProjectTag `pulumi:"tags"` + // The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + TechnicalEmails []string `pulumi:"technicalEmails"` +} + +func LookupOrganizationProjectOutput(ctx *pulumi.Context, args LookupOrganizationProjectOutputArgs, opts ...pulumi.InvokeOption) LookupOrganizationProjectResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupOrganizationProjectResultOutput, error) { + args := v.(LookupOrganizationProjectArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("aiven:index/getOrganizationProject:getOrganizationProject", args, LookupOrganizationProjectResultOutput{}, options).(LookupOrganizationProjectResultOutput), nil + }).(LookupOrganizationProjectResultOutput) +} + +// A collection of arguments for invoking getOrganizationProject. +type LookupOrganizationProjectOutputArgs struct { + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId pulumi.StringInput `pulumi:"organizationId"` + // Unique identifier for the project that also serves as the project name. + ProjectId pulumi.StringInput `pulumi:"projectId"` +} + +func (LookupOrganizationProjectOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupOrganizationProjectArgs)(nil)).Elem() +} + +// A collection of values returned by getOrganizationProject. +type LookupOrganizationProjectResultOutput struct{ *pulumi.OutputState } + +func (LookupOrganizationProjectResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupOrganizationProjectResult)(nil)).Elem() +} + +func (o LookupOrganizationProjectResultOutput) ToLookupOrganizationProjectResultOutput() LookupOrganizationProjectResultOutput { + return o +} + +func (o LookupOrganizationProjectResultOutput) ToLookupOrganizationProjectResultOutputWithContext(ctx context.Context) LookupOrganizationProjectResultOutput { + return o +} + +// Billing group ID to assign to the project. +func (o LookupOrganizationProjectResultOutput) BillingGroupId() pulumi.StringOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) string { return v.BillingGroupId }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupOrganizationProjectResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) string { return v.Id }).(pulumi.StringOutput) +} + +// ID of an organization. Changing this property forces recreation of the resource. +func (o LookupOrganizationProjectResultOutput) OrganizationId() pulumi.StringOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) string { return v.OrganizationId }).(pulumi.StringOutput) +} + +// Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. +func (o LookupOrganizationProjectResultOutput) ParentId() pulumi.StringOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) string { return v.ParentId }).(pulumi.StringOutput) +} + +// Unique identifier for the project that also serves as the project name. +func (o LookupOrganizationProjectResultOutput) ProjectId() pulumi.StringOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) string { return v.ProjectId }).(pulumi.StringOutput) +} + +// Tags are key-value pairs that allow you to categorize projects. +func (o LookupOrganizationProjectResultOutput) Tags() GetOrganizationProjectTagArrayOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) []GetOrganizationProjectTag { return v.Tags }).(GetOrganizationProjectTagArrayOutput) +} + +// The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. +func (o LookupOrganizationProjectResultOutput) TechnicalEmails() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupOrganizationProjectResult) []string { return v.TechnicalEmails }).(pulumi.StringArrayOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupOrganizationProjectResultOutput{}) +} diff --git a/sdk/go/aiven/getProjectUser.go b/sdk/go/aiven/getProjectUser.go index 3389eac9..d1fdafae 100644 --- a/sdk/go/aiven/getProjectUser.go +++ b/sdk/go/aiven/getProjectUser.go @@ -13,9 +13,10 @@ import ( // The Project User data source provides information about the existing Aiven Project User. // -// > **This resource is deprecated**. -// -// Use `OrganizationPermission` instead. +// > **This resource is deprecated** +// Use `OrganizationPermission` instead and +// migrate existing `ProjectUser` resources +// to the new resource. // // ## Example Usage // diff --git a/sdk/go/aiven/init.go b/sdk/go/aiven/init.go index c2ced9bb..8e4d6cd0 100644 --- a/sdk/go/aiven/init.go +++ b/sdk/go/aiven/init.go @@ -153,6 +153,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &OrganizationGroupProject{} case "aiven:index/organizationPermission:OrganizationPermission": r = &OrganizationPermission{} + case "aiven:index/organizationProject:OrganizationProject": + r = &OrganizationProject{} case "aiven:index/organizationUser:OrganizationUser": r = &OrganizationUser{} case "aiven:index/organizationUserGroup:OrganizationUserGroup": @@ -552,6 +554,11 @@ func init() { "index/organizationPermission", &module{version}, ) + pulumi.RegisterResourceModule( + "aiven", + "index/organizationProject", + &module{version}, + ) pulumi.RegisterResourceModule( "aiven", "index/organizationUser", diff --git a/sdk/go/aiven/organizationProject.go b/sdk/go/aiven/organizationProject.go new file mode 100644 index 00000000..4400cc23 --- /dev/null +++ b/sdk/go/aiven/organizationProject.go @@ -0,0 +1,343 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package aiven + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). +// +// **This resource is in the beta stage and may change without notice.** Set +// the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := aiven.NewOrganizationProject(ctx, "foo", &aiven.OrganizationProjectArgs{ +// ProjectId: pulumi.String("example-project"), +// OrganizationId: pulumi.Any(fooAivenOrganization.Id), +// BillingGroupId: pulumi.Any(fooAivenBillingGroup.Id), +// Tags: aiven.OrganizationProjectTagArray{ +// &aiven.OrganizationProjectTagArgs{ +// Key: pulumi.String("key_1"), +// Value: pulumi.String("value_1"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// ```sh +// $ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID +// ``` +type OrganizationProject struct { + pulumi.CustomResourceState + + // Billing group ID to assign to the project. + BillingGroupId pulumi.StringOutput `pulumi:"billingGroupId"` + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId pulumi.StringOutput `pulumi:"organizationId"` + // Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + ParentId pulumi.StringOutput `pulumi:"parentId"` + // Unique identifier for the project that also serves as the project name. + ProjectId pulumi.StringOutput `pulumi:"projectId"` + // Tags are key-value pairs that allow you to categorize projects. + Tags OrganizationProjectTagArrayOutput `pulumi:"tags"` + // The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + TechnicalEmails pulumi.StringArrayOutput `pulumi:"technicalEmails"` +} + +// NewOrganizationProject registers a new resource with the given unique name, arguments, and options. +func NewOrganizationProject(ctx *pulumi.Context, + name string, args *OrganizationProjectArgs, opts ...pulumi.ResourceOption) (*OrganizationProject, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.BillingGroupId == nil { + return nil, errors.New("invalid value for required argument 'BillingGroupId'") + } + if args.OrganizationId == nil { + return nil, errors.New("invalid value for required argument 'OrganizationId'") + } + if args.ProjectId == nil { + return nil, errors.New("invalid value for required argument 'ProjectId'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource OrganizationProject + err := ctx.RegisterResource("aiven:index/organizationProject:OrganizationProject", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetOrganizationProject gets an existing OrganizationProject resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetOrganizationProject(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *OrganizationProjectState, opts ...pulumi.ResourceOption) (*OrganizationProject, error) { + var resource OrganizationProject + err := ctx.ReadResource("aiven:index/organizationProject:OrganizationProject", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering OrganizationProject resources. +type organizationProjectState struct { + // Billing group ID to assign to the project. + BillingGroupId *string `pulumi:"billingGroupId"` + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId *string `pulumi:"organizationId"` + // Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + ParentId *string `pulumi:"parentId"` + // Unique identifier for the project that also serves as the project name. + ProjectId *string `pulumi:"projectId"` + // Tags are key-value pairs that allow you to categorize projects. + Tags []OrganizationProjectTag `pulumi:"tags"` + // The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + TechnicalEmails []string `pulumi:"technicalEmails"` +} + +type OrganizationProjectState struct { + // Billing group ID to assign to the project. + BillingGroupId pulumi.StringPtrInput + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId pulumi.StringPtrInput + // Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + ParentId pulumi.StringPtrInput + // Unique identifier for the project that also serves as the project name. + ProjectId pulumi.StringPtrInput + // Tags are key-value pairs that allow you to categorize projects. + Tags OrganizationProjectTagArrayInput + // The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + TechnicalEmails pulumi.StringArrayInput +} + +func (OrganizationProjectState) ElementType() reflect.Type { + return reflect.TypeOf((*organizationProjectState)(nil)).Elem() +} + +type organizationProjectArgs struct { + // Billing group ID to assign to the project. + BillingGroupId string `pulumi:"billingGroupId"` + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId string `pulumi:"organizationId"` + // Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + ParentId *string `pulumi:"parentId"` + // Unique identifier for the project that also serves as the project name. + ProjectId string `pulumi:"projectId"` + // Tags are key-value pairs that allow you to categorize projects. + Tags []OrganizationProjectTag `pulumi:"tags"` + // The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + TechnicalEmails []string `pulumi:"technicalEmails"` +} + +// The set of arguments for constructing a OrganizationProject resource. +type OrganizationProjectArgs struct { + // Billing group ID to assign to the project. + BillingGroupId pulumi.StringInput + // ID of an organization. Changing this property forces recreation of the resource. + OrganizationId pulumi.StringInput + // Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + ParentId pulumi.StringPtrInput + // Unique identifier for the project that also serves as the project name. + ProjectId pulumi.StringInput + // Tags are key-value pairs that allow you to categorize projects. + Tags OrganizationProjectTagArrayInput + // The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + TechnicalEmails pulumi.StringArrayInput +} + +func (OrganizationProjectArgs) ElementType() reflect.Type { + return reflect.TypeOf((*organizationProjectArgs)(nil)).Elem() +} + +type OrganizationProjectInput interface { + pulumi.Input + + ToOrganizationProjectOutput() OrganizationProjectOutput + ToOrganizationProjectOutputWithContext(ctx context.Context) OrganizationProjectOutput +} + +func (*OrganizationProject) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationProject)(nil)).Elem() +} + +func (i *OrganizationProject) ToOrganizationProjectOutput() OrganizationProjectOutput { + return i.ToOrganizationProjectOutputWithContext(context.Background()) +} + +func (i *OrganizationProject) ToOrganizationProjectOutputWithContext(ctx context.Context) OrganizationProjectOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationProjectOutput) +} + +// OrganizationProjectArrayInput is an input type that accepts OrganizationProjectArray and OrganizationProjectArrayOutput values. +// You can construct a concrete instance of `OrganizationProjectArrayInput` via: +// +// OrganizationProjectArray{ OrganizationProjectArgs{...} } +type OrganizationProjectArrayInput interface { + pulumi.Input + + ToOrganizationProjectArrayOutput() OrganizationProjectArrayOutput + ToOrganizationProjectArrayOutputWithContext(context.Context) OrganizationProjectArrayOutput +} + +type OrganizationProjectArray []OrganizationProjectInput + +func (OrganizationProjectArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*OrganizationProject)(nil)).Elem() +} + +func (i OrganizationProjectArray) ToOrganizationProjectArrayOutput() OrganizationProjectArrayOutput { + return i.ToOrganizationProjectArrayOutputWithContext(context.Background()) +} + +func (i OrganizationProjectArray) ToOrganizationProjectArrayOutputWithContext(ctx context.Context) OrganizationProjectArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationProjectArrayOutput) +} + +// OrganizationProjectMapInput is an input type that accepts OrganizationProjectMap and OrganizationProjectMapOutput values. +// You can construct a concrete instance of `OrganizationProjectMapInput` via: +// +// OrganizationProjectMap{ "key": OrganizationProjectArgs{...} } +type OrganizationProjectMapInput interface { + pulumi.Input + + ToOrganizationProjectMapOutput() OrganizationProjectMapOutput + ToOrganizationProjectMapOutputWithContext(context.Context) OrganizationProjectMapOutput +} + +type OrganizationProjectMap map[string]OrganizationProjectInput + +func (OrganizationProjectMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*OrganizationProject)(nil)).Elem() +} + +func (i OrganizationProjectMap) ToOrganizationProjectMapOutput() OrganizationProjectMapOutput { + return i.ToOrganizationProjectMapOutputWithContext(context.Background()) +} + +func (i OrganizationProjectMap) ToOrganizationProjectMapOutputWithContext(ctx context.Context) OrganizationProjectMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationProjectMapOutput) +} + +type OrganizationProjectOutput struct{ *pulumi.OutputState } + +func (OrganizationProjectOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationProject)(nil)).Elem() +} + +func (o OrganizationProjectOutput) ToOrganizationProjectOutput() OrganizationProjectOutput { + return o +} + +func (o OrganizationProjectOutput) ToOrganizationProjectOutputWithContext(ctx context.Context) OrganizationProjectOutput { + return o +} + +// Billing group ID to assign to the project. +func (o OrganizationProjectOutput) BillingGroupId() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationProject) pulumi.StringOutput { return v.BillingGroupId }).(pulumi.StringOutput) +} + +// ID of an organization. Changing this property forces recreation of the resource. +func (o OrganizationProjectOutput) OrganizationId() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationProject) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput) +} + +// Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. +func (o OrganizationProjectOutput) ParentId() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationProject) pulumi.StringOutput { return v.ParentId }).(pulumi.StringOutput) +} + +// Unique identifier for the project that also serves as the project name. +func (o OrganizationProjectOutput) ProjectId() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationProject) pulumi.StringOutput { return v.ProjectId }).(pulumi.StringOutput) +} + +// Tags are key-value pairs that allow you to categorize projects. +func (o OrganizationProjectOutput) Tags() OrganizationProjectTagArrayOutput { + return o.ApplyT(func(v *OrganizationProject) OrganizationProjectTagArrayOutput { return v.Tags }).(OrganizationProjectTagArrayOutput) +} + +// The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. +func (o OrganizationProjectOutput) TechnicalEmails() pulumi.StringArrayOutput { + return o.ApplyT(func(v *OrganizationProject) pulumi.StringArrayOutput { return v.TechnicalEmails }).(pulumi.StringArrayOutput) +} + +type OrganizationProjectArrayOutput struct{ *pulumi.OutputState } + +func (OrganizationProjectArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*OrganizationProject)(nil)).Elem() +} + +func (o OrganizationProjectArrayOutput) ToOrganizationProjectArrayOutput() OrganizationProjectArrayOutput { + return o +} + +func (o OrganizationProjectArrayOutput) ToOrganizationProjectArrayOutputWithContext(ctx context.Context) OrganizationProjectArrayOutput { + return o +} + +func (o OrganizationProjectArrayOutput) Index(i pulumi.IntInput) OrganizationProjectOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OrganizationProject { + return vs[0].([]*OrganizationProject)[vs[1].(int)] + }).(OrganizationProjectOutput) +} + +type OrganizationProjectMapOutput struct{ *pulumi.OutputState } + +func (OrganizationProjectMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*OrganizationProject)(nil)).Elem() +} + +func (o OrganizationProjectMapOutput) ToOrganizationProjectMapOutput() OrganizationProjectMapOutput { + return o +} + +func (o OrganizationProjectMapOutput) ToOrganizationProjectMapOutputWithContext(ctx context.Context) OrganizationProjectMapOutput { + return o +} + +func (o OrganizationProjectMapOutput) MapIndex(k pulumi.StringInput) OrganizationProjectOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OrganizationProject { + return vs[0].(map[string]*OrganizationProject)[vs[1].(string)] + }).(OrganizationProjectOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationProjectInput)(nil)).Elem(), &OrganizationProject{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationProjectArrayInput)(nil)).Elem(), OrganizationProjectArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationProjectMapInput)(nil)).Elem(), OrganizationProjectMap{}) + pulumi.RegisterOutputType(OrganizationProjectOutput{}) + pulumi.RegisterOutputType(OrganizationProjectArrayOutput{}) + pulumi.RegisterOutputType(OrganizationProjectMapOutput{}) +} diff --git a/sdk/go/aiven/projectUser.go b/sdk/go/aiven/projectUser.go index 69fe6e91..f5fec257 100644 --- a/sdk/go/aiven/projectUser.go +++ b/sdk/go/aiven/projectUser.go @@ -14,14 +14,11 @@ import ( // Creates and manages an Aiven project member. // -// **This resource is deprecated.** Use `OrganizationPermission` and -// migrate existing ProjectUser resources +// > **This resource is deprecated** +// Use `OrganizationPermission` instead and +// migrate existing `ProjectUser` resources // to the new resource. // -// > **This resource is deprecated**. -// -// Use `OrganizationPermission` instead. -// // ## Example Usage // // ```go diff --git a/sdk/go/aiven/pulumiTypes.go b/sdk/go/aiven/pulumiTypes.go index 1ec0d68e..bf92321d 100644 --- a/sdk/go/aiven/pulumiTypes.go +++ b/sdk/go/aiven/pulumiTypes.go @@ -44180,6 +44180,112 @@ func (o OrganizationPermissionPermissionArrayOutput) Index(i pulumi.IntInput) Or }).(OrganizationPermissionPermissionOutput) } +type OrganizationProjectTag struct { + // Project tag key. + Key string `pulumi:"key"` + // Project tag value. + Value string `pulumi:"value"` +} + +// OrganizationProjectTagInput is an input type that accepts OrganizationProjectTagArgs and OrganizationProjectTagOutput values. +// You can construct a concrete instance of `OrganizationProjectTagInput` via: +// +// OrganizationProjectTagArgs{...} +type OrganizationProjectTagInput interface { + pulumi.Input + + ToOrganizationProjectTagOutput() OrganizationProjectTagOutput + ToOrganizationProjectTagOutputWithContext(context.Context) OrganizationProjectTagOutput +} + +type OrganizationProjectTagArgs struct { + // Project tag key. + Key pulumi.StringInput `pulumi:"key"` + // Project tag value. + Value pulumi.StringInput `pulumi:"value"` +} + +func (OrganizationProjectTagArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationProjectTag)(nil)).Elem() +} + +func (i OrganizationProjectTagArgs) ToOrganizationProjectTagOutput() OrganizationProjectTagOutput { + return i.ToOrganizationProjectTagOutputWithContext(context.Background()) +} + +func (i OrganizationProjectTagArgs) ToOrganizationProjectTagOutputWithContext(ctx context.Context) OrganizationProjectTagOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationProjectTagOutput) +} + +// OrganizationProjectTagArrayInput is an input type that accepts OrganizationProjectTagArray and OrganizationProjectTagArrayOutput values. +// You can construct a concrete instance of `OrganizationProjectTagArrayInput` via: +// +// OrganizationProjectTagArray{ OrganizationProjectTagArgs{...} } +type OrganizationProjectTagArrayInput interface { + pulumi.Input + + ToOrganizationProjectTagArrayOutput() OrganizationProjectTagArrayOutput + ToOrganizationProjectTagArrayOutputWithContext(context.Context) OrganizationProjectTagArrayOutput +} + +type OrganizationProjectTagArray []OrganizationProjectTagInput + +func (OrganizationProjectTagArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]OrganizationProjectTag)(nil)).Elem() +} + +func (i OrganizationProjectTagArray) ToOrganizationProjectTagArrayOutput() OrganizationProjectTagArrayOutput { + return i.ToOrganizationProjectTagArrayOutputWithContext(context.Background()) +} + +func (i OrganizationProjectTagArray) ToOrganizationProjectTagArrayOutputWithContext(ctx context.Context) OrganizationProjectTagArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationProjectTagArrayOutput) +} + +type OrganizationProjectTagOutput struct{ *pulumi.OutputState } + +func (OrganizationProjectTagOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationProjectTag)(nil)).Elem() +} + +func (o OrganizationProjectTagOutput) ToOrganizationProjectTagOutput() OrganizationProjectTagOutput { + return o +} + +func (o OrganizationProjectTagOutput) ToOrganizationProjectTagOutputWithContext(ctx context.Context) OrganizationProjectTagOutput { + return o +} + +// Project tag key. +func (o OrganizationProjectTagOutput) Key() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationProjectTag) string { return v.Key }).(pulumi.StringOutput) +} + +// Project tag value. +func (o OrganizationProjectTagOutput) Value() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationProjectTag) string { return v.Value }).(pulumi.StringOutput) +} + +type OrganizationProjectTagArrayOutput struct{ *pulumi.OutputState } + +func (OrganizationProjectTagArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]OrganizationProjectTag)(nil)).Elem() +} + +func (o OrganizationProjectTagArrayOutput) ToOrganizationProjectTagArrayOutput() OrganizationProjectTagArrayOutput { + return o +} + +func (o OrganizationProjectTagArrayOutput) ToOrganizationProjectTagArrayOutputWithContext(ctx context.Context) OrganizationProjectTagArrayOutput { + return o +} + +func (o OrganizationProjectTagArrayOutput) Index(i pulumi.IntInput) OrganizationProjectTagOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) OrganizationProjectTag { + return vs[0].([]OrganizationProjectTag)[vs[1].(int)] + }).(OrganizationProjectTagOutput) +} + type OrganizationTimeouts struct { // A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Create *string `pulumi:"create"` @@ -95341,295 +95447,6 @@ func (o GetMySqlMysqlUserConfigIpFilterObjectArrayOutput) Index(i pulumi.IntInpu }).(GetMySqlMysqlUserConfigIpFilterObjectOutput) } -type GetMySqlMysqlUserConfigMigration struct { - // Database name for bootstrapping the initial connection. Example: `defaultdb`. - Dbname *string `pulumi:"dbname"` - // Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. - Host string `pulumi:"host"` - // Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. - IgnoreDbs *string `pulumi:"ignoreDbs"` - // Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. - IgnoreRoles *string `pulumi:"ignoreRoles"` - // Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). - Method *string `pulumi:"method"` - // Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. - Password *string `pulumi:"password"` - // Port number of the server where to migrate data from. Example: `1234`. - Port int `pulumi:"port"` - // The server where to migrate data from is secured with SSL. Default: `true`. - Ssl *bool `pulumi:"ssl"` - // User name for authentication with the server where to migrate data from. Example: `myname`. - Username *string `pulumi:"username"` -} - -// GetMySqlMysqlUserConfigMigrationInput is an input type that accepts GetMySqlMysqlUserConfigMigrationArgs and GetMySqlMysqlUserConfigMigrationOutput values. -// You can construct a concrete instance of `GetMySqlMysqlUserConfigMigrationInput` via: -// -// GetMySqlMysqlUserConfigMigrationArgs{...} -type GetMySqlMysqlUserConfigMigrationInput interface { - pulumi.Input - - ToGetMySqlMysqlUserConfigMigrationOutput() GetMySqlMysqlUserConfigMigrationOutput - ToGetMySqlMysqlUserConfigMigrationOutputWithContext(context.Context) GetMySqlMysqlUserConfigMigrationOutput -} - -type GetMySqlMysqlUserConfigMigrationArgs struct { - // Database name for bootstrapping the initial connection. Example: `defaultdb`. - Dbname pulumi.StringPtrInput `pulumi:"dbname"` - // Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. - Host pulumi.StringInput `pulumi:"host"` - // Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. - IgnoreDbs pulumi.StringPtrInput `pulumi:"ignoreDbs"` - // Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. - IgnoreRoles pulumi.StringPtrInput `pulumi:"ignoreRoles"` - // Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). - Method pulumi.StringPtrInput `pulumi:"method"` - // Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. - Password pulumi.StringPtrInput `pulumi:"password"` - // Port number of the server where to migrate data from. Example: `1234`. - Port pulumi.IntInput `pulumi:"port"` - // The server where to migrate data from is secured with SSL. Default: `true`. - Ssl pulumi.BoolPtrInput `pulumi:"ssl"` - // User name for authentication with the server where to migrate data from. Example: `myname`. - Username pulumi.StringPtrInput `pulumi:"username"` -} - -func (GetMySqlMysqlUserConfigMigrationArgs) ElementType() reflect.Type { - return reflect.TypeOf((*GetMySqlMysqlUserConfigMigration)(nil)).Elem() -} - -func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationOutput() GetMySqlMysqlUserConfigMigrationOutput { - return i.ToGetMySqlMysqlUserConfigMigrationOutputWithContext(context.Background()) -} - -func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationOutput { - return pulumi.ToOutputWithContext(ctx, i).(GetMySqlMysqlUserConfigMigrationOutput) -} - -func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { - return i.ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Background()) -} - -func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(GetMySqlMysqlUserConfigMigrationOutput).ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx) -} - -// GetMySqlMysqlUserConfigMigrationPtrInput is an input type that accepts GetMySqlMysqlUserConfigMigrationArgs, GetMySqlMysqlUserConfigMigrationPtr and GetMySqlMysqlUserConfigMigrationPtrOutput values. -// You can construct a concrete instance of `GetMySqlMysqlUserConfigMigrationPtrInput` via: -// -// GetMySqlMysqlUserConfigMigrationArgs{...} -// -// or: -// -// nil -type GetMySqlMysqlUserConfigMigrationPtrInput interface { - pulumi.Input - - ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput - ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput -} - -type getMySqlMysqlUserConfigMigrationPtrType GetMySqlMysqlUserConfigMigrationArgs - -func GetMySqlMysqlUserConfigMigrationPtr(v *GetMySqlMysqlUserConfigMigrationArgs) GetMySqlMysqlUserConfigMigrationPtrInput { - return (*getMySqlMysqlUserConfigMigrationPtrType)(v) -} - -func (*getMySqlMysqlUserConfigMigrationPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**GetMySqlMysqlUserConfigMigration)(nil)).Elem() -} - -func (i *getMySqlMysqlUserConfigMigrationPtrType) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { - return i.ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Background()) -} - -func (i *getMySqlMysqlUserConfigMigrationPtrType) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(GetMySqlMysqlUserConfigMigrationPtrOutput) -} - -type GetMySqlMysqlUserConfigMigrationOutput struct{ *pulumi.OutputState } - -func (GetMySqlMysqlUserConfigMigrationOutput) ElementType() reflect.Type { - return reflect.TypeOf((*GetMySqlMysqlUserConfigMigration)(nil)).Elem() -} - -func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationOutput() GetMySqlMysqlUserConfigMigrationOutput { - return o -} - -func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationOutput { - return o -} - -func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { - return o.ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Background()) -} - -func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v GetMySqlMysqlUserConfigMigration) *GetMySqlMysqlUserConfigMigration { - return &v - }).(GetMySqlMysqlUserConfigMigrationPtrOutput) -} - -// Database name for bootstrapping the initial connection. Example: `defaultdb`. -func (o GetMySqlMysqlUserConfigMigrationOutput) Dbname() pulumi.StringPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Dbname }).(pulumi.StringPtrOutput) -} - -// Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. -func (o GetMySqlMysqlUserConfigMigrationOutput) Host() pulumi.StringOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) string { return v.Host }).(pulumi.StringOutput) -} - -// Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. -func (o GetMySqlMysqlUserConfigMigrationOutput) IgnoreDbs() pulumi.StringPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.IgnoreDbs }).(pulumi.StringPtrOutput) -} - -// Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. -func (o GetMySqlMysqlUserConfigMigrationOutput) IgnoreRoles() pulumi.StringPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.IgnoreRoles }).(pulumi.StringPtrOutput) -} - -// Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). -func (o GetMySqlMysqlUserConfigMigrationOutput) Method() pulumi.StringPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Method }).(pulumi.StringPtrOutput) -} - -// Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. -func (o GetMySqlMysqlUserConfigMigrationOutput) Password() pulumi.StringPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Password }).(pulumi.StringPtrOutput) -} - -// Port number of the server where to migrate data from. Example: `1234`. -func (o GetMySqlMysqlUserConfigMigrationOutput) Port() pulumi.IntOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) int { return v.Port }).(pulumi.IntOutput) -} - -// The server where to migrate data from is secured with SSL. Default: `true`. -func (o GetMySqlMysqlUserConfigMigrationOutput) Ssl() pulumi.BoolPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *bool { return v.Ssl }).(pulumi.BoolPtrOutput) -} - -// User name for authentication with the server where to migrate data from. Example: `myname`. -func (o GetMySqlMysqlUserConfigMigrationOutput) Username() pulumi.StringPtrOutput { - return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Username }).(pulumi.StringPtrOutput) -} - -type GetMySqlMysqlUserConfigMigrationPtrOutput struct{ *pulumi.OutputState } - -func (GetMySqlMysqlUserConfigMigrationPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**GetMySqlMysqlUserConfigMigration)(nil)).Elem() -} - -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { - return o -} - -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { - return o -} - -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Elem() GetMySqlMysqlUserConfigMigrationOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) GetMySqlMysqlUserConfigMigration { - if v != nil { - return *v - } - var ret GetMySqlMysqlUserConfigMigration - return ret - }).(GetMySqlMysqlUserConfigMigrationOutput) -} - -// Database name for bootstrapping the initial connection. Example: `defaultdb`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Dbname() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return v.Dbname - }).(pulumi.StringPtrOutput) -} - -// Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Host() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return &v.Host - }).(pulumi.StringPtrOutput) -} - -// Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) IgnoreDbs() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return v.IgnoreDbs - }).(pulumi.StringPtrOutput) -} - -// Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) IgnoreRoles() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return v.IgnoreRoles - }).(pulumi.StringPtrOutput) -} - -// Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Method() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return v.Method - }).(pulumi.StringPtrOutput) -} - -// Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Password() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return v.Password - }).(pulumi.StringPtrOutput) -} - -// Port number of the server where to migrate data from. Example: `1234`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Port() pulumi.IntPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *int { - if v == nil { - return nil - } - return &v.Port - }).(pulumi.IntPtrOutput) -} - -// The server where to migrate data from is secured with SSL. Default: `true`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Ssl() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *bool { - if v == nil { - return nil - } - return v.Ssl - }).(pulumi.BoolPtrOutput) -} - -// User name for authentication with the server where to migrate data from. Example: `myname`. -func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Username() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { - if v == nil { - return nil - } - return v.Username - }).(pulumi.StringPtrOutput) -} - func init() { pulumi.RegisterInputType(reflect.TypeOf((*AccountAuthenticationSamlFieldMappingInput)(nil)).Elem(), AccountAuthenticationSamlFieldMappingArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountAuthenticationSamlFieldMappingPtrInput)(nil)).Elem(), AccountAuthenticationSamlFieldMappingArgs{}) @@ -96069,6 +95886,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*OrganizationGroupProjectTimeoutsPtrInput)(nil)).Elem(), OrganizationGroupProjectTimeoutsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationPermissionPermissionInput)(nil)).Elem(), OrganizationPermissionPermissionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationPermissionPermissionArrayInput)(nil)).Elem(), OrganizationPermissionPermissionArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationProjectTagInput)(nil)).Elem(), OrganizationProjectTagArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationProjectTagArrayInput)(nil)).Elem(), OrganizationProjectTagArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationTimeoutsInput)(nil)).Elem(), OrganizationTimeoutsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationTimeoutsPtrInput)(nil)).Elem(), OrganizationTimeoutsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationUserGroupMemberTimeoutsInput)(nil)).Elem(), OrganizationUserGroupMemberTimeoutsArgs{}) @@ -96629,8 +96448,6 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigArrayInput)(nil)).Elem(), GetMySqlMysqlUserConfigArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigIpFilterObjectInput)(nil)).Elem(), GetMySqlMysqlUserConfigIpFilterObjectArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigIpFilterObjectArrayInput)(nil)).Elem(), GetMySqlMysqlUserConfigIpFilterObjectArray{}) - pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigMigrationInput)(nil)).Elem(), GetMySqlMysqlUserConfigMigrationArgs{}) - pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigMigrationPtrInput)(nil)).Elem(), GetMySqlMysqlUserConfigMigrationArgs{}) pulumi.RegisterOutputType(AccountAuthenticationSamlFieldMappingOutput{}) pulumi.RegisterOutputType(AccountAuthenticationSamlFieldMappingPtrOutput{}) pulumi.RegisterOutputType(AlloydbomniAlloydbomniOutput{}) @@ -97069,6 +96886,8 @@ func init() { pulumi.RegisterOutputType(OrganizationGroupProjectTimeoutsPtrOutput{}) pulumi.RegisterOutputType(OrganizationPermissionPermissionOutput{}) pulumi.RegisterOutputType(OrganizationPermissionPermissionArrayOutput{}) + pulumi.RegisterOutputType(OrganizationProjectTagOutput{}) + pulumi.RegisterOutputType(OrganizationProjectTagArrayOutput{}) pulumi.RegisterOutputType(OrganizationTimeoutsOutput{}) pulumi.RegisterOutputType(OrganizationTimeoutsPtrOutput{}) pulumi.RegisterOutputType(OrganizationUserGroupMemberTimeoutsOutput{}) @@ -97629,6 +97448,4 @@ func init() { pulumi.RegisterOutputType(GetMySqlMysqlUserConfigArrayOutput{}) pulumi.RegisterOutputType(GetMySqlMysqlUserConfigIpFilterObjectOutput{}) pulumi.RegisterOutputType(GetMySqlMysqlUserConfigIpFilterObjectArrayOutput{}) - pulumi.RegisterOutputType(GetMySqlMysqlUserConfigMigrationOutput{}) - pulumi.RegisterOutputType(GetMySqlMysqlUserConfigMigrationPtrOutput{}) } diff --git a/sdk/go/aiven/pulumiTypes1.go b/sdk/go/aiven/pulumiTypes1.go index 797aab2f..2c655666 100644 --- a/sdk/go/aiven/pulumiTypes1.go +++ b/sdk/go/aiven/pulumiTypes1.go @@ -13,6 +13,295 @@ import ( var _ = internal.GetEnvOrDefault +type GetMySqlMysqlUserConfigMigration struct { + // Database name for bootstrapping the initial connection. Example: `defaultdb`. + Dbname *string `pulumi:"dbname"` + // Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. + Host string `pulumi:"host"` + // Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. + IgnoreDbs *string `pulumi:"ignoreDbs"` + // Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. + IgnoreRoles *string `pulumi:"ignoreRoles"` + // Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + Method *string `pulumi:"method"` + // Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. + Password *string `pulumi:"password"` + // Port number of the server where to migrate data from. Example: `1234`. + Port int `pulumi:"port"` + // The server where to migrate data from is secured with SSL. Default: `true`. + Ssl *bool `pulumi:"ssl"` + // User name for authentication with the server where to migrate data from. Example: `myname`. + Username *string `pulumi:"username"` +} + +// GetMySqlMysqlUserConfigMigrationInput is an input type that accepts GetMySqlMysqlUserConfigMigrationArgs and GetMySqlMysqlUserConfigMigrationOutput values. +// You can construct a concrete instance of `GetMySqlMysqlUserConfigMigrationInput` via: +// +// GetMySqlMysqlUserConfigMigrationArgs{...} +type GetMySqlMysqlUserConfigMigrationInput interface { + pulumi.Input + + ToGetMySqlMysqlUserConfigMigrationOutput() GetMySqlMysqlUserConfigMigrationOutput + ToGetMySqlMysqlUserConfigMigrationOutputWithContext(context.Context) GetMySqlMysqlUserConfigMigrationOutput +} + +type GetMySqlMysqlUserConfigMigrationArgs struct { + // Database name for bootstrapping the initial connection. Example: `defaultdb`. + Dbname pulumi.StringPtrInput `pulumi:"dbname"` + // Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. + Host pulumi.StringInput `pulumi:"host"` + // Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. + IgnoreDbs pulumi.StringPtrInput `pulumi:"ignoreDbs"` + // Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. + IgnoreRoles pulumi.StringPtrInput `pulumi:"ignoreRoles"` + // Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + Method pulumi.StringPtrInput `pulumi:"method"` + // Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. + Password pulumi.StringPtrInput `pulumi:"password"` + // Port number of the server where to migrate data from. Example: `1234`. + Port pulumi.IntInput `pulumi:"port"` + // The server where to migrate data from is secured with SSL. Default: `true`. + Ssl pulumi.BoolPtrInput `pulumi:"ssl"` + // User name for authentication with the server where to migrate data from. Example: `myname`. + Username pulumi.StringPtrInput `pulumi:"username"` +} + +func (GetMySqlMysqlUserConfigMigrationArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetMySqlMysqlUserConfigMigration)(nil)).Elem() +} + +func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationOutput() GetMySqlMysqlUserConfigMigrationOutput { + return i.ToGetMySqlMysqlUserConfigMigrationOutputWithContext(context.Background()) +} + +func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetMySqlMysqlUserConfigMigrationOutput) +} + +func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { + return i.ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Background()) +} + +func (i GetMySqlMysqlUserConfigMigrationArgs) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetMySqlMysqlUserConfigMigrationOutput).ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx) +} + +// GetMySqlMysqlUserConfigMigrationPtrInput is an input type that accepts GetMySqlMysqlUserConfigMigrationArgs, GetMySqlMysqlUserConfigMigrationPtr and GetMySqlMysqlUserConfigMigrationPtrOutput values. +// You can construct a concrete instance of `GetMySqlMysqlUserConfigMigrationPtrInput` via: +// +// GetMySqlMysqlUserConfigMigrationArgs{...} +// +// or: +// +// nil +type GetMySqlMysqlUserConfigMigrationPtrInput interface { + pulumi.Input + + ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput + ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput +} + +type getMySqlMysqlUserConfigMigrationPtrType GetMySqlMysqlUserConfigMigrationArgs + +func GetMySqlMysqlUserConfigMigrationPtr(v *GetMySqlMysqlUserConfigMigrationArgs) GetMySqlMysqlUserConfigMigrationPtrInput { + return (*getMySqlMysqlUserConfigMigrationPtrType)(v) +} + +func (*getMySqlMysqlUserConfigMigrationPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**GetMySqlMysqlUserConfigMigration)(nil)).Elem() +} + +func (i *getMySqlMysqlUserConfigMigrationPtrType) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { + return i.ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Background()) +} + +func (i *getMySqlMysqlUserConfigMigrationPtrType) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetMySqlMysqlUserConfigMigrationPtrOutput) +} + +type GetMySqlMysqlUserConfigMigrationOutput struct{ *pulumi.OutputState } + +func (GetMySqlMysqlUserConfigMigrationOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetMySqlMysqlUserConfigMigration)(nil)).Elem() +} + +func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationOutput() GetMySqlMysqlUserConfigMigrationOutput { + return o +} + +func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationOutput { + return o +} + +func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { + return o.ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(context.Background()) +} + +func (o GetMySqlMysqlUserConfigMigrationOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v GetMySqlMysqlUserConfigMigration) *GetMySqlMysqlUserConfigMigration { + return &v + }).(GetMySqlMysqlUserConfigMigrationPtrOutput) +} + +// Database name for bootstrapping the initial connection. Example: `defaultdb`. +func (o GetMySqlMysqlUserConfigMigrationOutput) Dbname() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Dbname }).(pulumi.StringPtrOutput) +} + +// Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. +func (o GetMySqlMysqlUserConfigMigrationOutput) Host() pulumi.StringOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) string { return v.Host }).(pulumi.StringOutput) +} + +// Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. +func (o GetMySqlMysqlUserConfigMigrationOutput) IgnoreDbs() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.IgnoreDbs }).(pulumi.StringPtrOutput) +} + +// Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. +func (o GetMySqlMysqlUserConfigMigrationOutput) IgnoreRoles() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.IgnoreRoles }).(pulumi.StringPtrOutput) +} + +// Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). +func (o GetMySqlMysqlUserConfigMigrationOutput) Method() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Method }).(pulumi.StringPtrOutput) +} + +// Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. +func (o GetMySqlMysqlUserConfigMigrationOutput) Password() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Password }).(pulumi.StringPtrOutput) +} + +// Port number of the server where to migrate data from. Example: `1234`. +func (o GetMySqlMysqlUserConfigMigrationOutput) Port() pulumi.IntOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) int { return v.Port }).(pulumi.IntOutput) +} + +// The server where to migrate data from is secured with SSL. Default: `true`. +func (o GetMySqlMysqlUserConfigMigrationOutput) Ssl() pulumi.BoolPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *bool { return v.Ssl }).(pulumi.BoolPtrOutput) +} + +// User name for authentication with the server where to migrate data from. Example: `myname`. +func (o GetMySqlMysqlUserConfigMigrationOutput) Username() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetMySqlMysqlUserConfigMigration) *string { return v.Username }).(pulumi.StringPtrOutput) +} + +type GetMySqlMysqlUserConfigMigrationPtrOutput struct{ *pulumi.OutputState } + +func (GetMySqlMysqlUserConfigMigrationPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**GetMySqlMysqlUserConfigMigration)(nil)).Elem() +} + +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutput() GetMySqlMysqlUserConfigMigrationPtrOutput { + return o +} + +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) ToGetMySqlMysqlUserConfigMigrationPtrOutputWithContext(ctx context.Context) GetMySqlMysqlUserConfigMigrationPtrOutput { + return o +} + +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Elem() GetMySqlMysqlUserConfigMigrationOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) GetMySqlMysqlUserConfigMigration { + if v != nil { + return *v + } + var ret GetMySqlMysqlUserConfigMigration + return ret + }).(GetMySqlMysqlUserConfigMigrationOutput) +} + +// Database name for bootstrapping the initial connection. Example: `defaultdb`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Dbname() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return v.Dbname + }).(pulumi.StringPtrOutput) +} + +// Hostname or IP address of the server where to migrate data from. Example: `my.server.com`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Host() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return &v.Host + }).(pulumi.StringPtrOutput) +} + +// Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). Example: `db1,db2`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) IgnoreDbs() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return v.IgnoreDbs + }).(pulumi.StringPtrOutput) +} + +// Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). Example: `role1,role2`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) IgnoreRoles() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return v.IgnoreRoles + }).(pulumi.StringPtrOutput) +} + +// Enum: `dump`, `replication`. The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Method() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return v.Method + }).(pulumi.StringPtrOutput) +} + +// Password for authentication with the server where to migrate data from. Example: `jjKk45Nnd`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Password() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return v.Password + }).(pulumi.StringPtrOutput) +} + +// Port number of the server where to migrate data from. Example: `1234`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Port() pulumi.IntPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *int { + if v == nil { + return nil + } + return &v.Port + }).(pulumi.IntPtrOutput) +} + +// The server where to migrate data from is secured with SSL. Default: `true`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Ssl() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *bool { + if v == nil { + return nil + } + return v.Ssl + }).(pulumi.BoolPtrOutput) +} + +// User name for authentication with the server where to migrate data from. Example: `myname`. +func (o GetMySqlMysqlUserConfigMigrationPtrOutput) Username() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GetMySqlMysqlUserConfigMigration) *string { + if v == nil { + return nil + } + return v.Username + }).(pulumi.StringPtrOutput) +} + type GetMySqlMysqlUserConfigMysql struct { // The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. Example: `10`. ConnectTimeout *int `pulumi:"connectTimeout"` @@ -10392,6 +10681,112 @@ func (o GetOpenSearchTechEmailArrayOutput) Index(i pulumi.IntInput) GetOpenSearc }).(GetOpenSearchTechEmailOutput) } +type GetOrganizationProjectTag struct { + // Project tag key. + Key string `pulumi:"key"` + // Project tag value. + Value string `pulumi:"value"` +} + +// GetOrganizationProjectTagInput is an input type that accepts GetOrganizationProjectTagArgs and GetOrganizationProjectTagOutput values. +// You can construct a concrete instance of `GetOrganizationProjectTagInput` via: +// +// GetOrganizationProjectTagArgs{...} +type GetOrganizationProjectTagInput interface { + pulumi.Input + + ToGetOrganizationProjectTagOutput() GetOrganizationProjectTagOutput + ToGetOrganizationProjectTagOutputWithContext(context.Context) GetOrganizationProjectTagOutput +} + +type GetOrganizationProjectTagArgs struct { + // Project tag key. + Key pulumi.StringInput `pulumi:"key"` + // Project tag value. + Value pulumi.StringInput `pulumi:"value"` +} + +func (GetOrganizationProjectTagArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetOrganizationProjectTag)(nil)).Elem() +} + +func (i GetOrganizationProjectTagArgs) ToGetOrganizationProjectTagOutput() GetOrganizationProjectTagOutput { + return i.ToGetOrganizationProjectTagOutputWithContext(context.Background()) +} + +func (i GetOrganizationProjectTagArgs) ToGetOrganizationProjectTagOutputWithContext(ctx context.Context) GetOrganizationProjectTagOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetOrganizationProjectTagOutput) +} + +// GetOrganizationProjectTagArrayInput is an input type that accepts GetOrganizationProjectTagArray and GetOrganizationProjectTagArrayOutput values. +// You can construct a concrete instance of `GetOrganizationProjectTagArrayInput` via: +// +// GetOrganizationProjectTagArray{ GetOrganizationProjectTagArgs{...} } +type GetOrganizationProjectTagArrayInput interface { + pulumi.Input + + ToGetOrganizationProjectTagArrayOutput() GetOrganizationProjectTagArrayOutput + ToGetOrganizationProjectTagArrayOutputWithContext(context.Context) GetOrganizationProjectTagArrayOutput +} + +type GetOrganizationProjectTagArray []GetOrganizationProjectTagInput + +func (GetOrganizationProjectTagArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetOrganizationProjectTag)(nil)).Elem() +} + +func (i GetOrganizationProjectTagArray) ToGetOrganizationProjectTagArrayOutput() GetOrganizationProjectTagArrayOutput { + return i.ToGetOrganizationProjectTagArrayOutputWithContext(context.Background()) +} + +func (i GetOrganizationProjectTagArray) ToGetOrganizationProjectTagArrayOutputWithContext(ctx context.Context) GetOrganizationProjectTagArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetOrganizationProjectTagArrayOutput) +} + +type GetOrganizationProjectTagOutput struct{ *pulumi.OutputState } + +func (GetOrganizationProjectTagOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetOrganizationProjectTag)(nil)).Elem() +} + +func (o GetOrganizationProjectTagOutput) ToGetOrganizationProjectTagOutput() GetOrganizationProjectTagOutput { + return o +} + +func (o GetOrganizationProjectTagOutput) ToGetOrganizationProjectTagOutputWithContext(ctx context.Context) GetOrganizationProjectTagOutput { + return o +} + +// Project tag key. +func (o GetOrganizationProjectTagOutput) Key() pulumi.StringOutput { + return o.ApplyT(func(v GetOrganizationProjectTag) string { return v.Key }).(pulumi.StringOutput) +} + +// Project tag value. +func (o GetOrganizationProjectTagOutput) Value() pulumi.StringOutput { + return o.ApplyT(func(v GetOrganizationProjectTag) string { return v.Value }).(pulumi.StringOutput) +} + +type GetOrganizationProjectTagArrayOutput struct{ *pulumi.OutputState } + +func (GetOrganizationProjectTagArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetOrganizationProjectTag)(nil)).Elem() +} + +func (o GetOrganizationProjectTagArrayOutput) ToGetOrganizationProjectTagArrayOutput() GetOrganizationProjectTagArrayOutput { + return o +} + +func (o GetOrganizationProjectTagArrayOutput) ToGetOrganizationProjectTagArrayOutputWithContext(ctx context.Context) GetOrganizationProjectTagArrayOutput { + return o +} + +func (o GetOrganizationProjectTagArrayOutput) Index(i pulumi.IntInput) GetOrganizationProjectTagOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetOrganizationProjectTag { + return vs[0].([]GetOrganizationProjectTag)[vs[1].(int)] + }).(GetOrganizationProjectTagOutput) +} + type GetOrganizationUserListUser struct { // Super admin state of the organization user IsSuperAdmin bool `pulumi:"isSuperAdmin"` @@ -28068,6 +28463,8 @@ func (o GetValkeyValkeyUserConfigPublicAccessPtrOutput) Valkey() pulumi.BoolPtrO } func init() { + pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigMigrationInput)(nil)).Elem(), GetMySqlMysqlUserConfigMigrationArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigMigrationPtrInput)(nil)).Elem(), GetMySqlMysqlUserConfigMigrationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigMysqlInput)(nil)).Elem(), GetMySqlMysqlUserConfigMysqlArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigMysqlPtrInput)(nil)).Elem(), GetMySqlMysqlUserConfigMysqlArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetMySqlMysqlUserConfigPrivateAccessInput)(nil)).Elem(), GetMySqlMysqlUserConfigPrivateAccessArgs{}) @@ -28160,6 +28557,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetOpenSearchTagArrayInput)(nil)).Elem(), GetOpenSearchTagArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetOpenSearchTechEmailInput)(nil)).Elem(), GetOpenSearchTechEmailArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetOpenSearchTechEmailArrayInput)(nil)).Elem(), GetOpenSearchTechEmailArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetOrganizationProjectTagInput)(nil)).Elem(), GetOrganizationProjectTagArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetOrganizationProjectTagArrayInput)(nil)).Elem(), GetOrganizationProjectTagArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetOrganizationUserListUserInput)(nil)).Elem(), GetOrganizationUserListUserArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetOrganizationUserListUserArrayInput)(nil)).Elem(), GetOrganizationUserListUserArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetOrganizationUserListUserUserInfoInput)(nil)).Elem(), GetOrganizationUserListUserUserInfoArgs{}) @@ -28372,6 +28771,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetValkeyValkeyUserConfigPrivatelinkAccessPtrInput)(nil)).Elem(), GetValkeyValkeyUserConfigPrivatelinkAccessArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetValkeyValkeyUserConfigPublicAccessInput)(nil)).Elem(), GetValkeyValkeyUserConfigPublicAccessArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetValkeyValkeyUserConfigPublicAccessPtrInput)(nil)).Elem(), GetValkeyValkeyUserConfigPublicAccessArgs{}) + pulumi.RegisterOutputType(GetMySqlMysqlUserConfigMigrationOutput{}) + pulumi.RegisterOutputType(GetMySqlMysqlUserConfigMigrationPtrOutput{}) pulumi.RegisterOutputType(GetMySqlMysqlUserConfigMysqlOutput{}) pulumi.RegisterOutputType(GetMySqlMysqlUserConfigMysqlPtrOutput{}) pulumi.RegisterOutputType(GetMySqlMysqlUserConfigPrivateAccessOutput{}) @@ -28464,6 +28865,8 @@ func init() { pulumi.RegisterOutputType(GetOpenSearchTagArrayOutput{}) pulumi.RegisterOutputType(GetOpenSearchTechEmailOutput{}) pulumi.RegisterOutputType(GetOpenSearchTechEmailArrayOutput{}) + pulumi.RegisterOutputType(GetOrganizationProjectTagOutput{}) + pulumi.RegisterOutputType(GetOrganizationProjectTagArrayOutput{}) pulumi.RegisterOutputType(GetOrganizationUserListUserOutput{}) pulumi.RegisterOutputType(GetOrganizationUserListUserArrayOutput{}) pulumi.RegisterOutputType(GetOrganizationUserListUserUserInfoOutput{}) diff --git a/sdk/java/src/main/java/com/pulumi/aiven/Account.java b/sdk/java/src/main/java/com/pulumi/aiven/Account.java index 0614a895..6d3eee68 100644 --- a/sdk/java/src/main/java/com/pulumi/aiven/Account.java +++ b/sdk/java/src/main/java/com/pulumi/aiven/Account.java @@ -18,8 +18,7 @@ /** * Creates and manages an Aiven account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage diff --git a/sdk/java/src/main/java/com/pulumi/aiven/AccountAuthentication.java b/sdk/java/src/main/java/com/pulumi/aiven/AccountAuthentication.java index 968bbe6f..fc4e790f 100644 --- a/sdk/java/src/main/java/com/pulumi/aiven/AccountAuthentication.java +++ b/sdk/java/src/main/java/com/pulumi/aiven/AccountAuthentication.java @@ -19,8 +19,7 @@ /** * Creates and manages an authentication method. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * To set up an identity provider as an authentication method for your organization, * [use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers). * It guides you through the steps and explains the settings. diff --git a/sdk/java/src/main/java/com/pulumi/aiven/AivenFunctions.java b/sdk/java/src/main/java/com/pulumi/aiven/AivenFunctions.java index 7adbe4d9..00519a43 100644 --- a/sdk/java/src/main/java/com/pulumi/aiven/AivenFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/aiven/AivenFunctions.java @@ -114,6 +114,8 @@ import com.pulumi.aiven.inputs.GetOrganizationApplicationUserPlainArgs; import com.pulumi.aiven.inputs.GetOrganizationArgs; import com.pulumi.aiven.inputs.GetOrganizationPlainArgs; +import com.pulumi.aiven.inputs.GetOrganizationProjectArgs; +import com.pulumi.aiven.inputs.GetOrganizationProjectPlainArgs; import com.pulumi.aiven.inputs.GetOrganizationUserArgs; import com.pulumi.aiven.inputs.GetOrganizationUserGroupArgs; import com.pulumi.aiven.inputs.GetOrganizationUserGroupPlainArgs; @@ -206,6 +208,7 @@ import com.pulumi.aiven.outputs.GetOpensearchSecurityPluginConfigResult; import com.pulumi.aiven.outputs.GetOpensearchUserResult; import com.pulumi.aiven.outputs.GetOrganizationApplicationUserResult; +import com.pulumi.aiven.outputs.GetOrganizationProjectResult; import com.pulumi.aiven.outputs.GetOrganizationResult; import com.pulumi.aiven.outputs.GetOrganizationUserGroupResult; import com.pulumi.aiven.outputs.GetOrganizationUserListResult; @@ -237,8 +240,7 @@ public final class AivenFunctions { /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage @@ -283,8 +285,7 @@ public static Output getAccount(GetAccountArgs args) { /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage @@ -329,8 +330,7 @@ public static CompletableFuture getAccountPlain(GetAccountPlai /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage @@ -375,8 +375,7 @@ public static Output getAccount(GetAccountArgs args, InvokeOpt /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage @@ -421,8 +420,7 @@ public static Output getAccount(GetAccountArgs args, InvokeOut /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage @@ -467,8 +465,7 @@ public static CompletableFuture getAccountPlain(GetAccountPlai /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated * */ @@ -478,8 +475,7 @@ public static Output getAccountAuthentication(Ge /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated * */ @@ -489,8 +485,7 @@ public static CompletableFuture getAccountAuthen /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated * */ @@ -500,8 +495,7 @@ public static Output getAccountAuthentication(Ge /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated * */ @@ -511,8 +505,7 @@ public static Output getAccountAuthentication(Ge /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated * */ @@ -10543,6 +10536,236 @@ public static Output getOrganizationApplic public static CompletableFuture getOrganizationApplicationUserPlain(GetOrganizationApplicationUserPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aiven:index/getOrganizationApplicationUser:getOrganizationApplicationUser", TypeShape.of(GetOrganizationApplicationUserResult.class), args, Utilities.withVersion(options)); } + /** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.aiven.AivenFunctions;
+     * import com.pulumi.aiven.inputs.GetOrganizationProjectArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = AivenFunctions.getOrganizationProject(GetOrganizationProjectArgs.builder()
+     *             .projectId(foo.projectId())
+     *             .organizationId(foo.organizationId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getOrganizationProject(GetOrganizationProjectArgs args) { + return getOrganizationProject(args, InvokeOptions.Empty); + } + /** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.aiven.AivenFunctions;
+     * import com.pulumi.aiven.inputs.GetOrganizationProjectArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = AivenFunctions.getOrganizationProject(GetOrganizationProjectArgs.builder()
+     *             .projectId(foo.projectId())
+     *             .organizationId(foo.organizationId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getOrganizationProjectPlain(GetOrganizationProjectPlainArgs args) { + return getOrganizationProjectPlain(args, InvokeOptions.Empty); + } + /** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.aiven.AivenFunctions;
+     * import com.pulumi.aiven.inputs.GetOrganizationProjectArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = AivenFunctions.getOrganizationProject(GetOrganizationProjectArgs.builder()
+     *             .projectId(foo.projectId())
+     *             .organizationId(foo.organizationId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getOrganizationProject(GetOrganizationProjectArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("aiven:index/getOrganizationProject:getOrganizationProject", TypeShape.of(GetOrganizationProjectResult.class), args, Utilities.withVersion(options)); + } + /** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.aiven.AivenFunctions;
+     * import com.pulumi.aiven.inputs.GetOrganizationProjectArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = AivenFunctions.getOrganizationProject(GetOrganizationProjectArgs.builder()
+     *             .projectId(foo.projectId())
+     *             .organizationId(foo.organizationId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getOrganizationProject(GetOrganizationProjectArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("aiven:index/getOrganizationProject:getOrganizationProject", TypeShape.of(GetOrganizationProjectResult.class), args, Utilities.withVersion(options)); + } + /** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.aiven.AivenFunctions;
+     * import com.pulumi.aiven.inputs.GetOrganizationProjectArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = AivenFunctions.getOrganizationProject(GetOrganizationProjectArgs.builder()
+     *             .projectId(foo.projectId())
+     *             .organizationId(foo.organizationId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getOrganizationProjectPlain(GetOrganizationProjectPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("aiven:index/getOrganizationProject:getOrganizationProject", TypeShape.of(GetOrganizationProjectResult.class), args, Utilities.withVersion(options)); + } public static Output getOrganizationUser(GetOrganizationUserArgs args) { return getOrganizationUser(args, InvokeOptions.Empty); } @@ -11926,9 +12149,10 @@ public static CompletableFuture getProjectPlain(GetProjectPlai /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * @@ -11973,9 +12197,10 @@ public static Output getProjectUser(GetProjectUserArgs arg /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * @@ -12020,9 +12245,10 @@ public static CompletableFuture getProjectUserPlain(GetPro /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * @@ -12067,9 +12293,10 @@ public static Output getProjectUser(GetProjectUserArgs arg /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * @@ -12114,9 +12341,10 @@ public static Output getProjectUser(GetProjectUserArgs arg /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/aiven/OrganizationProject.java b/sdk/java/src/main/java/com/pulumi/aiven/OrganizationProject.java new file mode 100644 index 00000000..76f532df --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/OrganizationProject.java @@ -0,0 +1,216 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven; + +import com.pulumi.aiven.OrganizationProjectArgs; +import com.pulumi.aiven.Utilities; +import com.pulumi.aiven.inputs.OrganizationProjectState; +import com.pulumi.aiven.outputs.OrganizationProjectTag; +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.aiven.OrganizationProject;
+ * import com.pulumi.aiven.OrganizationProjectArgs;
+ * import com.pulumi.aiven.inputs.OrganizationProjectTagArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var foo = new OrganizationProject("foo", OrganizationProjectArgs.builder()
+ *             .projectId("example-project")
+ *             .organizationId(fooAivenOrganization.id())
+ *             .billingGroupId(fooAivenBillingGroup.id())
+ *             .tags(OrganizationProjectTagArgs.builder()
+ *                 .key("key_1")
+ *                 .value("value_1")
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + * ## Import + * + * ```sh + * $ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID + * ``` + * + */ +@ResourceType(type="aiven:index/organizationProject:OrganizationProject") +public class OrganizationProject extends com.pulumi.resources.CustomResource { + /** + * Billing group ID to assign to the project. + * + */ + @Export(name="billingGroupId", refs={String.class}, tree="[0]") + private Output billingGroupId; + + /** + * @return Billing group ID to assign to the project. + * + */ + public Output billingGroupId() { + return this.billingGroupId; + } + /** + * ID of an organization. Changing this property forces recreation of the resource. + * + */ + @Export(name="organizationId", refs={String.class}, tree="[0]") + private Output organizationId; + + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + public Output organizationId() { + return this.organizationId; + } + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + @Export(name="parentId", refs={String.class}, tree="[0]") + private Output parentId; + + /** + * @return Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + public Output parentId() { + return this.parentId; + } + /** + * Unique identifier for the project that also serves as the project name. + * + */ + @Export(name="projectId", refs={String.class}, tree="[0]") + private Output projectId; + + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + public Output projectId() { + return this.projectId; + } + /** + * Tags are key-value pairs that allow you to categorize projects. + * + */ + @Export(name="tags", refs={List.class,OrganizationProjectTag.class}, tree="[0,1]") + private Output> tags; + + /** + * @return Tags are key-value pairs that allow you to categorize projects. + * + */ + public Output>> tags() { + return Codegen.optional(this.tags); + } + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + @Export(name="technicalEmails", refs={List.class,String.class}, tree="[0,1]") + private Output> technicalEmails; + + /** + * @return The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + public Output>> technicalEmails() { + return Codegen.optional(this.technicalEmails); + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public OrganizationProject(java.lang.String name) { + this(name, OrganizationProjectArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public OrganizationProject(java.lang.String name, OrganizationProjectArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public OrganizationProject(java.lang.String name, OrganizationProjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("aiven:index/organizationProject:OrganizationProject", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private OrganizationProject(java.lang.String name, Output id, @Nullable OrganizationProjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("aiven:index/organizationProject:OrganizationProject", name, state, makeResourceOptions(options, id), false); + } + + private static OrganizationProjectArgs makeArgs(OrganizationProjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? OrganizationProjectArgs.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(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static OrganizationProject get(java.lang.String name, Output id, @Nullable OrganizationProjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new OrganizationProject(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/OrganizationProjectArgs.java b/sdk/java/src/main/java/com/pulumi/aiven/OrganizationProjectArgs.java new file mode 100644 index 00000000..25aa11b9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/OrganizationProjectArgs.java @@ -0,0 +1,300 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven; + +import com.pulumi.aiven.inputs.OrganizationProjectTagArgs; +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationProjectArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationProjectArgs Empty = new OrganizationProjectArgs(); + + /** + * Billing group ID to assign to the project. + * + */ + @Import(name="billingGroupId", required=true) + private Output billingGroupId; + + /** + * @return Billing group ID to assign to the project. + * + */ + public Output billingGroupId() { + return this.billingGroupId; + } + + /** + * ID of an organization. Changing this property forces recreation of the resource. + * + */ + @Import(name="organizationId", required=true) + private Output organizationId; + + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + public Output organizationId() { + return this.organizationId; + } + + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + @Import(name="parentId") + private @Nullable Output parentId; + + /** + * @return Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + public Optional> parentId() { + return Optional.ofNullable(this.parentId); + } + + /** + * Unique identifier for the project that also serves as the project name. + * + */ + @Import(name="projectId", required=true) + private Output projectId; + + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + public Output projectId() { + return this.projectId; + } + + /** + * Tags are key-value pairs that allow you to categorize projects. + * + */ + @Import(name="tags") + private @Nullable Output> tags; + + /** + * @return Tags are key-value pairs that allow you to categorize projects. + * + */ + public Optional>> tags() { + return Optional.ofNullable(this.tags); + } + + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + @Import(name="technicalEmails") + private @Nullable Output> technicalEmails; + + /** + * @return The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + public Optional>> technicalEmails() { + return Optional.ofNullable(this.technicalEmails); + } + + private OrganizationProjectArgs() {} + + private OrganizationProjectArgs(OrganizationProjectArgs $) { + this.billingGroupId = $.billingGroupId; + this.organizationId = $.organizationId; + this.parentId = $.parentId; + this.projectId = $.projectId; + this.tags = $.tags; + this.technicalEmails = $.technicalEmails; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationProjectArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationProjectArgs $; + + public Builder() { + $ = new OrganizationProjectArgs(); + } + + public Builder(OrganizationProjectArgs defaults) { + $ = new OrganizationProjectArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param billingGroupId Billing group ID to assign to the project. + * + * @return builder + * + */ + public Builder billingGroupId(Output billingGroupId) { + $.billingGroupId = billingGroupId; + return this; + } + + /** + * @param billingGroupId Billing group ID to assign to the project. + * + * @return builder + * + */ + public Builder billingGroupId(String billingGroupId) { + return billingGroupId(Output.of(billingGroupId)); + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(Output organizationId) { + $.organizationId = organizationId; + return this; + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(String organizationId) { + return organizationId(Output.of(organizationId)); + } + + /** + * @param parentId Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + * @return builder + * + */ + public Builder parentId(@Nullable Output parentId) { + $.parentId = parentId; + return this; + } + + /** + * @param parentId Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + * @return builder + * + */ + public Builder parentId(String parentId) { + return parentId(Output.of(parentId)); + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(Output projectId) { + $.projectId = projectId; + return this; + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(String projectId) { + return projectId(Output.of(projectId)); + } + + /** + * @param tags Tags are key-value pairs that allow you to categorize projects. + * + * @return builder + * + */ + public Builder tags(@Nullable Output> tags) { + $.tags = tags; + return this; + } + + /** + * @param tags Tags are key-value pairs that allow you to categorize projects. + * + * @return builder + * + */ + public Builder tags(List tags) { + return tags(Output.of(tags)); + } + + /** + * @param tags Tags are key-value pairs that allow you to categorize projects. + * + * @return builder + * + */ + public Builder tags(OrganizationProjectTagArgs... tags) { + return tags(List.of(tags)); + } + + /** + * @param technicalEmails The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + * @return builder + * + */ + public Builder technicalEmails(@Nullable Output> technicalEmails) { + $.technicalEmails = technicalEmails; + return this; + } + + /** + * @param technicalEmails The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + * @return builder + * + */ + public Builder technicalEmails(List technicalEmails) { + return technicalEmails(Output.of(technicalEmails)); + } + + /** + * @param technicalEmails The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + * @return builder + * + */ + public Builder technicalEmails(String... technicalEmails) { + return technicalEmails(List.of(technicalEmails)); + } + + public OrganizationProjectArgs build() { + if ($.billingGroupId == null) { + throw new MissingRequiredPropertyException("OrganizationProjectArgs", "billingGroupId"); + } + if ($.organizationId == null) { + throw new MissingRequiredPropertyException("OrganizationProjectArgs", "organizationId"); + } + if ($.projectId == null) { + throw new MissingRequiredPropertyException("OrganizationProjectArgs", "projectId"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/ProjectUser.java b/sdk/java/src/main/java/com/pulumi/aiven/ProjectUser.java index 32133a72..aee89dcc 100644 --- a/sdk/java/src/main/java/com/pulumi/aiven/ProjectUser.java +++ b/sdk/java/src/main/java/com/pulumi/aiven/ProjectUser.java @@ -17,14 +17,11 @@ /** * Creates and manages an Aiven project member. * - * **This resource is deprecated.** Use `aiven.OrganizationPermission` and - * migrate existing aiven.ProjectUser resources + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources * to the new resource. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. - * * ## Example Usage * * <!--Start PulumiCodeChooser --> diff --git a/sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectArgs.java b/sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectArgs.java new file mode 100644 index 00000000..c0e9043e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectArgs.java @@ -0,0 +1,125 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetOrganizationProjectArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetOrganizationProjectArgs Empty = new GetOrganizationProjectArgs(); + + /** + * ID of an organization. Changing this property forces recreation of the resource. + * + */ + @Import(name="organizationId", required=true) + private Output organizationId; + + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + public Output organizationId() { + return this.organizationId; + } + + /** + * Unique identifier for the project that also serves as the project name. + * + */ + @Import(name="projectId", required=true) + private Output projectId; + + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + public Output projectId() { + return this.projectId; + } + + private GetOrganizationProjectArgs() {} + + private GetOrganizationProjectArgs(GetOrganizationProjectArgs $) { + this.organizationId = $.organizationId; + this.projectId = $.projectId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetOrganizationProjectArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetOrganizationProjectArgs $; + + public Builder() { + $ = new GetOrganizationProjectArgs(); + } + + public Builder(GetOrganizationProjectArgs defaults) { + $ = new GetOrganizationProjectArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(Output organizationId) { + $.organizationId = organizationId; + return this; + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(String organizationId) { + return organizationId(Output.of(organizationId)); + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(Output projectId) { + $.projectId = projectId; + return this; + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(String projectId) { + return projectId(Output.of(projectId)); + } + + public GetOrganizationProjectArgs build() { + if ($.organizationId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectArgs", "organizationId"); + } + if ($.projectId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectArgs", "projectId"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectPlainArgs.java b/sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectPlainArgs.java new file mode 100644 index 00000000..ef9094bd --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/inputs/GetOrganizationProjectPlainArgs.java @@ -0,0 +1,104 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.inputs; + +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetOrganizationProjectPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetOrganizationProjectPlainArgs Empty = new GetOrganizationProjectPlainArgs(); + + /** + * ID of an organization. Changing this property forces recreation of the resource. + * + */ + @Import(name="organizationId", required=true) + private String organizationId; + + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + public String organizationId() { + return this.organizationId; + } + + /** + * Unique identifier for the project that also serves as the project name. + * + */ + @Import(name="projectId", required=true) + private String projectId; + + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + public String projectId() { + return this.projectId; + } + + private GetOrganizationProjectPlainArgs() {} + + private GetOrganizationProjectPlainArgs(GetOrganizationProjectPlainArgs $) { + this.organizationId = $.organizationId; + this.projectId = $.projectId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetOrganizationProjectPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetOrganizationProjectPlainArgs $; + + public Builder() { + $ = new GetOrganizationProjectPlainArgs(); + } + + public Builder(GetOrganizationProjectPlainArgs defaults) { + $ = new GetOrganizationProjectPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(String organizationId) { + $.organizationId = organizationId; + return this; + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(String projectId) { + $.projectId = projectId; + return this; + } + + public GetOrganizationProjectPlainArgs build() { + if ($.organizationId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectPlainArgs", "organizationId"); + } + if ($.projectId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectPlainArgs", "projectId"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectState.java b/sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectState.java new file mode 100644 index 00000000..ea9293d1 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectState.java @@ -0,0 +1,290 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.inputs; + +import com.pulumi.aiven.inputs.OrganizationProjectTagArgs; +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationProjectState extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationProjectState Empty = new OrganizationProjectState(); + + /** + * Billing group ID to assign to the project. + * + */ + @Import(name="billingGroupId") + private @Nullable Output billingGroupId; + + /** + * @return Billing group ID to assign to the project. + * + */ + public Optional> billingGroupId() { + return Optional.ofNullable(this.billingGroupId); + } + + /** + * ID of an organization. Changing this property forces recreation of the resource. + * + */ + @Import(name="organizationId") + private @Nullable Output organizationId; + + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + public Optional> organizationId() { + return Optional.ofNullable(this.organizationId); + } + + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + @Import(name="parentId") + private @Nullable Output parentId; + + /** + * @return Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + public Optional> parentId() { + return Optional.ofNullable(this.parentId); + } + + /** + * Unique identifier for the project that also serves as the project name. + * + */ + @Import(name="projectId") + private @Nullable Output projectId; + + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + public Optional> projectId() { + return Optional.ofNullable(this.projectId); + } + + /** + * Tags are key-value pairs that allow you to categorize projects. + * + */ + @Import(name="tags") + private @Nullable Output> tags; + + /** + * @return Tags are key-value pairs that allow you to categorize projects. + * + */ + public Optional>> tags() { + return Optional.ofNullable(this.tags); + } + + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + @Import(name="technicalEmails") + private @Nullable Output> technicalEmails; + + /** + * @return The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + public Optional>> technicalEmails() { + return Optional.ofNullable(this.technicalEmails); + } + + private OrganizationProjectState() {} + + private OrganizationProjectState(OrganizationProjectState $) { + this.billingGroupId = $.billingGroupId; + this.organizationId = $.organizationId; + this.parentId = $.parentId; + this.projectId = $.projectId; + this.tags = $.tags; + this.technicalEmails = $.technicalEmails; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationProjectState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationProjectState $; + + public Builder() { + $ = new OrganizationProjectState(); + } + + public Builder(OrganizationProjectState defaults) { + $ = new OrganizationProjectState(Objects.requireNonNull(defaults)); + } + + /** + * @param billingGroupId Billing group ID to assign to the project. + * + * @return builder + * + */ + public Builder billingGroupId(@Nullable Output billingGroupId) { + $.billingGroupId = billingGroupId; + return this; + } + + /** + * @param billingGroupId Billing group ID to assign to the project. + * + * @return builder + * + */ + public Builder billingGroupId(String billingGroupId) { + return billingGroupId(Output.of(billingGroupId)); + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(@Nullable Output organizationId) { + $.organizationId = organizationId; + return this; + } + + /** + * @param organizationId ID of an organization. Changing this property forces recreation of the resource. + * + * @return builder + * + */ + public Builder organizationId(String organizationId) { + return organizationId(Output.of(organizationId)); + } + + /** + * @param parentId Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + * @return builder + * + */ + public Builder parentId(@Nullable Output parentId) { + $.parentId = parentId; + return this; + } + + /** + * @param parentId Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + * @return builder + * + */ + public Builder parentId(String parentId) { + return parentId(Output.of(parentId)); + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(@Nullable Output projectId) { + $.projectId = projectId; + return this; + } + + /** + * @param projectId Unique identifier for the project that also serves as the project name. + * + * @return builder + * + */ + public Builder projectId(String projectId) { + return projectId(Output.of(projectId)); + } + + /** + * @param tags Tags are key-value pairs that allow you to categorize projects. + * + * @return builder + * + */ + public Builder tags(@Nullable Output> tags) { + $.tags = tags; + return this; + } + + /** + * @param tags Tags are key-value pairs that allow you to categorize projects. + * + * @return builder + * + */ + public Builder tags(List tags) { + return tags(Output.of(tags)); + } + + /** + * @param tags Tags are key-value pairs that allow you to categorize projects. + * + * @return builder + * + */ + public Builder tags(OrganizationProjectTagArgs... tags) { + return tags(List.of(tags)); + } + + /** + * @param technicalEmails The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + * @return builder + * + */ + public Builder technicalEmails(@Nullable Output> technicalEmails) { + $.technicalEmails = technicalEmails; + return this; + } + + /** + * @param technicalEmails The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + * @return builder + * + */ + public Builder technicalEmails(List technicalEmails) { + return technicalEmails(Output.of(technicalEmails)); + } + + /** + * @param technicalEmails The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + * @return builder + * + */ + public Builder technicalEmails(String... technicalEmails) { + return technicalEmails(List.of(technicalEmails)); + } + + public OrganizationProjectState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectTagArgs.java b/sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectTagArgs.java new file mode 100644 index 00000000..dfb18d8c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/inputs/OrganizationProjectTagArgs.java @@ -0,0 +1,125 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class OrganizationProjectTagArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationProjectTagArgs Empty = new OrganizationProjectTagArgs(); + + /** + * Project tag key. + * + */ + @Import(name="key", required=true) + private Output key; + + /** + * @return Project tag key. + * + */ + public Output key() { + return this.key; + } + + /** + * Project tag value. + * + */ + @Import(name="value", required=true) + private Output value; + + /** + * @return Project tag value. + * + */ + public Output value() { + return this.value; + } + + private OrganizationProjectTagArgs() {} + + private OrganizationProjectTagArgs(OrganizationProjectTagArgs $) { + this.key = $.key; + this.value = $.value; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationProjectTagArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationProjectTagArgs $; + + public Builder() { + $ = new OrganizationProjectTagArgs(); + } + + public Builder(OrganizationProjectTagArgs defaults) { + $ = new OrganizationProjectTagArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param key Project tag key. + * + * @return builder + * + */ + public Builder key(Output key) { + $.key = key; + return this; + } + + /** + * @param key Project tag key. + * + * @return builder + * + */ + public Builder key(String key) { + return key(Output.of(key)); + } + + /** + * @param value Project tag value. + * + * @return builder + * + */ + public Builder value(Output value) { + $.value = value; + return this; + } + + /** + * @param value Project tag value. + * + * @return builder + * + */ + public Builder value(String value) { + return value(Output.of(value)); + } + + public OrganizationProjectTagArgs build() { + if ($.key == null) { + throw new MissingRequiredPropertyException("OrganizationProjectTagArgs", "key"); + } + if ($.value == null) { + throw new MissingRequiredPropertyException("OrganizationProjectTagArgs", "value"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectResult.java b/sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectResult.java new file mode 100644 index 00000000..15f29171 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectResult.java @@ -0,0 +1,204 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.outputs; + +import com.pulumi.aiven.outputs.GetOrganizationProjectTag; +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetOrganizationProjectResult { + /** + * @return Billing group ID to assign to the project. + * + */ + private String billingGroupId; + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + private String organizationId; + /** + * @return Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + private String parentId; + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + private String projectId; + /** + * @return Tags are key-value pairs that allow you to categorize projects. + * + */ + private List tags; + /** + * @return The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + private List technicalEmails; + + private GetOrganizationProjectResult() {} + /** + * @return Billing group ID to assign to the project. + * + */ + public String billingGroupId() { + return this.billingGroupId; + } + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + /** + * @return ID of an organization. Changing this property forces recreation of the resource. + * + */ + public String organizationId() { + return this.organizationId; + } + /** + * @return Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + * + */ + public String parentId() { + return this.parentId; + } + /** + * @return Unique identifier for the project that also serves as the project name. + * + */ + public String projectId() { + return this.projectId; + } + /** + * @return Tags are key-value pairs that allow you to categorize projects. + * + */ + public List tags() { + return this.tags; + } + /** + * @return The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + * + */ + public List technicalEmails() { + return this.technicalEmails; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetOrganizationProjectResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String billingGroupId; + private String id; + private String organizationId; + private String parentId; + private String projectId; + private List tags; + private List technicalEmails; + public Builder() {} + public Builder(GetOrganizationProjectResult defaults) { + Objects.requireNonNull(defaults); + this.billingGroupId = defaults.billingGroupId; + this.id = defaults.id; + this.organizationId = defaults.organizationId; + this.parentId = defaults.parentId; + this.projectId = defaults.projectId; + this.tags = defaults.tags; + this.technicalEmails = defaults.technicalEmails; + } + + @CustomType.Setter + public Builder billingGroupId(String billingGroupId) { + if (billingGroupId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "billingGroupId"); + } + this.billingGroupId = billingGroupId; + return this; + } + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "id"); + } + this.id = id; + return this; + } + @CustomType.Setter + public Builder organizationId(String organizationId) { + if (organizationId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "organizationId"); + } + this.organizationId = organizationId; + return this; + } + @CustomType.Setter + public Builder parentId(String parentId) { + if (parentId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "parentId"); + } + this.parentId = parentId; + return this; + } + @CustomType.Setter + public Builder projectId(String projectId) { + if (projectId == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "projectId"); + } + this.projectId = projectId; + return this; + } + @CustomType.Setter + public Builder tags(List tags) { + if (tags == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "tags"); + } + this.tags = tags; + return this; + } + public Builder tags(GetOrganizationProjectTag... tags) { + return tags(List.of(tags)); + } + @CustomType.Setter + public Builder technicalEmails(List technicalEmails) { + if (technicalEmails == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectResult", "technicalEmails"); + } + this.technicalEmails = technicalEmails; + return this; + } + public Builder technicalEmails(String... technicalEmails) { + return technicalEmails(List.of(technicalEmails)); + } + public GetOrganizationProjectResult build() { + final var _resultValue = new GetOrganizationProjectResult(); + _resultValue.billingGroupId = billingGroupId; + _resultValue.id = id; + _resultValue.organizationId = organizationId; + _resultValue.parentId = parentId; + _resultValue.projectId = projectId; + _resultValue.tags = tags; + _resultValue.technicalEmails = technicalEmails; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectTag.java b/sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectTag.java new file mode 100644 index 00000000..bc2a5f4c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/outputs/GetOrganizationProjectTag.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class GetOrganizationProjectTag { + /** + * @return Project tag key. + * + */ + private String key; + /** + * @return Project tag value. + * + */ + private String value; + + private GetOrganizationProjectTag() {} + /** + * @return Project tag key. + * + */ + public String key() { + return this.key; + } + /** + * @return Project tag value. + * + */ + public String value() { + return this.value; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetOrganizationProjectTag defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String key; + private String value; + public Builder() {} + public Builder(GetOrganizationProjectTag defaults) { + Objects.requireNonNull(defaults); + this.key = defaults.key; + this.value = defaults.value; + } + + @CustomType.Setter + public Builder key(String key) { + if (key == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectTag", "key"); + } + this.key = key; + return this; + } + @CustomType.Setter + public Builder value(String value) { + if (value == null) { + throw new MissingRequiredPropertyException("GetOrganizationProjectTag", "value"); + } + this.value = value; + return this; + } + public GetOrganizationProjectTag build() { + final var _resultValue = new GetOrganizationProjectTag(); + _resultValue.key = key; + _resultValue.value = value; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/aiven/outputs/OrganizationProjectTag.java b/sdk/java/src/main/java/com/pulumi/aiven/outputs/OrganizationProjectTag.java new file mode 100644 index 00000000..d80deee0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/aiven/outputs/OrganizationProjectTag.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.aiven.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class OrganizationProjectTag { + /** + * @return Project tag key. + * + */ + private String key; + /** + * @return Project tag value. + * + */ + private String value; + + private OrganizationProjectTag() {} + /** + * @return Project tag key. + * + */ + public String key() { + return this.key; + } + /** + * @return Project tag value. + * + */ + public String value() { + return this.value; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationProjectTag defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String key; + private String value; + public Builder() {} + public Builder(OrganizationProjectTag defaults) { + Objects.requireNonNull(defaults); + this.key = defaults.key; + this.value = defaults.value; + } + + @CustomType.Setter + public Builder key(String key) { + if (key == null) { + throw new MissingRequiredPropertyException("OrganizationProjectTag", "key"); + } + this.key = key; + return this; + } + @CustomType.Setter + public Builder value(String value) { + if (value == null) { + throw new MissingRequiredPropertyException("OrganizationProjectTag", "value"); + } + this.value = value; + return this; + } + public OrganizationProjectTag build() { + final var _resultValue = new OrganizationProjectTag(); + _resultValue.key = key; + _resultValue.value = value; + return _resultValue; + } + } +} diff --git a/sdk/nodejs/account.ts b/sdk/nodejs/account.ts index 26d3d7aa..b3c78113 100644 --- a/sdk/nodejs/account.ts +++ b/sdk/nodejs/account.ts @@ -7,8 +7,7 @@ import * as utilities from "./utilities"; /** * Creates and manages an Aiven account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage diff --git a/sdk/nodejs/accountAuthentication.ts b/sdk/nodejs/accountAuthentication.ts index 6f82de20..36f26a4d 100644 --- a/sdk/nodejs/accountAuthentication.ts +++ b/sdk/nodejs/accountAuthentication.ts @@ -9,8 +9,7 @@ import * as utilities from "./utilities"; /** * Creates and manages an authentication method. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * To set up an identity provider as an authentication method for your organization, * [use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers). * It guides you through the steps and explains the settings. diff --git a/sdk/nodejs/getAccount.ts b/sdk/nodejs/getAccount.ts index 13a2b571..84cd80a6 100644 --- a/sdk/nodejs/getAccount.ts +++ b/sdk/nodejs/getAccount.ts @@ -7,8 +7,7 @@ import * as utilities from "./utilities"; /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage @@ -83,8 +82,7 @@ export interface GetAccountResult { /** * The Account data source provides information about the existing Aiven Account. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource will be removed in v5.0.0. Use `aiven.Organization` instead. * * ## Example Usage diff --git a/sdk/nodejs/getAccountAuthentication.ts b/sdk/nodejs/getAccountAuthentication.ts index 057e6918..d3648111 100644 --- a/sdk/nodejs/getAccountAuthentication.ts +++ b/sdk/nodejs/getAccountAuthentication.ts @@ -9,8 +9,7 @@ import * as utilities from "./utilities"; /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated */ export function getAccountAuthentication(args: GetAccountAuthenticationArgs, opts?: pulumi.InvokeOptions): Promise { @@ -119,8 +118,7 @@ export interface GetAccountAuthenticationResult { /** * The Account Authentication data source provides information about the existing Aiven Account Authentication. * - * > **This resource is deprecated**. - * + * > **This resource is deprecated** * This resource is deprecated */ export function getAccountAuthenticationOutput(args: GetAccountAuthenticationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { diff --git a/sdk/nodejs/getOrganizationProject.ts b/sdk/nodejs/getOrganizationProject.ts new file mode 100644 index 00000000..159db4cf --- /dev/null +++ b/sdk/nodejs/getOrganizationProject.ts @@ -0,0 +1,120 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as aiven from "@pulumi/aiven"; + * + * const example = aiven.getOrganizationProject({ + * projectId: foo.projectId, + * organizationId: foo.organizationId, + * }); + * ``` + */ +export function getOrganizationProject(args: GetOrganizationProjectArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("aiven:index/getOrganizationProject:getOrganizationProject", { + "organizationId": args.organizationId, + "projectId": args.projectId, + }, opts); +} + +/** + * A collection of arguments for invoking getOrganizationProject. + */ +export interface GetOrganizationProjectArgs { + /** + * ID of an organization. Changing this property forces recreation of the resource. + */ + organizationId: string; + /** + * Unique identifier for the project that also serves as the project name. + */ + projectId: string; +} + +/** + * A collection of values returned by getOrganizationProject. + */ +export interface GetOrganizationProjectResult { + /** + * Billing group ID to assign to the project. + */ + readonly billingGroupId: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * ID of an organization. Changing this property forces recreation of the resource. + */ + readonly organizationId: string; + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + */ + readonly parentId: string; + /** + * Unique identifier for the project that also serves as the project name. + */ + readonly projectId: string; + /** + * Tags are key-value pairs that allow you to categorize projects. + */ + readonly tags: outputs.GetOrganizationProjectTag[]; + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + */ + readonly technicalEmails: string[]; +} +/** + * Gets information about an Aiven project. + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as aiven from "@pulumi/aiven"; + * + * const example = aiven.getOrganizationProject({ + * projectId: foo.projectId, + * organizationId: foo.organizationId, + * }); + * ``` + */ +export function getOrganizationProjectOutput(args: GetOrganizationProjectOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("aiven:index/getOrganizationProject:getOrganizationProject", { + "organizationId": args.organizationId, + "projectId": args.projectId, + }, opts); +} + +/** + * A collection of arguments for invoking getOrganizationProject. + */ +export interface GetOrganizationProjectOutputArgs { + /** + * ID of an organization. Changing this property forces recreation of the resource. + */ + organizationId: pulumi.Input; + /** + * Unique identifier for the project that also serves as the project name. + */ + projectId: pulumi.Input; +} diff --git a/sdk/nodejs/getProjectUser.ts b/sdk/nodejs/getProjectUser.ts index e973465a..6bdd5218 100644 --- a/sdk/nodejs/getProjectUser.ts +++ b/sdk/nodejs/getProjectUser.ts @@ -7,9 +7,10 @@ import * as utilities from "./utilities"; /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * @@ -73,9 +74,10 @@ export interface GetProjectUserResult { /** * The Project User data source provides information about the existing Aiven Project User. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources + * to the new resource. * * ## Example Usage * diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index a38cafc4..d3249d48 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -445,6 +445,11 @@ export const getOrganizationApplicationUser: typeof import("./getOrganizationApp export const getOrganizationApplicationUserOutput: typeof import("./getOrganizationApplicationUser").getOrganizationApplicationUserOutput = null as any; utilities.lazyLoad(exports, ["getOrganizationApplicationUser","getOrganizationApplicationUserOutput"], () => require("./getOrganizationApplicationUser")); +export { GetOrganizationProjectArgs, GetOrganizationProjectResult, GetOrganizationProjectOutputArgs } from "./getOrganizationProject"; +export const getOrganizationProject: typeof import("./getOrganizationProject").getOrganizationProject = null as any; +export const getOrganizationProjectOutput: typeof import("./getOrganizationProject").getOrganizationProjectOutput = null as any; +utilities.lazyLoad(exports, ["getOrganizationProject","getOrganizationProjectOutput"], () => require("./getOrganizationProject")); + export { GetOrganizationUserArgs, GetOrganizationUserResult, GetOrganizationUserOutputArgs } from "./getOrganizationUser"; export const getOrganizationUser: typeof import("./getOrganizationUser").getOrganizationUser = null as any; export const getOrganizationUserOutput: typeof import("./getOrganizationUser").getOrganizationUserOutput = null as any; @@ -705,6 +710,11 @@ export type OrganizationPermission = import("./organizationPermission").Organiza export const OrganizationPermission: typeof import("./organizationPermission").OrganizationPermission = null as any; utilities.lazyLoad(exports, ["OrganizationPermission"], () => require("./organizationPermission")); +export { OrganizationProjectArgs, OrganizationProjectState } from "./organizationProject"; +export type OrganizationProject = import("./organizationProject").OrganizationProject; +export const OrganizationProject: typeof import("./organizationProject").OrganizationProject = null as any; +utilities.lazyLoad(exports, ["OrganizationProject"], () => require("./organizationProject")); + export { OrganizationUserArgs, OrganizationUserState } from "./organizationUser"; export type OrganizationUser = import("./organizationUser").OrganizationUser; export const OrganizationUser: typeof import("./organizationUser").OrganizationUser = null as any; @@ -951,6 +961,8 @@ const _module = { return new OrganizationGroupProject(name, undefined, { urn }) case "aiven:index/organizationPermission:OrganizationPermission": return new OrganizationPermission(name, undefined, { urn }) + case "aiven:index/organizationProject:OrganizationProject": + return new OrganizationProject(name, undefined, { urn }) case "aiven:index/organizationUser:OrganizationUser": return new OrganizationUser(name, undefined, { urn }) case "aiven:index/organizationUserGroup:OrganizationUserGroup": @@ -1060,6 +1072,7 @@ pulumi.runtime.registerResourceModule("aiven", "index/organizationApplicationUse pulumi.runtime.registerResourceModule("aiven", "index/organizationApplicationUserToken", _module) pulumi.runtime.registerResourceModule("aiven", "index/organizationGroupProject", _module) pulumi.runtime.registerResourceModule("aiven", "index/organizationPermission", _module) +pulumi.runtime.registerResourceModule("aiven", "index/organizationProject", _module) pulumi.runtime.registerResourceModule("aiven", "index/organizationUser", _module) pulumi.runtime.registerResourceModule("aiven", "index/organizationUserGroup", _module) pulumi.runtime.registerResourceModule("aiven", "index/organizationUserGroupMember", _module) diff --git a/sdk/nodejs/organizationProject.ts b/sdk/nodejs/organizationProject.ts new file mode 100644 index 00000000..c23c9bfe --- /dev/null +++ b/sdk/nodejs/organizationProject.ts @@ -0,0 +1,191 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). + * + * **This resource is in the beta stage and may change without notice.** Set + * the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as aiven from "@pulumi/aiven"; + * + * const foo = new aiven.OrganizationProject("foo", { + * projectId: "example-project", + * organizationId: fooAivenOrganization.id, + * billingGroupId: fooAivenBillingGroup.id, + * tags: [{ + * key: "key_1", + * value: "value_1", + * }], + * }); + * ``` + * + * ## Import + * + * ```sh + * $ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID + * ``` + */ +export class OrganizationProject extends pulumi.CustomResource { + /** + * Get an existing OrganizationProject resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: OrganizationProjectState, opts?: pulumi.CustomResourceOptions): OrganizationProject { + return new OrganizationProject(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'aiven:index/organizationProject:OrganizationProject'; + + /** + * Returns true if the given object is an instance of OrganizationProject. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is OrganizationProject { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === OrganizationProject.__pulumiType; + } + + /** + * Billing group ID to assign to the project. + */ + public readonly billingGroupId!: pulumi.Output; + /** + * ID of an organization. Changing this property forces recreation of the resource. + */ + public readonly organizationId!: pulumi.Output; + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + */ + public readonly parentId!: pulumi.Output; + /** + * Unique identifier for the project that also serves as the project name. + */ + public readonly projectId!: pulumi.Output; + /** + * Tags are key-value pairs that allow you to categorize projects. + */ + public readonly tags!: pulumi.Output; + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + */ + public readonly technicalEmails!: pulumi.Output; + + /** + * Create a OrganizationProject resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: OrganizationProjectArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: OrganizationProjectArgs | OrganizationProjectState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as OrganizationProjectState | undefined; + resourceInputs["billingGroupId"] = state ? state.billingGroupId : undefined; + resourceInputs["organizationId"] = state ? state.organizationId : undefined; + resourceInputs["parentId"] = state ? state.parentId : undefined; + resourceInputs["projectId"] = state ? state.projectId : undefined; + resourceInputs["tags"] = state ? state.tags : undefined; + resourceInputs["technicalEmails"] = state ? state.technicalEmails : undefined; + } else { + const args = argsOrState as OrganizationProjectArgs | undefined; + if ((!args || args.billingGroupId === undefined) && !opts.urn) { + throw new Error("Missing required property 'billingGroupId'"); + } + if ((!args || args.organizationId === undefined) && !opts.urn) { + throw new Error("Missing required property 'organizationId'"); + } + if ((!args || args.projectId === undefined) && !opts.urn) { + throw new Error("Missing required property 'projectId'"); + } + resourceInputs["billingGroupId"] = args ? args.billingGroupId : undefined; + resourceInputs["organizationId"] = args ? args.organizationId : undefined; + resourceInputs["parentId"] = args ? args.parentId : undefined; + resourceInputs["projectId"] = args ? args.projectId : undefined; + resourceInputs["tags"] = args ? args.tags : undefined; + resourceInputs["technicalEmails"] = args ? args.technicalEmails : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(OrganizationProject.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering OrganizationProject resources. + */ +export interface OrganizationProjectState { + /** + * Billing group ID to assign to the project. + */ + billingGroupId?: pulumi.Input; + /** + * ID of an organization. Changing this property forces recreation of the resource. + */ + organizationId?: pulumi.Input; + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + */ + parentId?: pulumi.Input; + /** + * Unique identifier for the project that also serves as the project name. + */ + projectId?: pulumi.Input; + /** + * Tags are key-value pairs that allow you to categorize projects. + */ + tags?: pulumi.Input[]>; + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + */ + technicalEmails?: pulumi.Input[]>; +} + +/** + * The set of arguments for constructing a OrganizationProject resource. + */ +export interface OrganizationProjectArgs { + /** + * Billing group ID to assign to the project. + */ + billingGroupId: pulumi.Input; + /** + * ID of an organization. Changing this property forces recreation of the resource. + */ + organizationId: pulumi.Input; + /** + * Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + */ + parentId?: pulumi.Input; + /** + * Unique identifier for the project that also serves as the project name. + */ + projectId: pulumi.Input; + /** + * Tags are key-value pairs that allow you to categorize projects. + */ + tags?: pulumi.Input[]>; + /** + * The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + */ + technicalEmails?: pulumi.Input[]>; +} diff --git a/sdk/nodejs/projectUser.ts b/sdk/nodejs/projectUser.ts index 5f0dcbc0..2d041db6 100644 --- a/sdk/nodejs/projectUser.ts +++ b/sdk/nodejs/projectUser.ts @@ -7,14 +7,11 @@ import * as utilities from "./utilities"; /** * Creates and manages an Aiven project member. * - * **This resource is deprecated.** Use `aiven.OrganizationPermission` and - * migrate existing aiven.ProjectUser resources + * > **This resource is deprecated** + * Use `aiven.OrganizationPermission` instead and + * migrate existing `aiven.ProjectUser` resources * to the new resource. * - * > **This resource is deprecated**. - * - * Use `aiven.OrganizationPermission` instead. - * * ## Example Usage * * ```typescript diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index c17b42a0..437987f7 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -103,6 +103,7 @@ "getOpensearchUser.ts", "getOrganization.ts", "getOrganizationApplicationUser.ts", + "getOrganizationProject.ts", "getOrganizationUser.ts", "getOrganizationUserGroup.ts", "getOrganizationUserList.ts", @@ -156,6 +157,7 @@ "organizationApplicationUserToken.ts", "organizationGroupProject.ts", "organizationPermission.ts", + "organizationProject.ts", "organizationUser.ts", "organizationUserGroup.ts", "organizationUserGroupMember.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 13868073..6d0236e2 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -5709,6 +5709,17 @@ export interface OrganizationPermissionPermission { updateTime?: pulumi.Input; } +export interface OrganizationProjectTag { + /** + * Project tag key. + */ + key: pulumi.Input; + /** + * Project tag value. + */ + value: pulumi.Input; +} + export interface OrganizationTimeouts { /** * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 6c91353a..84e6bd1d 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -7250,6 +7250,17 @@ export interface GetOpenSearchTechEmail { email: string; } +export interface GetOrganizationProjectTag { + /** + * Project tag key. + */ + key: string; + /** + * Project tag value. + */ + value: string; +} + export interface GetOrganizationUserListUser { /** * Super admin state of the organization user @@ -14041,6 +14052,17 @@ export interface OrganizationPermissionPermission { updateTime: string; } +export interface OrganizationProjectTag { + /** + * Project tag key. + */ + key: string; + /** + * Project tag value. + */ + value: string; +} + export interface OrganizationTimeouts { /** * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). diff --git a/sdk/python/pulumi_aiven/__init__.py b/sdk/python/pulumi_aiven/__init__.py index 57312eae..feb35a8e 100644 --- a/sdk/python/pulumi_aiven/__init__.py +++ b/sdk/python/pulumi_aiven/__init__.py @@ -93,6 +93,7 @@ from .get_opensearch_user import * from .get_organization import * from .get_organization_application_user import * +from .get_organization_project import * from .get_organization_user import * from .get_organization_user_group import * from .get_organization_user_list import * @@ -145,6 +146,7 @@ from .organization_application_user_token import * from .organization_group_project import * from .organization_permission import * +from .organization_project import * from .organization_user import * from .organization_user_group import * from .organization_user_group_member import * @@ -706,6 +708,14 @@ "aiven:index/organizationPermission:OrganizationPermission": "OrganizationPermission" } }, + { + "pkg": "aiven", + "mod": "index/organizationProject", + "fqn": "pulumi_aiven", + "classes": { + "aiven:index/organizationProject:OrganizationProject": "OrganizationProject" + } + }, { "pkg": "aiven", "mod": "index/organizationUser", diff --git a/sdk/python/pulumi_aiven/_inputs.py b/sdk/python/pulumi_aiven/_inputs.py index befd2cb8..c68b96b7 100644 --- a/sdk/python/pulumi_aiven/_inputs.py +++ b/sdk/python/pulumi_aiven/_inputs.py @@ -453,6 +453,8 @@ 'OrganizationGroupProjectTimeoutsArgsDict', 'OrganizationPermissionPermissionArgs', 'OrganizationPermissionPermissionArgsDict', + 'OrganizationProjectTagArgs', + 'OrganizationProjectTagArgsDict', 'OrganizationTimeoutsArgs', 'OrganizationTimeoutsArgsDict', 'OrganizationUserGroupMemberTimeoutsArgs', @@ -28225,6 +28227,56 @@ def update_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "update_time", value) +if not MYPY: + class OrganizationProjectTagArgsDict(TypedDict): + key: pulumi.Input[str] + """ + Project tag key. + """ + value: pulumi.Input[str] + """ + Project tag value. + """ +elif False: + OrganizationProjectTagArgsDict: TypeAlias = Mapping[str, Any] + +@pulumi.input_type +class OrganizationProjectTagArgs: + def __init__(__self__, *, + key: pulumi.Input[str], + value: pulumi.Input[str]): + """ + :param pulumi.Input[str] key: Project tag key. + :param pulumi.Input[str] value: Project tag value. + """ + pulumi.set(__self__, "key", key) + pulumi.set(__self__, "value", value) + + @property + @pulumi.getter + def key(self) -> pulumi.Input[str]: + """ + Project tag key. + """ + return pulumi.get(self, "key") + + @key.setter + def key(self, value: pulumi.Input[str]): + pulumi.set(self, "key", value) + + @property + @pulumi.getter + def value(self) -> pulumi.Input[str]: + """ + Project tag value. + """ + return pulumi.get(self, "value") + + @value.setter + def value(self, value: pulumi.Input[str]): + pulumi.set(self, "value", value) + + if not MYPY: class OrganizationTimeoutsArgsDict(TypedDict): create: NotRequired[pulumi.Input[str]] diff --git a/sdk/python/pulumi_aiven/account.py b/sdk/python/pulumi_aiven/account.py index 99c48960..fe1a300b 100644 --- a/sdk/python/pulumi_aiven/account.py +++ b/sdk/python/pulumi_aiven/account.py @@ -223,8 +223,7 @@ def __init__(__self__, """ Creates and manages an Aiven account. - > **This resource is deprecated**. - + > **This resource is deprecated** This resource will be removed in v5.0.0. Use `Organization` instead. ## Example Usage @@ -256,8 +255,7 @@ def __init__(__self__, """ Creates and manages an Aiven account. - > **This resource is deprecated**. - + > **This resource is deprecated** This resource will be removed in v5.0.0. Use `Organization` instead. ## Example Usage diff --git a/sdk/python/pulumi_aiven/account_authentication.py b/sdk/python/pulumi_aiven/account_authentication.py index 536e4c7a..3ec5f605 100644 --- a/sdk/python/pulumi_aiven/account_authentication.py +++ b/sdk/python/pulumi_aiven/account_authentication.py @@ -550,8 +550,7 @@ def __init__(__self__, """ Creates and manages an authentication method. - > **This resource is deprecated**. - + > **This resource is deprecated** To set up an identity provider as an authentication method for your organization, [use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers). It guides you through the steps and explains the settings. @@ -587,8 +586,7 @@ def __init__(__self__, """ Creates and manages an authentication method. - > **This resource is deprecated**. - + > **This resource is deprecated** To set up an identity provider as an authentication method for your organization, [use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers). It guides you through the steps and explains the settings. diff --git a/sdk/python/pulumi_aiven/get_account.py b/sdk/python/pulumi_aiven/get_account.py index edc842b5..d17ece64 100644 --- a/sdk/python/pulumi_aiven/get_account.py +++ b/sdk/python/pulumi_aiven/get_account.py @@ -150,8 +150,7 @@ def get_account(name: Optional[str] = None, """ The Account data source provides information about the existing Aiven Account. - > **This resource is deprecated**. - + > **This resource is deprecated** This resource will be removed in v5.0.0. Use `Organization` instead. ## Example Usage @@ -186,8 +185,7 @@ def get_account_output(name: Optional[pulumi.Input[str]] = None, """ The Account data source provides information about the existing Aiven Account. - > **This resource is deprecated**. - + > **This resource is deprecated** This resource will be removed in v5.0.0. Use `Organization` instead. ## Example Usage diff --git a/sdk/python/pulumi_aiven/get_account_authentication.py b/sdk/python/pulumi_aiven/get_account_authentication.py index b963d612..dc8cdc9d 100644 --- a/sdk/python/pulumi_aiven/get_account_authentication.py +++ b/sdk/python/pulumi_aiven/get_account_authentication.py @@ -272,8 +272,7 @@ def get_account_authentication(account_id: Optional[str] = None, """ The Account Authentication data source provides information about the existing Aiven Account Authentication. - > **This resource is deprecated**. - + > **This resource is deprecated** This resource is deprecated @@ -312,8 +311,7 @@ def get_account_authentication_output(account_id: Optional[pulumi.Input[str]] = """ The Account Authentication data source provides information about the existing Aiven Account Authentication. - > **This resource is deprecated**. - + > **This resource is deprecated** This resource is deprecated diff --git a/sdk/python/pulumi_aiven/get_organization_project.py b/sdk/python/pulumi_aiven/get_organization_project.py new file mode 100644 index 00000000..332016e3 --- /dev/null +++ b/sdk/python/pulumi_aiven/get_organization_project.py @@ -0,0 +1,197 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities +from . import outputs + +__all__ = [ + 'GetOrganizationProjectResult', + 'AwaitableGetOrganizationProjectResult', + 'get_organization_project', + 'get_organization_project_output', +] + +@pulumi.output_type +class GetOrganizationProjectResult: + """ + A collection of values returned by getOrganizationProject. + """ + def __init__(__self__, billing_group_id=None, id=None, organization_id=None, parent_id=None, project_id=None, tags=None, technical_emails=None): + if billing_group_id and not isinstance(billing_group_id, str): + raise TypeError("Expected argument 'billing_group_id' to be a str") + pulumi.set(__self__, "billing_group_id", billing_group_id) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if organization_id and not isinstance(organization_id, str): + raise TypeError("Expected argument 'organization_id' to be a str") + pulumi.set(__self__, "organization_id", organization_id) + if parent_id and not isinstance(parent_id, str): + raise TypeError("Expected argument 'parent_id' to be a str") + pulumi.set(__self__, "parent_id", parent_id) + if project_id and not isinstance(project_id, str): + raise TypeError("Expected argument 'project_id' to be a str") + pulumi.set(__self__, "project_id", project_id) + if tags and not isinstance(tags, list): + raise TypeError("Expected argument 'tags' to be a list") + pulumi.set(__self__, "tags", tags) + if technical_emails and not isinstance(technical_emails, list): + raise TypeError("Expected argument 'technical_emails' to be a list") + pulumi.set(__self__, "technical_emails", technical_emails) + + @property + @pulumi.getter(name="billingGroupId") + def billing_group_id(self) -> str: + """ + Billing group ID to assign to the project. + """ + return pulumi.get(self, "billing_group_id") + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="organizationId") + def organization_id(self) -> str: + """ + ID of an organization. Changing this property forces recreation of the resource. + """ + return pulumi.get(self, "organization_id") + + @property + @pulumi.getter(name="parentId") + def parent_id(self) -> str: + """ + Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + """ + return pulumi.get(self, "parent_id") + + @property + @pulumi.getter(name="projectId") + def project_id(self) -> str: + """ + Unique identifier for the project that also serves as the project name. + """ + return pulumi.get(self, "project_id") + + @property + @pulumi.getter + def tags(self) -> Sequence['outputs.GetOrganizationProjectTagResult']: + """ + Tags are key-value pairs that allow you to categorize projects. + """ + return pulumi.get(self, "tags") + + @property + @pulumi.getter(name="technicalEmails") + def technical_emails(self) -> Sequence[str]: + """ + The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + return pulumi.get(self, "technical_emails") + + +class AwaitableGetOrganizationProjectResult(GetOrganizationProjectResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetOrganizationProjectResult( + billing_group_id=self.billing_group_id, + id=self.id, + organization_id=self.organization_id, + parent_id=self.parent_id, + project_id=self.project_id, + tags=self.tags, + technical_emails=self.technical_emails) + + +def get_organization_project(organization_id: Optional[str] = None, + project_id: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOrganizationProjectResult: + """ + Gets information about an Aiven project. + + **This resource is in the beta stage and may change without notice.** Set + the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + + ## Example Usage + + ```python + import pulumi + import pulumi_aiven as aiven + + example = aiven.get_organization_project(project_id=foo["projectId"], + organization_id=foo["organizationId"]) + ``` + + + :param str organization_id: ID of an organization. Changing this property forces recreation of the resource. + :param str project_id: Unique identifier for the project that also serves as the project name. + """ + __args__ = dict() + __args__['organizationId'] = organization_id + __args__['projectId'] = project_id + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('aiven:index/getOrganizationProject:getOrganizationProject', __args__, opts=opts, typ=GetOrganizationProjectResult).value + + return AwaitableGetOrganizationProjectResult( + billing_group_id=pulumi.get(__ret__, 'billing_group_id'), + id=pulumi.get(__ret__, 'id'), + organization_id=pulumi.get(__ret__, 'organization_id'), + parent_id=pulumi.get(__ret__, 'parent_id'), + project_id=pulumi.get(__ret__, 'project_id'), + tags=pulumi.get(__ret__, 'tags'), + technical_emails=pulumi.get(__ret__, 'technical_emails')) +def get_organization_project_output(organization_id: Optional[pulumi.Input[str]] = None, + project_id: Optional[pulumi.Input[str]] = None, + opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOrganizationProjectResult]: + """ + Gets information about an Aiven project. + + **This resource is in the beta stage and may change without notice.** Set + the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + + ## Example Usage + + ```python + import pulumi + import pulumi_aiven as aiven + + example = aiven.get_organization_project(project_id=foo["projectId"], + organization_id=foo["organizationId"]) + ``` + + + :param str organization_id: ID of an organization. Changing this property forces recreation of the resource. + :param str project_id: Unique identifier for the project that also serves as the project name. + """ + __args__ = dict() + __args__['organizationId'] = organization_id + __args__['projectId'] = project_id + opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('aiven:index/getOrganizationProject:getOrganizationProject', __args__, opts=opts, typ=GetOrganizationProjectResult) + return __ret__.apply(lambda __response__: GetOrganizationProjectResult( + billing_group_id=pulumi.get(__response__, 'billing_group_id'), + id=pulumi.get(__response__, 'id'), + organization_id=pulumi.get(__response__, 'organization_id'), + parent_id=pulumi.get(__response__, 'parent_id'), + project_id=pulumi.get(__response__, 'project_id'), + tags=pulumi.get(__response__, 'tags'), + technical_emails=pulumi.get(__response__, 'technical_emails'))) diff --git a/sdk/python/pulumi_aiven/get_project_user.py b/sdk/python/pulumi_aiven/get_project_user.py index 159daa9f..30faac6b 100644 --- a/sdk/python/pulumi_aiven/get_project_user.py +++ b/sdk/python/pulumi_aiven/get_project_user.py @@ -103,9 +103,10 @@ def get_project_user(email: Optional[str] = None, """ The Project User data source provides information about the existing Aiven Project User. - > **This resource is deprecated**. - - Use `OrganizationPermission` instead. + > **This resource is deprecated** + Use `OrganizationPermission` instead and + migrate existing `ProjectUser` resources + to the new resource. ## Example Usage @@ -139,9 +140,10 @@ def get_project_user_output(email: Optional[pulumi.Input[str]] = None, """ The Project User data source provides information about the existing Aiven Project User. - > **This resource is deprecated**. - - Use `OrganizationPermission` instead. + > **This resource is deprecated** + Use `OrganizationPermission` instead and + migrate existing `ProjectUser` resources + to the new resource. ## Example Usage diff --git a/sdk/python/pulumi_aiven/organization_project.py b/sdk/python/pulumi_aiven/organization_project.py new file mode 100644 index 00000000..225e25ec --- /dev/null +++ b/sdk/python/pulumi_aiven/organization_project.py @@ -0,0 +1,440 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['OrganizationProjectArgs', 'OrganizationProject'] + +@pulumi.input_type +class OrganizationProjectArgs: + def __init__(__self__, *, + billing_group_id: pulumi.Input[str], + organization_id: pulumi.Input[str], + project_id: pulumi.Input[str], + parent_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]]] = None, + technical_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + The set of arguments for constructing a OrganizationProject resource. + :param pulumi.Input[str] billing_group_id: Billing group ID to assign to the project. + :param pulumi.Input[str] organization_id: ID of an organization. Changing this property forces recreation of the resource. + :param pulumi.Input[str] project_id: Unique identifier for the project that also serves as the project name. + :param pulumi.Input[str] parent_id: Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + :param pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]] tags: Tags are key-value pairs that allow you to categorize projects. + :param pulumi.Input[Sequence[pulumi.Input[str]]] technical_emails: The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + pulumi.set(__self__, "billing_group_id", billing_group_id) + pulumi.set(__self__, "organization_id", organization_id) + pulumi.set(__self__, "project_id", project_id) + if parent_id is not None: + pulumi.set(__self__, "parent_id", parent_id) + if tags is not None: + pulumi.set(__self__, "tags", tags) + if technical_emails is not None: + pulumi.set(__self__, "technical_emails", technical_emails) + + @property + @pulumi.getter(name="billingGroupId") + def billing_group_id(self) -> pulumi.Input[str]: + """ + Billing group ID to assign to the project. + """ + return pulumi.get(self, "billing_group_id") + + @billing_group_id.setter + def billing_group_id(self, value: pulumi.Input[str]): + pulumi.set(self, "billing_group_id", value) + + @property + @pulumi.getter(name="organizationId") + def organization_id(self) -> pulumi.Input[str]: + """ + ID of an organization. Changing this property forces recreation of the resource. + """ + return pulumi.get(self, "organization_id") + + @organization_id.setter + def organization_id(self, value: pulumi.Input[str]): + pulumi.set(self, "organization_id", value) + + @property + @pulumi.getter(name="projectId") + def project_id(self) -> pulumi.Input[str]: + """ + Unique identifier for the project that also serves as the project name. + """ + return pulumi.get(self, "project_id") + + @project_id.setter + def project_id(self, value: pulumi.Input[str]): + pulumi.set(self, "project_id", value) + + @property + @pulumi.getter(name="parentId") + def parent_id(self) -> Optional[pulumi.Input[str]]: + """ + Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + """ + return pulumi.get(self, "parent_id") + + @parent_id.setter + def parent_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "parent_id", value) + + @property + @pulumi.getter + def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]]]: + """ + Tags are key-value pairs that allow you to categorize projects. + """ + return pulumi.get(self, "tags") + + @tags.setter + def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]]]): + pulumi.set(self, "tags", value) + + @property + @pulumi.getter(name="technicalEmails") + def technical_emails(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + return pulumi.get(self, "technical_emails") + + @technical_emails.setter + def technical_emails(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "technical_emails", value) + + +@pulumi.input_type +class _OrganizationProjectState: + def __init__(__self__, *, + billing_group_id: Optional[pulumi.Input[str]] = None, + organization_id: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + project_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]]] = None, + technical_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + Input properties used for looking up and filtering OrganizationProject resources. + :param pulumi.Input[str] billing_group_id: Billing group ID to assign to the project. + :param pulumi.Input[str] organization_id: ID of an organization. Changing this property forces recreation of the resource. + :param pulumi.Input[str] parent_id: Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + :param pulumi.Input[str] project_id: Unique identifier for the project that also serves as the project name. + :param pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]] tags: Tags are key-value pairs that allow you to categorize projects. + :param pulumi.Input[Sequence[pulumi.Input[str]]] technical_emails: The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + if billing_group_id is not None: + pulumi.set(__self__, "billing_group_id", billing_group_id) + if organization_id is not None: + pulumi.set(__self__, "organization_id", organization_id) + if parent_id is not None: + pulumi.set(__self__, "parent_id", parent_id) + if project_id is not None: + pulumi.set(__self__, "project_id", project_id) + if tags is not None: + pulumi.set(__self__, "tags", tags) + if technical_emails is not None: + pulumi.set(__self__, "technical_emails", technical_emails) + + @property + @pulumi.getter(name="billingGroupId") + def billing_group_id(self) -> Optional[pulumi.Input[str]]: + """ + Billing group ID to assign to the project. + """ + return pulumi.get(self, "billing_group_id") + + @billing_group_id.setter + def billing_group_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "billing_group_id", value) + + @property + @pulumi.getter(name="organizationId") + def organization_id(self) -> Optional[pulumi.Input[str]]: + """ + ID of an organization. Changing this property forces recreation of the resource. + """ + return pulumi.get(self, "organization_id") + + @organization_id.setter + def organization_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "organization_id", value) + + @property + @pulumi.getter(name="parentId") + def parent_id(self) -> Optional[pulumi.Input[str]]: + """ + Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + """ + return pulumi.get(self, "parent_id") + + @parent_id.setter + def parent_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "parent_id", value) + + @property + @pulumi.getter(name="projectId") + def project_id(self) -> Optional[pulumi.Input[str]]: + """ + Unique identifier for the project that also serves as the project name. + """ + return pulumi.get(self, "project_id") + + @project_id.setter + def project_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "project_id", value) + + @property + @pulumi.getter + def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]]]: + """ + Tags are key-value pairs that allow you to categorize projects. + """ + return pulumi.get(self, "tags") + + @tags.setter + def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationProjectTagArgs']]]]): + pulumi.set(self, "tags", value) + + @property + @pulumi.getter(name="technicalEmails") + def technical_emails(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + return pulumi.get(self, "technical_emails") + + @technical_emails.setter + def technical_emails(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "technical_emails", value) + + +class OrganizationProject(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + billing_group_id: Optional[pulumi.Input[str]] = None, + organization_id: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + project_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['OrganizationProjectTagArgs', 'OrganizationProjectTagArgsDict']]]]] = None, + technical_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + """ + Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). + + **This resource is in the beta stage and may change without notice.** Set + the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + + ## Example Usage + + ```python + import pulumi + import pulumi_aiven as aiven + + foo = aiven.OrganizationProject("foo", + project_id="example-project", + organization_id=foo_aiven_organization["id"], + billing_group_id=foo_aiven_billing_group["id"], + tags=[{ + "key": "key_1", + "value": "value_1", + }]) + ``` + + ## Import + + ```sh + $ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] billing_group_id: Billing group ID to assign to the project. + :param pulumi.Input[str] organization_id: ID of an organization. Changing this property forces recreation of the resource. + :param pulumi.Input[str] parent_id: Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + :param pulumi.Input[str] project_id: Unique identifier for the project that also serves as the project name. + :param pulumi.Input[Sequence[pulumi.Input[Union['OrganizationProjectTagArgs', 'OrganizationProjectTagArgsDict']]]] tags: Tags are key-value pairs that allow you to categorize projects. + :param pulumi.Input[Sequence[pulumi.Input[str]]] technical_emails: The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: OrganizationProjectArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Creates and manages an [Aiven project](https://aiven.io/docs/platform/concepts/orgs-units-projects#projects). + + **This resource is in the beta stage and may change without notice.** Set + the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. + + ## Example Usage + + ```python + import pulumi + import pulumi_aiven as aiven + + foo = aiven.OrganizationProject("foo", + project_id="example-project", + organization_id=foo_aiven_organization["id"], + billing_group_id=foo_aiven_billing_group["id"], + tags=[{ + "key": "key_1", + "value": "value_1", + }]) + ``` + + ## Import + + ```sh + $ pulumi import aiven:index/organizationProject:OrganizationProject main ORGANIZATION_ID/PROJECT_ID + ``` + + :param str resource_name: The name of the resource. + :param OrganizationProjectArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(OrganizationProjectArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + billing_group_id: Optional[pulumi.Input[str]] = None, + organization_id: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + project_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['OrganizationProjectTagArgs', 'OrganizationProjectTagArgsDict']]]]] = None, + technical_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = OrganizationProjectArgs.__new__(OrganizationProjectArgs) + + if billing_group_id is None and not opts.urn: + raise TypeError("Missing required property 'billing_group_id'") + __props__.__dict__["billing_group_id"] = billing_group_id + if organization_id is None and not opts.urn: + raise TypeError("Missing required property 'organization_id'") + __props__.__dict__["organization_id"] = organization_id + __props__.__dict__["parent_id"] = parent_id + if project_id is None and not opts.urn: + raise TypeError("Missing required property 'project_id'") + __props__.__dict__["project_id"] = project_id + __props__.__dict__["tags"] = tags + __props__.__dict__["technical_emails"] = technical_emails + super(OrganizationProject, __self__).__init__( + 'aiven:index/organizationProject:OrganizationProject', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + billing_group_id: Optional[pulumi.Input[str]] = None, + organization_id: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + project_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['OrganizationProjectTagArgs', 'OrganizationProjectTagArgsDict']]]]] = None, + technical_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'OrganizationProject': + """ + Get an existing OrganizationProject resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] billing_group_id: Billing group ID to assign to the project. + :param pulumi.Input[str] organization_id: ID of an organization. Changing this property forces recreation of the resource. + :param pulumi.Input[str] parent_id: Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + :param pulumi.Input[str] project_id: Unique identifier for the project that also serves as the project name. + :param pulumi.Input[Sequence[pulumi.Input[Union['OrganizationProjectTagArgs', 'OrganizationProjectTagArgsDict']]]] tags: Tags are key-value pairs that allow you to categorize projects. + :param pulumi.Input[Sequence[pulumi.Input[str]]] technical_emails: The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _OrganizationProjectState.__new__(_OrganizationProjectState) + + __props__.__dict__["billing_group_id"] = billing_group_id + __props__.__dict__["organization_id"] = organization_id + __props__.__dict__["parent_id"] = parent_id + __props__.__dict__["project_id"] = project_id + __props__.__dict__["tags"] = tags + __props__.__dict__["technical_emails"] = technical_emails + return OrganizationProject(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="billingGroupId") + def billing_group_id(self) -> pulumi.Output[str]: + """ + Billing group ID to assign to the project. + """ + return pulumi.get(self, "billing_group_id") + + @property + @pulumi.getter(name="organizationId") + def organization_id(self) -> pulumi.Output[str]: + """ + ID of an organization. Changing this property forces recreation of the resource. + """ + return pulumi.get(self, "organization_id") + + @property + @pulumi.getter(name="parentId") + def parent_id(self) -> pulumi.Output[str]: + """ + Link a project to an [organization, organizational unit,](https://aiven.io/docs/platform/concepts/orgs-units-projects) or account by using its ID. To set up proper dependencies please refer to this variable as a reference. + """ + return pulumi.get(self, "parent_id") + + @property + @pulumi.getter(name="projectId") + def project_id(self) -> pulumi.Output[str]: + """ + Unique identifier for the project that also serves as the project name. + """ + return pulumi.get(self, "project_id") + + @property + @pulumi.getter + def tags(self) -> pulumi.Output[Optional[Sequence['outputs.OrganizationProjectTag']]]: + """ + Tags are key-value pairs that allow you to categorize projects. + """ + return pulumi.get(self, "tags") + + @property + @pulumi.getter(name="technicalEmails") + def technical_emails(self) -> pulumi.Output[Optional[Sequence[str]]]: + """ + The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project. + """ + return pulumi.get(self, "technical_emails") + diff --git a/sdk/python/pulumi_aiven/outputs.py b/sdk/python/pulumi_aiven/outputs.py index fad8ee35..0f6db8a4 100644 --- a/sdk/python/pulumi_aiven/outputs.py +++ b/sdk/python/pulumi_aiven/outputs.py @@ -235,6 +235,7 @@ 'OpenSearchTechEmail', 'OrganizationGroupProjectTimeouts', 'OrganizationPermissionPermission', + 'OrganizationProjectTag', 'OrganizationTimeouts', 'OrganizationUserGroupMemberTimeouts', 'PgComponent', @@ -562,6 +563,7 @@ 'GetOpenSearchServiceIntegrationResult', 'GetOpenSearchTagResult', 'GetOpenSearchTechEmailResult', + 'GetOrganizationProjectTagResult', 'GetOrganizationUserListUserResult', 'GetOrganizationUserListUserUserInfoResult', 'GetPgComponentResult', @@ -20824,6 +20826,35 @@ def update_time(self) -> Optional[str]: return pulumi.get(self, "update_time") +@pulumi.output_type +class OrganizationProjectTag(dict): + def __init__(__self__, *, + key: str, + value: str): + """ + :param str key: Project tag key. + :param str value: Project tag value. + """ + pulumi.set(__self__, "key", key) + pulumi.set(__self__, "value", value) + + @property + @pulumi.getter + def key(self) -> str: + """ + Project tag key. + """ + return pulumi.get(self, "key") + + @property + @pulumi.getter + def value(self) -> str: + """ + Project tag value. + """ + return pulumi.get(self, "value") + + @pulumi.output_type class OrganizationTimeouts(dict): def __init__(__self__, *, @@ -46063,6 +46094,35 @@ def email(self) -> str: return pulumi.get(self, "email") +@pulumi.output_type +class GetOrganizationProjectTagResult(dict): + def __init__(__self__, *, + key: str, + value: str): + """ + :param str key: Project tag key. + :param str value: Project tag value. + """ + pulumi.set(__self__, "key", key) + pulumi.set(__self__, "value", value) + + @property + @pulumi.getter + def key(self) -> str: + """ + Project tag key. + """ + return pulumi.get(self, "key") + + @property + @pulumi.getter + def value(self) -> str: + """ + Project tag value. + """ + return pulumi.get(self, "value") + + @pulumi.output_type class GetOrganizationUserListUserResult(dict): def __init__(__self__, *, diff --git a/sdk/python/pulumi_aiven/project_user.py b/sdk/python/pulumi_aiven/project_user.py index 2a9955f8..84b5b73d 100644 --- a/sdk/python/pulumi_aiven/project_user.py +++ b/sdk/python/pulumi_aiven/project_user.py @@ -153,14 +153,11 @@ def __init__(__self__, """ Creates and manages an Aiven project member. - **This resource is deprecated.** Use `OrganizationPermission` and - migrate existing ProjectUser resources + > **This resource is deprecated** + Use `OrganizationPermission` instead and + migrate existing `ProjectUser` resources to the new resource. - > **This resource is deprecated**. - - Use `OrganizationPermission` instead. - ## Example Usage ```python @@ -194,14 +191,11 @@ def __init__(__self__, """ Creates and manages an Aiven project member. - **This resource is deprecated.** Use `OrganizationPermission` and - migrate existing ProjectUser resources + > **This resource is deprecated** + Use `OrganizationPermission` instead and + migrate existing `ProjectUser` resources to the new resource. - > **This resource is deprecated**. - - Use `OrganizationPermission` instead. - ## Example Usage ```python