diff --git a/provider/cmd/pulumi-resource-github/bridge-metadata.json b/provider/cmd/pulumi-resource-github/bridge-metadata.json index 7a92795d..2320dd1a 100644 --- a/provider/cmd/pulumi-resource-github/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-github/bridge-metadata.json @@ -582,6 +582,9 @@ "current": "github:index/repositoryCollaborators:RepositoryCollaborators", "majorVersion": 6, "fields": { + "ignore_team": { + "maxItemsOne": false + }, "team": { "maxItemsOne": false }, @@ -590,6 +593,15 @@ } } }, + "github_repository_custom_property": { + "current": "github:index/repositoryCustomProperty:RepositoryCustomProperty", + "majorVersion": 6, + "fields": { + "property_value": { + "maxItemsOne": false + } + } + }, "github_repository_dependabot_security_updates": { "current": "github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates", "majorVersion": 6 @@ -1273,6 +1285,22 @@ } } }, + "github_repository_custom_properties": { + "current": "github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", + "majorVersion": 6, + "fields": { + "property": { + "maxItemsOne": false, + "elem": { + "fields": { + "property_value": { + "maxItemsOne": false + } + } + } + } + } + }, "github_repository_deploy_keys": { "current": "github:index/getRepositoryDeployKeys:getRepositoryDeployKeys", "majorVersion": 6, diff --git a/provider/cmd/pulumi-resource-github/schema.json b/provider/cmd/pulumi-resource-github/schema.json index ee2f4b8e..ba3e4695 100644 --- a/provider/cmd/pulumi-resource-github/schema.json +++ b/provider/cmd/pulumi-resource-github/schema.json @@ -949,6 +949,18 @@ } } }, + "github:index/RepositoryCollaboratorsIgnoreTeam:RepositoryCollaboratorsIgnoreTeam": { + "properties": { + "teamId": { + "type": "string", + "description": "ID or slug of the team to ignore.\n" + } + }, + "type": "object", + "required": [ + "teamId" + ] + }, "github:index/RepositoryCollaboratorsTeam:RepositoryCollaboratorsTeam": { "properties": { "permission": { @@ -957,7 +969,7 @@ }, "teamId": { "type": "string", - "description": "The GitHub team id or the GitHub team slug\n" + "description": "The GitHub team id or the GitHub team slug.\n" } }, "type": "object", @@ -1079,7 +1091,7 @@ "properties": { "actorId": { "type": "integer", - "description": "(Number) The ID of the actor that can bypass a ruleset.\n" + "description": "(Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app)\n" }, "actorType": { "type": "string", @@ -1380,6 +1392,10 @@ }, "github:index/RepositoryRulesetRulesRequiredStatusChecks:RepositoryRulesetRulesRequiredStatusChecks": { "properties": { + "doNotEnforceOnCreate": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it.\n" + }, "requiredChecks": { "type": "array", "items": { @@ -2414,6 +2430,31 @@ } } }, + "github:index/getRepositoryCustomPropertiesProperty:getRepositoryCustomPropertiesProperty": { + "properties": { + "propertyName": { + "type": "string", + "description": "Name of the property\n" + }, + "propertyValues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Value of the property\n" + } + }, + "type": "object", + "required": [ + "propertyName", + "propertyValues" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "github:index/getRepositoryDeployKeysKey:getRepositoryDeployKeysKey": { "properties": { "id": { @@ -8088,32 +8129,39 @@ } }, "github:index/repositoryCollaborators:RepositoryCollaborators": { - "description": "Provides a GitHub repository collaborators resource.\n\n\u003e Note: github.RepositoryCollaborators cannot be used in conjunction with github.RepositoryCollaborator and\ngithub.TeamRepository or they will fight over what your policy should be.\n\nThis resource allows you to manage all collaborators for repositories in your\norganization or personal account. For organization repositories, collaborators can\nhave explicit (and differing levels of) read, write, or administrator access to \nspecific repositories, without giving the user full organization membership. \nFor personal repositories, collaborators can only be granted write\n(implicitly includes read) permission. \n\nWhen applied, an invitation will be sent to the user to become a collaborators\non a repository. When destroyed, either the invitation will be cancelled or the\ncollaborators will be removed from the repository.\n\nThis resource is authoritative. For adding a collaborator to a repo in a non-authoritative manner, use\ngithub.RepositoryCollaborator instead.\n\nFurther documentation on GitHub collaborators:\n\n- [Adding outside collaborators to your personal repositories](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories)\n- [Adding outside collaborators to repositories in your organization](https://help.github.com/articles/adding-outside-collaborators-to-repositories-in-your-organization/)\n- [Converting an organization member to an outside collaborators](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)\n \n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\n// Add collaborators to a repository\nconst someTeam = new github.Team(\"some_team\", {\n name: \"SomeTeam\",\n description: \"Some cool team\",\n});\nconst someRepo = new github.Repository(\"some_repo\", {name: \"some-repo\"});\nconst someRepoCollaborators = new github.RepositoryCollaborators(\"some_repo_collaborators\", {\n repository: someRepo.name,\n users: [{\n permission: \"admin\",\n username: \"SomeUser\",\n }],\n teams: [{\n permission: \"pull\",\n teamId: someTeam.slug,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\n# Add collaborators to a repository\nsome_team = github.Team(\"some_team\",\n name=\"SomeTeam\",\n description=\"Some cool team\")\nsome_repo = github.Repository(\"some_repo\", name=\"some-repo\")\nsome_repo_collaborators = github.RepositoryCollaborators(\"some_repo_collaborators\",\n repository=some_repo.name,\n users=[{\n \"permission\": \"admin\",\n \"username\": \"SomeUser\",\n }],\n teams=[{\n \"permission\": \"pull\",\n \"team_id\": some_team.slug,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Add collaborators to a repository\n var someTeam = new Github.Team(\"some_team\", new()\n {\n Name = \"SomeTeam\",\n Description = \"Some cool team\",\n });\n\n var someRepo = new Github.Repository(\"some_repo\", new()\n {\n Name = \"some-repo\",\n });\n\n var someRepoCollaborators = new Github.RepositoryCollaborators(\"some_repo_collaborators\", new()\n {\n Repository = someRepo.Name,\n Users = new[]\n {\n new Github.Inputs.RepositoryCollaboratorsUserArgs\n {\n Permission = \"admin\",\n Username = \"SomeUser\",\n },\n },\n Teams = new[]\n {\n new Github.Inputs.RepositoryCollaboratorsTeamArgs\n {\n Permission = \"pull\",\n TeamId = someTeam.Slug,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\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// Add collaborators to a repository\n\t\tsomeTeam, err := github.NewTeam(ctx, \"some_team\", \u0026github.TeamArgs{\n\t\t\tName: pulumi.String(\"SomeTeam\"),\n\t\t\tDescription: pulumi.String(\"Some cool team\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsomeRepo, err := github.NewRepository(ctx, \"some_repo\", \u0026github.RepositoryArgs{\n\t\t\tName: pulumi.String(\"some-repo\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryCollaborators(ctx, \"some_repo_collaborators\", \u0026github.RepositoryCollaboratorsArgs{\n\t\t\tRepository: someRepo.Name,\n\t\t\tUsers: github.RepositoryCollaboratorsUserArray{\n\t\t\t\t\u0026github.RepositoryCollaboratorsUserArgs{\n\t\t\t\t\tPermission: pulumi.String(\"admin\"),\n\t\t\t\t\tUsername: pulumi.String(\"SomeUser\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTeams: github.RepositoryCollaboratorsTeamArray{\n\t\t\t\t\u0026github.RepositoryCollaboratorsTeamArgs{\n\t\t\t\t\tPermission: pulumi.String(\"pull\"),\n\t\t\t\t\tTeamId: someTeam.Slug,\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.github.Team;\nimport com.pulumi.github.TeamArgs;\nimport com.pulumi.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryCollaborators;\nimport com.pulumi.github.RepositoryCollaboratorsArgs;\nimport com.pulumi.github.inputs.RepositoryCollaboratorsUserArgs;\nimport com.pulumi.github.inputs.RepositoryCollaboratorsTeamArgs;\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 // Add collaborators to a repository\n var someTeam = new Team(\"someTeam\", TeamArgs.builder()\n .name(\"SomeTeam\")\n .description(\"Some cool team\")\n .build());\n\n var someRepo = new Repository(\"someRepo\", RepositoryArgs.builder()\n .name(\"some-repo\")\n .build());\n\n var someRepoCollaborators = new RepositoryCollaborators(\"someRepoCollaborators\", RepositoryCollaboratorsArgs.builder()\n .repository(someRepo.name())\n .users(RepositoryCollaboratorsUserArgs.builder()\n .permission(\"admin\")\n .username(\"SomeUser\")\n .build())\n .teams(RepositoryCollaboratorsTeamArgs.builder()\n .permission(\"pull\")\n .teamId(someTeam.slug())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Add collaborators to a repository\n someTeam:\n type: github:Team\n name: some_team\n properties:\n name: SomeTeam\n description: Some cool team\n someRepo:\n type: github:Repository\n name: some_repo\n properties:\n name: some-repo\n someRepoCollaborators:\n type: github:RepositoryCollaborators\n name: some_repo_collaborators\n properties:\n repository: ${someRepo.name}\n users:\n - permission: admin\n username: SomeUser\n teams:\n - permission: pull\n teamId: ${someTeam.slug}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitHub Repository Collaborators can be imported using the name `name`, e.g.\n\n```sh\n$ pulumi import github:index/repositoryCollaborators:RepositoryCollaborators collaborators terraform\n```\n", + "description": "Provides a GitHub repository collaborators resource.\n\n\u003e Note: github.RepositoryCollaborators cannot be used in conjunction with github.RepositoryCollaborator and\ngithub.TeamRepository or they will fight over what your policy should be.\n\nThis resource allows you to manage all collaborators for repositories in your\norganization or personal account. For organization repositories, collaborators can\nhave explicit (and differing levels of) read, write, or administrator access to\nspecific repositories, without giving the user full organization membership.\nFor personal repositories, collaborators can only be granted write\n(implicitly includes read) permission.\n\nWhen applied, an invitation will be sent to the user to become a collaborators\non a repository. When destroyed, either the invitation will be cancelled or the\ncollaborators will be removed from the repository.\n\nThis resource is authoritative. For adding a collaborator to a repo in a non-authoritative manner, use\ngithub.RepositoryCollaborator instead.\n\nFurther documentation on GitHub collaborators:\n\n- [Adding outside collaborators to your personal repositories](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories)\n- [Adding outside collaborators to repositories in your organization](https://help.github.com/articles/adding-outside-collaborators-to-repositories-in-your-organization/)\n- [Converting an organization member to an outside collaborators](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\n// Add collaborators to a repository\nconst someTeam = new github.Team(\"some_team\", {\n name: \"SomeTeam\",\n description: \"Some cool team\",\n});\nconst someRepo = new github.Repository(\"some_repo\", {name: \"some-repo\"});\nconst someRepoCollaborators = new github.RepositoryCollaborators(\"some_repo_collaborators\", {\n repository: someRepo.name,\n users: [{\n permission: \"admin\",\n username: \"SomeUser\",\n }],\n teams: [{\n permission: \"pull\",\n teamId: someTeam.slug,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\n# Add collaborators to a repository\nsome_team = github.Team(\"some_team\",\n name=\"SomeTeam\",\n description=\"Some cool team\")\nsome_repo = github.Repository(\"some_repo\", name=\"some-repo\")\nsome_repo_collaborators = github.RepositoryCollaborators(\"some_repo_collaborators\",\n repository=some_repo.name,\n users=[{\n \"permission\": \"admin\",\n \"username\": \"SomeUser\",\n }],\n teams=[{\n \"permission\": \"pull\",\n \"team_id\": some_team.slug,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Add collaborators to a repository\n var someTeam = new Github.Team(\"some_team\", new()\n {\n Name = \"SomeTeam\",\n Description = \"Some cool team\",\n });\n\n var someRepo = new Github.Repository(\"some_repo\", new()\n {\n Name = \"some-repo\",\n });\n\n var someRepoCollaborators = new Github.RepositoryCollaborators(\"some_repo_collaborators\", new()\n {\n Repository = someRepo.Name,\n Users = new[]\n {\n new Github.Inputs.RepositoryCollaboratorsUserArgs\n {\n Permission = \"admin\",\n Username = \"SomeUser\",\n },\n },\n Teams = new[]\n {\n new Github.Inputs.RepositoryCollaboratorsTeamArgs\n {\n Permission = \"pull\",\n TeamId = someTeam.Slug,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\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// Add collaborators to a repository\n\t\tsomeTeam, err := github.NewTeam(ctx, \"some_team\", \u0026github.TeamArgs{\n\t\t\tName: pulumi.String(\"SomeTeam\"),\n\t\t\tDescription: pulumi.String(\"Some cool team\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsomeRepo, err := github.NewRepository(ctx, \"some_repo\", \u0026github.RepositoryArgs{\n\t\t\tName: pulumi.String(\"some-repo\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryCollaborators(ctx, \"some_repo_collaborators\", \u0026github.RepositoryCollaboratorsArgs{\n\t\t\tRepository: someRepo.Name,\n\t\t\tUsers: github.RepositoryCollaboratorsUserArray{\n\t\t\t\t\u0026github.RepositoryCollaboratorsUserArgs{\n\t\t\t\t\tPermission: pulumi.String(\"admin\"),\n\t\t\t\t\tUsername: pulumi.String(\"SomeUser\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTeams: github.RepositoryCollaboratorsTeamArray{\n\t\t\t\t\u0026github.RepositoryCollaboratorsTeamArgs{\n\t\t\t\t\tPermission: pulumi.String(\"pull\"),\n\t\t\t\t\tTeamId: someTeam.Slug,\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.github.Team;\nimport com.pulumi.github.TeamArgs;\nimport com.pulumi.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryCollaborators;\nimport com.pulumi.github.RepositoryCollaboratorsArgs;\nimport com.pulumi.github.inputs.RepositoryCollaboratorsUserArgs;\nimport com.pulumi.github.inputs.RepositoryCollaboratorsTeamArgs;\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 // Add collaborators to a repository\n var someTeam = new Team(\"someTeam\", TeamArgs.builder()\n .name(\"SomeTeam\")\n .description(\"Some cool team\")\n .build());\n\n var someRepo = new Repository(\"someRepo\", RepositoryArgs.builder()\n .name(\"some-repo\")\n .build());\n\n var someRepoCollaborators = new RepositoryCollaborators(\"someRepoCollaborators\", RepositoryCollaboratorsArgs.builder()\n .repository(someRepo.name())\n .users(RepositoryCollaboratorsUserArgs.builder()\n .permission(\"admin\")\n .username(\"SomeUser\")\n .build())\n .teams(RepositoryCollaboratorsTeamArgs.builder()\n .permission(\"pull\")\n .teamId(someTeam.slug())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Add collaborators to a repository\n someTeam:\n type: github:Team\n name: some_team\n properties:\n name: SomeTeam\n description: Some cool team\n someRepo:\n type: github:Repository\n name: some_repo\n properties:\n name: some-repo\n someRepoCollaborators:\n type: github:RepositoryCollaborators\n name: some_repo_collaborators\n properties:\n repository: ${someRepo.name}\n users:\n - permission: admin\n username: SomeUser\n teams:\n - permission: pull\n teamId: ${someTeam.slug}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitHub Repository Collaborators can be imported using the name `name`, e.g.\n\n```sh\n$ pulumi import github:index/repositoryCollaborators:RepositoryCollaborators collaborators terraform\n```\n", "properties": { + "ignoreTeams": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryCollaboratorsIgnoreTeam:RepositoryCollaboratorsIgnoreTeam" + }, + "description": "List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level.\n" + }, "invitationIds": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Map of usernames to invitation ID for any users added as part of creation of this resource to \nbe used in `github.UserInvitationAccepter`.\n" + "description": "Map of usernames to invitation ID for any users added as part of creation of this resource to\nbe used in `github.UserInvitationAccepter`.\n" }, "repository": { "type": "string", - "description": "The GitHub repository\n" + "description": "The GitHub repository.\n" }, "teams": { "type": "array", "items": { "$ref": "#/types/github:index/RepositoryCollaboratorsTeam:RepositoryCollaboratorsTeam" }, - "description": "List of teams\n" + "description": "List of teams to grant access to the repository.\n" }, "users": { "type": "array", "items": { "$ref": "#/types/github:index/RepositoryCollaboratorsUser:RepositoryCollaboratorsUser" }, - "description": "List of users\n" + "description": "List of users to grant access to the repository.\n" } }, "required": [ @@ -8121,9 +8169,16 @@ "repository" ], "inputProperties": { + "ignoreTeams": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryCollaboratorsIgnoreTeam:RepositoryCollaboratorsIgnoreTeam" + }, + "description": "List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level.\n" + }, "repository": { "type": "string", - "description": "The GitHub repository\n", + "description": "The GitHub repository.\n", "willReplaceOnChanges": true }, "teams": { @@ -8131,14 +8186,14 @@ "items": { "$ref": "#/types/github:index/RepositoryCollaboratorsTeam:RepositoryCollaboratorsTeam" }, - "description": "List of teams\n" + "description": "List of teams to grant access to the repository.\n" }, "users": { "type": "array", "items": { "$ref": "#/types/github:index/RepositoryCollaboratorsUser:RepositoryCollaboratorsUser" }, - "description": "List of users\n" + "description": "List of users to grant access to the repository.\n" } }, "requiredInputs": [ @@ -8147,16 +8202,23 @@ "stateInputs": { "description": "Input properties used for looking up and filtering RepositoryCollaborators resources.\n", "properties": { + "ignoreTeams": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryCollaboratorsIgnoreTeam:RepositoryCollaboratorsIgnoreTeam" + }, + "description": "List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level.\n" + }, "invitationIds": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Map of usernames to invitation ID for any users added as part of creation of this resource to \nbe used in `github.UserInvitationAccepter`.\n" + "description": "Map of usernames to invitation ID for any users added as part of creation of this resource to\nbe used in `github.UserInvitationAccepter`.\n" }, "repository": { "type": "string", - "description": "The GitHub repository\n", + "description": "The GitHub repository.\n", "willReplaceOnChanges": true }, "teams": { @@ -8164,21 +8226,111 @@ "items": { "$ref": "#/types/github:index/RepositoryCollaboratorsTeam:RepositoryCollaboratorsTeam" }, - "description": "List of teams\n" + "description": "List of teams to grant access to the repository.\n" }, "users": { "type": "array", "items": { "$ref": "#/types/github:index/RepositoryCollaboratorsUser:RepositoryCollaboratorsUser" }, - "description": "List of users\n" + "description": "List of users to grant access to the repository.\n" + } + }, + "type": "object" + } + }, + "github:index/repositoryCustomProperty:RepositoryCustomProperty": { + "description": "This resource allows you to create and manage a specific custom property for a GitHub repository.\n\n## Example Usage\n\n\u003e Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst example = new github.Repository(\"example\", {\n name: \"example\",\n description: \"My awesome codebase\",\n});\nconst string = new github.RepositoryCustomProperty(\"string\", {\n repository: example.name,\n propertyName: \"my-cool-property\",\n propertyType: \"string\",\n propertyValues: [\"test\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.Repository(\"example\",\n name=\"example\",\n description=\"My awesome codebase\")\nstring = github.RepositoryCustomProperty(\"string\",\n repository=example.name,\n property_name=\"my-cool-property\",\n property_type=\"string\",\n property_values=[\"test\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Github.Repository(\"example\", new()\n {\n Name = \"example\",\n Description = \"My awesome codebase\",\n });\n\n var @string = new Github.RepositoryCustomProperty(\"string\", new()\n {\n Repository = example.Name,\n PropertyName = \"my-cool-property\",\n PropertyType = \"string\",\n PropertyValues = new[]\n {\n \"test\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := github.NewRepository(ctx, \"example\", \u0026github.RepositoryArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDescription: pulumi.String(\"My awesome codebase\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryCustomProperty(ctx, \"string\", \u0026github.RepositoryCustomPropertyArgs{\n\t\t\tRepository: example.Name,\n\t\t\tPropertyName: pulumi.String(\"my-cool-property\"),\n\t\t\tPropertyType: pulumi.String(\"string\"),\n\t\t\tPropertyValues: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test\"),\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.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryCustomProperty;\nimport com.pulumi.github.RepositoryCustomPropertyArgs;\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 example = new Repository(\"example\", RepositoryArgs.builder()\n .name(\"example\")\n .description(\"My awesome codebase\")\n .build());\n\n var string = new RepositoryCustomProperty(\"string\", RepositoryCustomPropertyArgs.builder()\n .repository(example.name())\n .propertyName(\"my-cool-property\")\n .propertyType(\"string\")\n .propertyValues(\"test\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: github:Repository\n properties:\n name: example\n description: My awesome codebase\n string:\n type: github:RepositoryCustomProperty\n properties:\n repository: ${example.name}\n propertyName: my-cool-property\n propertyType: string\n propertyValues:\n - test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g.\n\n```sh\n$ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example \u003corganization-name\u003e:\u003crepo-name\u003e:\u003ccustom-property-name\u003e\n```\n", + "properties": { + "propertyName": { + "type": "string", + "description": "Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level\n" + }, + "propertyType": { + "type": "string", + "description": "Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false`\n" + }, + "propertyValues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1\n" + }, + "repository": { + "type": "string", + "description": "The repository of the environment.\n" + } + }, + "required": [ + "propertyName", + "propertyType", + "propertyValues", + "repository" + ], + "inputProperties": { + "propertyName": { + "type": "string", + "description": "Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level\n", + "willReplaceOnChanges": true + }, + "propertyType": { + "type": "string", + "description": "Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false`\n", + "willReplaceOnChanges": true + }, + "propertyValues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1\n", + "willReplaceOnChanges": true + }, + "repository": { + "type": "string", + "description": "The repository of the environment.\n", + "willReplaceOnChanges": true + } + }, + "requiredInputs": [ + "propertyName", + "propertyType", + "propertyValues", + "repository" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering RepositoryCustomProperty resources.\n", + "properties": { + "propertyName": { + "type": "string", + "description": "Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level\n", + "willReplaceOnChanges": true + }, + "propertyType": { + "type": "string", + "description": "Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false`\n", + "willReplaceOnChanges": true + }, + "propertyValues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1\n", + "willReplaceOnChanges": true + }, + "repository": { + "type": "string", + "description": "The repository of the environment.\n", + "willReplaceOnChanges": true } }, "type": "object" } }, "github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates": { - "description": "This resource allows you to manage dependabot automated security fixes for a single repository. See the \n[documentation](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)\nfor details of usage and how this will impact your repository\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst repo = new github.Repository(\"repo\", {\n name: \"my-repo\",\n description: \"GitHub repo managed by Terraform\",\n \"private\": false,\n vulnerabilityAlerts: true,\n});\nconst example = new github.RepositoryDependabotSecurityUpdates(\"example\", {\n repository: test.id,\n enabled: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nrepo = github.Repository(\"repo\",\n name=\"my-repo\",\n description=\"GitHub repo managed by Terraform\",\n private=False,\n vulnerability_alerts=True)\nexample = github.RepositoryDependabotSecurityUpdates(\"example\",\n repository=test[\"id\"],\n enabled=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var repo = new Github.Repository(\"repo\", new()\n {\n Name = \"my-repo\",\n Description = \"GitHub repo managed by Terraform\",\n Private = false,\n VulnerabilityAlerts = true,\n });\n\n var example = new Github.RepositoryDependabotSecurityUpdates(\"example\", new()\n {\n Repository = test.Id,\n Enabled = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\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 := github.NewRepository(ctx, \"repo\", \u0026github.RepositoryArgs{\n\t\t\tName: pulumi.String(\"my-repo\"),\n\t\t\tDescription: pulumi.String(\"GitHub repo managed by Terraform\"),\n\t\t\tPrivate: pulumi.Bool(false),\n\t\t\tVulnerabilityAlerts: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryDependabotSecurityUpdates(ctx, \"example\", \u0026github.RepositoryDependabotSecurityUpdatesArgs{\n\t\t\tRepository: pulumi.Any(test.Id),\n\t\t\tEnabled: pulumi.Bool(true),\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.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryDependabotSecurityUpdates;\nimport com.pulumi.github.RepositoryDependabotSecurityUpdatesArgs;\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 repo = new Repository(\"repo\", RepositoryArgs.builder()\n .name(\"my-repo\")\n .description(\"GitHub repo managed by Terraform\")\n .private_(false)\n .vulnerabilityAlerts(true)\n .build());\n\n var example = new RepositoryDependabotSecurityUpdates(\"example\", RepositoryDependabotSecurityUpdatesArgs.builder()\n .repository(test.id())\n .enabled(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n repo:\n type: github:Repository\n properties:\n name: my-repo\n description: GitHub repo managed by Terraform\n private: false\n vulnerabilityAlerts: true\n example:\n type: github:RepositoryDependabotSecurityUpdates\n properties:\n repository: ${test.id}\n enabled: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Import by name\n\n```sh\n$ pulumi import github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates example my-repo\n```\n\n", + "description": "This resource allows you to manage dependabot automated security fixes for a single repository. See the \n[documentation](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)\nfor details of usage and how this will impact your repository\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst repo = new github.Repository(\"repo\", {\n name: \"my-repo\",\n description: \"GitHub repo managed by Terraform\",\n \"private\": false,\n vulnerabilityAlerts: true,\n});\nconst example = new github.RepositoryDependabotSecurityUpdates(\"example\", {\n repository: test.name,\n enabled: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nrepo = github.Repository(\"repo\",\n name=\"my-repo\",\n description=\"GitHub repo managed by Terraform\",\n private=False,\n vulnerability_alerts=True)\nexample = github.RepositoryDependabotSecurityUpdates(\"example\",\n repository=test[\"name\"],\n enabled=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var repo = new Github.Repository(\"repo\", new()\n {\n Name = \"my-repo\",\n Description = \"GitHub repo managed by Terraform\",\n Private = false,\n VulnerabilityAlerts = true,\n });\n\n var example = new Github.RepositoryDependabotSecurityUpdates(\"example\", new()\n {\n Repository = test.Name,\n Enabled = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\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 := github.NewRepository(ctx, \"repo\", \u0026github.RepositoryArgs{\n\t\t\tName: pulumi.String(\"my-repo\"),\n\t\t\tDescription: pulumi.String(\"GitHub repo managed by Terraform\"),\n\t\t\tPrivate: pulumi.Bool(false),\n\t\t\tVulnerabilityAlerts: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryDependabotSecurityUpdates(ctx, \"example\", \u0026github.RepositoryDependabotSecurityUpdatesArgs{\n\t\t\tRepository: pulumi.Any(test.Name),\n\t\t\tEnabled: pulumi.Bool(true),\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.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryDependabotSecurityUpdates;\nimport com.pulumi.github.RepositoryDependabotSecurityUpdatesArgs;\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 repo = new Repository(\"repo\", RepositoryArgs.builder()\n .name(\"my-repo\")\n .description(\"GitHub repo managed by Terraform\")\n .private_(false)\n .vulnerabilityAlerts(true)\n .build());\n\n var example = new RepositoryDependabotSecurityUpdates(\"example\", RepositoryDependabotSecurityUpdatesArgs.builder()\n .repository(test.name())\n .enabled(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n repo:\n type: github:Repository\n properties:\n name: my-repo\n description: GitHub repo managed by Terraform\n private: false\n vulnerabilityAlerts: true\n example:\n type: github:RepositoryDependabotSecurityUpdates\n properties:\n repository: ${test.name}\n enabled: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Import by name\n\n```sh\n$ pulumi import github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates example my-repo\n```\n\n", "properties": { "enabled": { "type": "boolean", @@ -8186,7 +8338,7 @@ }, "repository": { "type": "string", - "description": "The repository to manage.\n" + "description": "The name of the GitHub repository.\n" } }, "required": [ @@ -8200,7 +8352,7 @@ }, "repository": { "type": "string", - "description": "The repository to manage.\n", + "description": "The name of the GitHub repository.\n", "willReplaceOnChanges": true } }, @@ -8217,7 +8369,7 @@ }, "repository": { "type": "string", - "description": "The repository to manage.\n", + "description": "The name of the GitHub repository.\n", "willReplaceOnChanges": true } }, @@ -12532,6 +12684,47 @@ "type": "object" } }, + "github:index/getRepositoryCustomProperties:getRepositoryCustomProperties": { + "description": "Use this data source to retrieve all custom properties of a repository.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst example = github.getRepositoryCustomProperties({\n repository: \"example-repository\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_repository_custom_properties(repository=\"example-repository\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Github.GetRepositoryCustomProperties.Invoke(new()\n {\n Repository = \"example-repository\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\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 := github.GetRepositoryCustomProperties(ctx, \u0026github.GetRepositoryCustomPropertiesArgs{\n\t\t\tRepository: \"example-repository\",\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.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs;\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 = GithubFunctions.getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs.builder()\n .repository(\"example-repository\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n function: github:getRepositoryCustomProperties\n arguments:\n repository: example-repository\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "inputs": { + "description": "A collection of arguments for invoking getRepositoryCustomProperties.\n", + "properties": { + "repository": { + "type": "string", + "description": "Name of the repository to retrieve the custom properties from.\n" + } + }, + "type": "object", + "required": [ + "repository" + ] + }, + "outputs": { + "description": "A collection of values returned by getRepositoryCustomProperties.\n", + "properties": { + "id": { + "description": "The provider-assigned unique ID for this managed resource.\n", + "type": "string" + }, + "properties": { + "description": "The list of this repository's custom properties. Each element of `property` has the following attributes:\n", + "items": { + "$ref": "#/types/github:index/getRepositoryCustomPropertiesProperty:getRepositoryCustomPropertiesProperty" + }, + "type": "array" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "properties", + "repository", + "id" + ], + "type": "object" + } + }, "github:index/getRepositoryDeployKeys:getRepositoryDeployKeys": { "description": "Use this data source to retrieve all deploy keys of a repository.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst example = github.getRepositoryDeployKeys({\n repository: \"example-repository\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_repository_deploy_keys(repository=\"example-repository\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Github.GetRepositoryDeployKeys.Invoke(new()\n {\n Repository = \"example-repository\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v6/go/github\"\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 := github.GetRepositoryDeployKeys(ctx, \u0026github.GetRepositoryDeployKeysArgs{\n\t\t\tRepository: \"example-repository\",\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.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetRepositoryDeployKeysArgs;\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 = GithubFunctions.getRepositoryDeployKeys(GetRepositoryDeployKeysArgs.builder()\n .repository(\"example-repository\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n function: github:getRepositoryDeployKeys\n arguments:\n repository: example-repository\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { diff --git a/sdk/dotnet/GetRepositoryCustomProperties.cs b/sdk/dotnet/GetRepositoryCustomProperties.cs new file mode 100644 index 00000000..252b8476 --- /dev/null +++ b/sdk/dotnet/GetRepositoryCustomProperties.cs @@ -0,0 +1,143 @@ +// *** 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.Github +{ + public static class GetRepositoryCustomProperties + { + /// + /// Use this data source to retrieve all custom properties of a repository. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryCustomProperties.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// + public static Task InvokeAsync(GetRepositoryCustomPropertiesArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", args ?? new GetRepositoryCustomPropertiesArgs(), options.WithDefaults()); + + /// + /// Use this data source to retrieve all custom properties of a repository. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryCustomProperties.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetRepositoryCustomPropertiesInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", args ?? new GetRepositoryCustomPropertiesInvokeArgs(), options.WithDefaults()); + + /// + /// Use this data source to retrieve all custom properties of a repository. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryCustomProperties.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetRepositoryCustomPropertiesInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", args ?? new GetRepositoryCustomPropertiesInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRepositoryCustomPropertiesArgs : global::Pulumi.InvokeArgs + { + /// + /// Name of the repository to retrieve the custom properties from. + /// + [Input("repository", required: true)] + public string Repository { get; set; } = null!; + + public GetRepositoryCustomPropertiesArgs() + { + } + public static new GetRepositoryCustomPropertiesArgs Empty => new GetRepositoryCustomPropertiesArgs(); + } + + public sealed class GetRepositoryCustomPropertiesInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// Name of the repository to retrieve the custom properties from. + /// + [Input("repository", required: true)] + public Input Repository { get; set; } = null!; + + public GetRepositoryCustomPropertiesInvokeArgs() + { + } + public static new GetRepositoryCustomPropertiesInvokeArgs Empty => new GetRepositoryCustomPropertiesInvokeArgs(); + } + + + [OutputType] + public sealed class GetRepositoryCustomPropertiesResult + { + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + /// + /// The list of this repository's custom properties. Each element of `property` has the following attributes: + /// + public readonly ImmutableArray Properties; + public readonly string Repository; + + [OutputConstructor] + private GetRepositoryCustomPropertiesResult( + string id, + + ImmutableArray properties, + + string repository) + { + Id = id; + Properties = properties; + Repository = repository; + } + } +} diff --git a/sdk/dotnet/Inputs/RepositoryCollaboratorsIgnoreTeamArgs.cs b/sdk/dotnet/Inputs/RepositoryCollaboratorsIgnoreTeamArgs.cs new file mode 100644 index 00000000..49ed9b8c --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryCollaboratorsIgnoreTeamArgs.cs @@ -0,0 +1,26 @@ +// *** 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.Github.Inputs +{ + + public sealed class RepositoryCollaboratorsIgnoreTeamArgs : global::Pulumi.ResourceArgs + { + /// + /// ID or slug of the team to ignore. + /// + [Input("teamId", required: true)] + public Input TeamId { get; set; } = null!; + + public RepositoryCollaboratorsIgnoreTeamArgs() + { + } + public static new RepositoryCollaboratorsIgnoreTeamArgs Empty => new RepositoryCollaboratorsIgnoreTeamArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryCollaboratorsIgnoreTeamGetArgs.cs b/sdk/dotnet/Inputs/RepositoryCollaboratorsIgnoreTeamGetArgs.cs new file mode 100644 index 00000000..06e65efb --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryCollaboratorsIgnoreTeamGetArgs.cs @@ -0,0 +1,26 @@ +// *** 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.Github.Inputs +{ + + public sealed class RepositoryCollaboratorsIgnoreTeamGetArgs : global::Pulumi.ResourceArgs + { + /// + /// ID or slug of the team to ignore. + /// + [Input("teamId", required: true)] + public Input TeamId { get; set; } = null!; + + public RepositoryCollaboratorsIgnoreTeamGetArgs() + { + } + public static new RepositoryCollaboratorsIgnoreTeamGetArgs Empty => new RepositoryCollaboratorsIgnoreTeamGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamArgs.cs b/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamArgs.cs index d90a2ab9..8c773ad3 100644 --- a/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamArgs.cs @@ -21,7 +21,7 @@ public sealed class RepositoryCollaboratorsTeamArgs : global::Pulumi.ResourceArg public Input? Permission { get; set; } /// - /// The GitHub team id or the GitHub team slug + /// The GitHub team id or the GitHub team slug. /// [Input("teamId", required: true)] public Input TeamId { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamGetArgs.cs b/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamGetArgs.cs index 4602c81b..3444e8f1 100644 --- a/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamGetArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryCollaboratorsTeamGetArgs.cs @@ -21,7 +21,7 @@ public sealed class RepositoryCollaboratorsTeamGetArgs : global::Pulumi.Resource public Input? Permission { get; set; } /// - /// The GitHub team id or the GitHub team slug + /// The GitHub team id or the GitHub team slug. /// [Input("teamId", required: true)] public Input TeamId { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs index 761d8fea..c2252a54 100644 --- a/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs @@ -13,7 +13,7 @@ namespace Pulumi.Github.Inputs public sealed class RepositoryRulesetBypassActorArgs : global::Pulumi.ResourceArgs { /// - /// (Number) The ID of the actor that can bypass a ruleset. + /// (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) /// [Input("actorId", required: true)] public Input ActorId { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs index b130c3e2..0f3e50aa 100644 --- a/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs @@ -13,7 +13,7 @@ namespace Pulumi.Github.Inputs public sealed class RepositoryRulesetBypassActorGetArgs : global::Pulumi.ResourceArgs { /// - /// (Number) The ID of the actor that can bypass a ruleset. + /// (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) /// [Input("actorId", required: true)] public Input ActorId { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs index 8b6c2a82..49163a90 100644 --- a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs @@ -12,6 +12,12 @@ namespace Pulumi.Github.Inputs public sealed class RepositoryRulesetRulesRequiredStatusChecksArgs : global::Pulumi.ResourceArgs { + /// + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + [Input("doNotEnforceOnCreate")] + public Input? DoNotEnforceOnCreate { get; set; } + [Input("requiredChecks", required: true)] private InputList? _requiredChecks; diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs index 5bf8d185..842e7d36 100644 --- a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs @@ -12,6 +12,12 @@ namespace Pulumi.Github.Inputs public sealed class RepositoryRulesetRulesRequiredStatusChecksGetArgs : global::Pulumi.ResourceArgs { + /// + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + [Input("doNotEnforceOnCreate")] + public Input? DoNotEnforceOnCreate { get; set; } + [Input("requiredChecks", required: true)] private InputList? _requiredChecks; diff --git a/sdk/dotnet/Outputs/GetRepositoryCustomPropertiesPropertyResult.cs b/sdk/dotnet/Outputs/GetRepositoryCustomPropertiesPropertyResult.cs new file mode 100644 index 00000000..f42cb48d --- /dev/null +++ b/sdk/dotnet/Outputs/GetRepositoryCustomPropertiesPropertyResult.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.Github.Outputs +{ + + [OutputType] + public sealed class GetRepositoryCustomPropertiesPropertyResult + { + /// + /// Name of the property + /// + public readonly string PropertyName; + /// + /// Value of the property + /// + public readonly ImmutableArray PropertyValues; + + [OutputConstructor] + private GetRepositoryCustomPropertiesPropertyResult( + string propertyName, + + ImmutableArray propertyValues) + { + PropertyName = propertyName; + PropertyValues = propertyValues; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryCollaboratorsIgnoreTeam.cs b/sdk/dotnet/Outputs/RepositoryCollaboratorsIgnoreTeam.cs new file mode 100644 index 00000000..2a16be0f --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryCollaboratorsIgnoreTeam.cs @@ -0,0 +1,27 @@ +// *** 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.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryCollaboratorsIgnoreTeam + { + /// + /// ID or slug of the team to ignore. + /// + public readonly string TeamId; + + [OutputConstructor] + private RepositoryCollaboratorsIgnoreTeam(string teamId) + { + TeamId = teamId; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryCollaboratorsTeam.cs b/sdk/dotnet/Outputs/RepositoryCollaboratorsTeam.cs index 9d07754c..4ff1c7b1 100644 --- a/sdk/dotnet/Outputs/RepositoryCollaboratorsTeam.cs +++ b/sdk/dotnet/Outputs/RepositoryCollaboratorsTeam.cs @@ -20,7 +20,7 @@ public sealed class RepositoryCollaboratorsTeam /// public readonly string? Permission; /// - /// The GitHub team id or the GitHub team slug + /// The GitHub team id or the GitHub team slug. /// public readonly string TeamId; diff --git a/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs b/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs index 05c1922c..304438a2 100644 --- a/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs +++ b/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs @@ -14,7 +14,7 @@ namespace Pulumi.Github.Outputs public sealed class RepositoryRulesetBypassActor { /// - /// (Number) The ID of the actor that can bypass a ruleset. + /// (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) /// public readonly int ActorId; /// diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs index e6d98b0c..eadcf80a 100644 --- a/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs @@ -13,6 +13,10 @@ namespace Pulumi.Github.Outputs [OutputType] public sealed class RepositoryRulesetRulesRequiredStatusChecks { + /// + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + public readonly bool? DoNotEnforceOnCreate; /// /// Status checks that are required. Several can be defined. /// @@ -24,10 +28,13 @@ public sealed class RepositoryRulesetRulesRequiredStatusChecks [OutputConstructor] private RepositoryRulesetRulesRequiredStatusChecks( + bool? doNotEnforceOnCreate, + ImmutableArray requiredChecks, bool? strictRequiredStatusChecksPolicy) { + DoNotEnforceOnCreate = doNotEnforceOnCreate; RequiredChecks = requiredChecks; StrictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; } diff --git a/sdk/dotnet/RepositoryCollaborators.cs b/sdk/dotnet/RepositoryCollaborators.cs index 3bb054ad..706a923e 100644 --- a/sdk/dotnet/RepositoryCollaborators.cs +++ b/sdk/dotnet/RepositoryCollaborators.cs @@ -93,26 +93,32 @@ namespace Pulumi.Github public partial class RepositoryCollaborators : global::Pulumi.CustomResource { /// - /// Map of usernames to invitation ID for any users added as part of creation of this resource to + /// List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + /// + [Output("ignoreTeams")] + public Output> IgnoreTeams { get; private set; } = null!; + + /// + /// Map of usernames to invitation ID for any users added as part of creation of this resource to /// be used in `github.UserInvitationAccepter`. /// [Output("invitationIds")] public Output> InvitationIds { get; private set; } = null!; /// - /// The GitHub repository + /// The GitHub repository. /// [Output("repository")] public Output Repository { get; private set; } = null!; /// - /// List of teams + /// List of teams to grant access to the repository. /// [Output("teams")] public Output> Teams { get; private set; } = null!; /// - /// List of users + /// List of users to grant access to the repository. /// [Output("users")] public Output> Users { get; private set; } = null!; @@ -163,8 +169,20 @@ public static RepositoryCollaborators Get(string name, Input id, Reposit public sealed class RepositoryCollaboratorsArgs : global::Pulumi.ResourceArgs { + [Input("ignoreTeams")] + private InputList? _ignoreTeams; + /// - /// The GitHub repository + /// List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + /// + public InputList IgnoreTeams + { + get => _ignoreTeams ?? (_ignoreTeams = new InputList()); + set => _ignoreTeams = value; + } + + /// + /// The GitHub repository. /// [Input("repository", required: true)] public Input Repository { get; set; } = null!; @@ -173,7 +191,7 @@ public sealed class RepositoryCollaboratorsArgs : global::Pulumi.ResourceArgs private InputList? _teams; /// - /// List of teams + /// List of teams to grant access to the repository. /// public InputList Teams { @@ -185,7 +203,7 @@ public InputList Teams private InputList? _users; /// - /// List of users + /// List of users to grant access to the repository. /// public InputList Users { @@ -201,11 +219,23 @@ public RepositoryCollaboratorsArgs() public sealed class RepositoryCollaboratorsState : global::Pulumi.ResourceArgs { + [Input("ignoreTeams")] + private InputList? _ignoreTeams; + + /// + /// List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + /// + public InputList IgnoreTeams + { + get => _ignoreTeams ?? (_ignoreTeams = new InputList()); + set => _ignoreTeams = value; + } + [Input("invitationIds")] private InputMap? _invitationIds; /// - /// Map of usernames to invitation ID for any users added as part of creation of this resource to + /// Map of usernames to invitation ID for any users added as part of creation of this resource to /// be used in `github.UserInvitationAccepter`. /// public InputMap InvitationIds @@ -215,7 +245,7 @@ public InputMap InvitationIds } /// - /// The GitHub repository + /// The GitHub repository. /// [Input("repository")] public Input? Repository { get; set; } @@ -224,7 +254,7 @@ public InputMap InvitationIds private InputList? _teams; /// - /// List of teams + /// List of teams to grant access to the repository. /// public InputList Teams { @@ -236,7 +266,7 @@ public InputList Teams private InputList? _users; /// - /// List of users + /// List of users to grant access to the repository. /// public InputList Users { diff --git a/sdk/dotnet/RepositoryCustomProperty.cs b/sdk/dotnet/RepositoryCustomProperty.cs new file mode 100644 index 00000000..171df83f --- /dev/null +++ b/sdk/dotnet/RepositoryCustomProperty.cs @@ -0,0 +1,201 @@ +// *** 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.Github +{ + /// + /// This resource allows you to create and manage a specific custom property for a GitHub repository. + /// + /// ## Example Usage + /// + /// > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new Github.Repository("example", new() + /// { + /// Name = "example", + /// Description = "My awesome codebase", + /// }); + /// + /// var @string = new Github.RepositoryCustomProperty("string", new() + /// { + /// Repository = example.Name, + /// PropertyName = "my-cool-property", + /// PropertyType = "string", + /// PropertyValues = new[] + /// { + /// "test", + /// }, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// GitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g. + /// + /// ```sh + /// $ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example <organization-name>:<repo-name>:<custom-property-name> + /// ``` + /// + [GithubResourceType("github:index/repositoryCustomProperty:RepositoryCustomProperty")] + public partial class RepositoryCustomProperty : global::Pulumi.CustomResource + { + /// + /// Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + /// + [Output("propertyName")] + public Output PropertyName { get; private set; } = null!; + + /// + /// Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + /// + [Output("propertyType")] + public Output PropertyType { get; private set; } = null!; + + /// + /// Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + /// + [Output("propertyValues")] + public Output> PropertyValues { get; private set; } = null!; + + /// + /// The repository of the environment. + /// + [Output("repository")] + public Output Repository { get; private set; } = null!; + + + /// + /// Create a RepositoryCustomProperty 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 RepositoryCustomProperty(string name, RepositoryCustomPropertyArgs args, CustomResourceOptions? options = null) + : base("github:index/repositoryCustomProperty:RepositoryCustomProperty", name, args ?? new RepositoryCustomPropertyArgs(), MakeResourceOptions(options, "")) + { + } + + private RepositoryCustomProperty(string name, Input id, RepositoryCustomPropertyState? state = null, CustomResourceOptions? options = null) + : base("github:index/repositoryCustomProperty:RepositoryCustomProperty", 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 RepositoryCustomProperty 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 RepositoryCustomProperty Get(string name, Input id, RepositoryCustomPropertyState? state = null, CustomResourceOptions? options = null) + { + return new RepositoryCustomProperty(name, id, state, options); + } + } + + public sealed class RepositoryCustomPropertyArgs : global::Pulumi.ResourceArgs + { + /// + /// Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + /// + [Input("propertyName", required: true)] + public Input PropertyName { get; set; } = null!; + + /// + /// Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + /// + [Input("propertyType", required: true)] + public Input PropertyType { get; set; } = null!; + + [Input("propertyValues", required: true)] + private InputList? _propertyValues; + + /// + /// Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + /// + public InputList PropertyValues + { + get => _propertyValues ?? (_propertyValues = new InputList()); + set => _propertyValues = value; + } + + /// + /// The repository of the environment. + /// + [Input("repository", required: true)] + public Input Repository { get; set; } = null!; + + public RepositoryCustomPropertyArgs() + { + } + public static new RepositoryCustomPropertyArgs Empty => new RepositoryCustomPropertyArgs(); + } + + public sealed class RepositoryCustomPropertyState : global::Pulumi.ResourceArgs + { + /// + /// Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + /// + [Input("propertyName")] + public Input? PropertyName { get; set; } + + /// + /// Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + /// + [Input("propertyType")] + public Input? PropertyType { get; set; } + + [Input("propertyValues")] + private InputList? _propertyValues; + + /// + /// Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + /// + public InputList PropertyValues + { + get => _propertyValues ?? (_propertyValues = new InputList()); + set => _propertyValues = value; + } + + /// + /// The repository of the environment. + /// + [Input("repository")] + public Input? Repository { get; set; } + + public RepositoryCustomPropertyState() + { + } + public static new RepositoryCustomPropertyState Empty => new RepositoryCustomPropertyState(); + } +} diff --git a/sdk/dotnet/RepositoryDependabotSecurityUpdates.cs b/sdk/dotnet/RepositoryDependabotSecurityUpdates.cs index e66cd63f..5f63e9aa 100644 --- a/sdk/dotnet/RepositoryDependabotSecurityUpdates.cs +++ b/sdk/dotnet/RepositoryDependabotSecurityUpdates.cs @@ -34,7 +34,7 @@ namespace Pulumi.Github /// /// var example = new Github.RepositoryDependabotSecurityUpdates("example", new() /// { - /// Repository = test.Id, + /// Repository = test.Name, /// Enabled = true, /// }); /// @@ -59,7 +59,7 @@ public partial class RepositoryDependabotSecurityUpdates : global::Pulumi.Custom public Output Enabled { get; private set; } = null!; /// - /// The repository to manage. + /// The name of the GitHub repository. /// [Output("repository")] public Output Repository { get; private set; } = null!; @@ -117,7 +117,7 @@ public sealed class RepositoryDependabotSecurityUpdatesArgs : global::Pulumi.Res public Input Enabled { get; set; } = null!; /// - /// The repository to manage. + /// The name of the GitHub repository. /// [Input("repository", required: true)] public Input Repository { get; set; } = null!; @@ -137,7 +137,7 @@ public sealed class RepositoryDependabotSecurityUpdatesState : global::Pulumi.Re public Input? Enabled { get; set; } /// - /// The repository to manage. + /// The name of the GitHub repository. /// [Input("repository")] public Input? Repository { get; set; } diff --git a/sdk/go/github/getRepositoryCustomProperties.go b/sdk/go/github/getRepositoryCustomProperties.go new file mode 100644 index 00000000..f84f4d90 --- /dev/null +++ b/sdk/go/github/getRepositoryCustomProperties.go @@ -0,0 +1,118 @@ +// 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 github + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-github/sdk/v6/go/github/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Use this data source to retrieve all custom properties of a repository. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-github/sdk/v6/go/github" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := github.GetRepositoryCustomProperties(ctx, &github.GetRepositoryCustomPropertiesArgs{ +// Repository: "example-repository", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func GetRepositoryCustomProperties(ctx *pulumi.Context, args *GetRepositoryCustomPropertiesArgs, opts ...pulumi.InvokeOption) (*GetRepositoryCustomPropertiesResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetRepositoryCustomPropertiesResult + err := ctx.Invoke("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getRepositoryCustomProperties. +type GetRepositoryCustomPropertiesArgs struct { + // Name of the repository to retrieve the custom properties from. + Repository string `pulumi:"repository"` +} + +// A collection of values returned by getRepositoryCustomProperties. +type GetRepositoryCustomPropertiesResult struct { + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // The list of this repository's custom properties. Each element of `property` has the following attributes: + Properties []GetRepositoryCustomPropertiesProperty `pulumi:"properties"` + Repository string `pulumi:"repository"` +} + +func GetRepositoryCustomPropertiesOutput(ctx *pulumi.Context, args GetRepositoryCustomPropertiesOutputArgs, opts ...pulumi.InvokeOption) GetRepositoryCustomPropertiesResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (GetRepositoryCustomPropertiesResultOutput, error) { + args := v.(GetRepositoryCustomPropertiesArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", args, GetRepositoryCustomPropertiesResultOutput{}, options).(GetRepositoryCustomPropertiesResultOutput), nil + }).(GetRepositoryCustomPropertiesResultOutput) +} + +// A collection of arguments for invoking getRepositoryCustomProperties. +type GetRepositoryCustomPropertiesOutputArgs struct { + // Name of the repository to retrieve the custom properties from. + Repository pulumi.StringInput `pulumi:"repository"` +} + +func (GetRepositoryCustomPropertiesOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryCustomPropertiesArgs)(nil)).Elem() +} + +// A collection of values returned by getRepositoryCustomProperties. +type GetRepositoryCustomPropertiesResultOutput struct{ *pulumi.OutputState } + +func (GetRepositoryCustomPropertiesResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryCustomPropertiesResult)(nil)).Elem() +} + +func (o GetRepositoryCustomPropertiesResultOutput) ToGetRepositoryCustomPropertiesResultOutput() GetRepositoryCustomPropertiesResultOutput { + return o +} + +func (o GetRepositoryCustomPropertiesResultOutput) ToGetRepositoryCustomPropertiesResultOutputWithContext(ctx context.Context) GetRepositoryCustomPropertiesResultOutput { + return o +} + +// The provider-assigned unique ID for this managed resource. +func (o GetRepositoryCustomPropertiesResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryCustomPropertiesResult) string { return v.Id }).(pulumi.StringOutput) +} + +// The list of this repository's custom properties. Each element of `property` has the following attributes: +func (o GetRepositoryCustomPropertiesResultOutput) Properties() GetRepositoryCustomPropertiesPropertyArrayOutput { + return o.ApplyT(func(v GetRepositoryCustomPropertiesResult) []GetRepositoryCustomPropertiesProperty { + return v.Properties + }).(GetRepositoryCustomPropertiesPropertyArrayOutput) +} + +func (o GetRepositoryCustomPropertiesResultOutput) Repository() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryCustomPropertiesResult) string { return v.Repository }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetRepositoryCustomPropertiesResultOutput{}) +} diff --git a/sdk/go/github/init.go b/sdk/go/github/init.go index 4d8a5222..1338c271 100644 --- a/sdk/go/github/init.go +++ b/sdk/go/github/init.go @@ -117,6 +117,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &RepositoryCollaborator{} case "github:index/repositoryCollaborators:RepositoryCollaborators": r = &RepositoryCollaborators{} + case "github:index/repositoryCustomProperty:RepositoryCustomProperty": + r = &RepositoryCustomProperty{} case "github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates": r = &RepositoryDependabotSecurityUpdates{} case "github:index/repositoryDeployKey:RepositoryDeployKey": @@ -430,6 +432,11 @@ func init() { "index/repositoryCollaborators", &module{version}, ) + pulumi.RegisterResourceModule( + "github", + "index/repositoryCustomProperty", + &module{version}, + ) pulumi.RegisterResourceModule( "github", "index/repositoryDependabotSecurityUpdates", diff --git a/sdk/go/github/pulumiTypes.go b/sdk/go/github/pulumiTypes.go index e073f4ef..9273e467 100644 --- a/sdk/go/github/pulumiTypes.go +++ b/sdk/go/github/pulumiTypes.go @@ -5593,12 +5593,109 @@ func (o ProviderAppAuthPtrOutput) PemFile() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +type RepositoryCollaboratorsIgnoreTeam struct { + // ID or slug of the team to ignore. + TeamId string `pulumi:"teamId"` +} + +// RepositoryCollaboratorsIgnoreTeamInput is an input type that accepts RepositoryCollaboratorsIgnoreTeamArgs and RepositoryCollaboratorsIgnoreTeamOutput values. +// You can construct a concrete instance of `RepositoryCollaboratorsIgnoreTeamInput` via: +// +// RepositoryCollaboratorsIgnoreTeamArgs{...} +type RepositoryCollaboratorsIgnoreTeamInput interface { + pulumi.Input + + ToRepositoryCollaboratorsIgnoreTeamOutput() RepositoryCollaboratorsIgnoreTeamOutput + ToRepositoryCollaboratorsIgnoreTeamOutputWithContext(context.Context) RepositoryCollaboratorsIgnoreTeamOutput +} + +type RepositoryCollaboratorsIgnoreTeamArgs struct { + // ID or slug of the team to ignore. + TeamId pulumi.StringInput `pulumi:"teamId"` +} + +func (RepositoryCollaboratorsIgnoreTeamArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryCollaboratorsIgnoreTeam)(nil)).Elem() +} + +func (i RepositoryCollaboratorsIgnoreTeamArgs) ToRepositoryCollaboratorsIgnoreTeamOutput() RepositoryCollaboratorsIgnoreTeamOutput { + return i.ToRepositoryCollaboratorsIgnoreTeamOutputWithContext(context.Background()) +} + +func (i RepositoryCollaboratorsIgnoreTeamArgs) ToRepositoryCollaboratorsIgnoreTeamOutputWithContext(ctx context.Context) RepositoryCollaboratorsIgnoreTeamOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsIgnoreTeamOutput) +} + +// RepositoryCollaboratorsIgnoreTeamArrayInput is an input type that accepts RepositoryCollaboratorsIgnoreTeamArray and RepositoryCollaboratorsIgnoreTeamArrayOutput values. +// You can construct a concrete instance of `RepositoryCollaboratorsIgnoreTeamArrayInput` via: +// +// RepositoryCollaboratorsIgnoreTeamArray{ RepositoryCollaboratorsIgnoreTeamArgs{...} } +type RepositoryCollaboratorsIgnoreTeamArrayInput interface { + pulumi.Input + + ToRepositoryCollaboratorsIgnoreTeamArrayOutput() RepositoryCollaboratorsIgnoreTeamArrayOutput + ToRepositoryCollaboratorsIgnoreTeamArrayOutputWithContext(context.Context) RepositoryCollaboratorsIgnoreTeamArrayOutput +} + +type RepositoryCollaboratorsIgnoreTeamArray []RepositoryCollaboratorsIgnoreTeamInput + +func (RepositoryCollaboratorsIgnoreTeamArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryCollaboratorsIgnoreTeam)(nil)).Elem() +} + +func (i RepositoryCollaboratorsIgnoreTeamArray) ToRepositoryCollaboratorsIgnoreTeamArrayOutput() RepositoryCollaboratorsIgnoreTeamArrayOutput { + return i.ToRepositoryCollaboratorsIgnoreTeamArrayOutputWithContext(context.Background()) +} + +func (i RepositoryCollaboratorsIgnoreTeamArray) ToRepositoryCollaboratorsIgnoreTeamArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsIgnoreTeamArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsIgnoreTeamArrayOutput) +} + +type RepositoryCollaboratorsIgnoreTeamOutput struct{ *pulumi.OutputState } + +func (RepositoryCollaboratorsIgnoreTeamOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryCollaboratorsIgnoreTeam)(nil)).Elem() +} + +func (o RepositoryCollaboratorsIgnoreTeamOutput) ToRepositoryCollaboratorsIgnoreTeamOutput() RepositoryCollaboratorsIgnoreTeamOutput { + return o +} + +func (o RepositoryCollaboratorsIgnoreTeamOutput) ToRepositoryCollaboratorsIgnoreTeamOutputWithContext(ctx context.Context) RepositoryCollaboratorsIgnoreTeamOutput { + return o +} + +// ID or slug of the team to ignore. +func (o RepositoryCollaboratorsIgnoreTeamOutput) TeamId() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryCollaboratorsIgnoreTeam) string { return v.TeamId }).(pulumi.StringOutput) +} + +type RepositoryCollaboratorsIgnoreTeamArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryCollaboratorsIgnoreTeamArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryCollaboratorsIgnoreTeam)(nil)).Elem() +} + +func (o RepositoryCollaboratorsIgnoreTeamArrayOutput) ToRepositoryCollaboratorsIgnoreTeamArrayOutput() RepositoryCollaboratorsIgnoreTeamArrayOutput { + return o +} + +func (o RepositoryCollaboratorsIgnoreTeamArrayOutput) ToRepositoryCollaboratorsIgnoreTeamArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsIgnoreTeamArrayOutput { + return o +} + +func (o RepositoryCollaboratorsIgnoreTeamArrayOutput) Index(i pulumi.IntInput) RepositoryCollaboratorsIgnoreTeamOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryCollaboratorsIgnoreTeam { + return vs[0].([]RepositoryCollaboratorsIgnoreTeam)[vs[1].(int)] + }).(RepositoryCollaboratorsIgnoreTeamOutput) +} + type RepositoryCollaboratorsTeam struct { // The permission of the outside collaborators for the repository. // Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. // Must be `push` for personal repositories. Defaults to `push`. Permission *string `pulumi:"permission"` - // The GitHub team id or the GitHub team slug + // The GitHub team id or the GitHub team slug. TeamId string `pulumi:"teamId"` } @@ -5618,7 +5715,7 @@ type RepositoryCollaboratorsTeamArgs struct { // Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. // Must be `push` for personal repositories. Defaults to `push`. Permission pulumi.StringPtrInput `pulumi:"permission"` - // The GitHub team id or the GitHub team slug + // The GitHub team id or the GitHub team slug. TeamId pulumi.StringInput `pulumi:"teamId"` } @@ -5680,7 +5777,7 @@ func (o RepositoryCollaboratorsTeamOutput) Permission() pulumi.StringPtrOutput { return o.ApplyT(func(v RepositoryCollaboratorsTeam) *string { return v.Permission }).(pulumi.StringPtrOutput) } -// The GitHub team id or the GitHub team slug +// The GitHub team id or the GitHub team slug. func (o RepositoryCollaboratorsTeamOutput) TeamId() pulumi.StringOutput { return o.ApplyT(func(v RepositoryCollaboratorsTeam) string { return v.TeamId }).(pulumi.StringOutput) } @@ -6483,7 +6580,7 @@ func (o RepositoryPagesSourcePtrOutput) Path() pulumi.StringPtrOutput { } type RepositoryRulesetBypassActor struct { - // (Number) The ID of the actor that can bypass a ruleset. + // (Number) The ID of the actor that can bypass a ruleset. If `actorType` is `Integration`, `actorId` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) ActorId int `pulumi:"actorId"` // The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. ActorType string `pulumi:"actorType"` @@ -6507,7 +6604,7 @@ type RepositoryRulesetBypassActorInput interface { } type RepositoryRulesetBypassActorArgs struct { - // (Number) The ID of the actor that can bypass a ruleset. + // (Number) The ID of the actor that can bypass a ruleset. If `actorType` is `Integration`, `actorId` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) ActorId pulumi.IntInput `pulumi:"actorId"` // The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. ActorType pulumi.StringInput `pulumi:"actorType"` @@ -6570,7 +6667,7 @@ func (o RepositoryRulesetBypassActorOutput) ToRepositoryRulesetBypassActorOutput return o } -// (Number) The ID of the actor that can bypass a ruleset. +// (Number) The ID of the actor that can bypass a ruleset. If `actorType` is `Integration`, `actorId` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) func (o RepositoryRulesetBypassActorOutput) ActorId() pulumi.IntOutput { return o.ApplyT(func(v RepositoryRulesetBypassActor) int { return v.ActorId }).(pulumi.IntOutput) } @@ -8721,6 +8818,8 @@ func (o RepositoryRulesetRulesRequiredDeploymentsPtrOutput) RequiredDeploymentEn } type RepositoryRulesetRulesRequiredStatusChecks struct { + // Allow repositories and branches to be created if a check would otherwise prohibit it. + DoNotEnforceOnCreate *bool `pulumi:"doNotEnforceOnCreate"` // Status checks that are required. Several can be defined. RequiredChecks []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck `pulumi:"requiredChecks"` // Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. @@ -8739,6 +8838,8 @@ type RepositoryRulesetRulesRequiredStatusChecksInput interface { } type RepositoryRulesetRulesRequiredStatusChecksArgs struct { + // Allow repositories and branches to be created if a check would otherwise prohibit it. + DoNotEnforceOnCreate pulumi.BoolPtrInput `pulumi:"doNotEnforceOnCreate"` // Status checks that are required. Several can be defined. RequiredChecks RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayInput `pulumi:"requiredChecks"` // Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. @@ -8822,6 +8923,11 @@ func (o RepositoryRulesetRulesRequiredStatusChecksOutput) ToRepositoryRulesetRul }).(RepositoryRulesetRulesRequiredStatusChecksPtrOutput) } +// Allow repositories and branches to be created if a check would otherwise prohibit it. +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) DoNotEnforceOnCreate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesRequiredStatusChecks) *bool { return v.DoNotEnforceOnCreate }).(pulumi.BoolPtrOutput) +} + // Status checks that are required. Several can be defined. func (o RepositoryRulesetRulesRequiredStatusChecksOutput) RequiredChecks() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { return o.ApplyT(func(v RepositoryRulesetRulesRequiredStatusChecks) []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { @@ -8858,6 +8964,16 @@ func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) Elem() RepositoryRu }).(RepositoryRulesetRulesRequiredStatusChecksOutput) } +// Allow repositories and branches to be created if a check would otherwise prohibit it. +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) DoNotEnforceOnCreate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesRequiredStatusChecks) *bool { + if v == nil { + return nil + } + return v.DoNotEnforceOnCreate + }).(pulumi.BoolPtrOutput) +} + // Status checks that are required. Several can be defined. func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) RequiredChecks() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { return o.ApplyT(func(v *RepositoryRulesetRulesRequiredStatusChecks) []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { @@ -13522,6 +13638,112 @@ func (o GetRepositoryBranchesBranchArrayOutput) Index(i pulumi.IntInput) GetRepo }).(GetRepositoryBranchesBranchOutput) } +type GetRepositoryCustomPropertiesProperty struct { + // Name of the property + PropertyName string `pulumi:"propertyName"` + // Value of the property + PropertyValues []string `pulumi:"propertyValues"` +} + +// GetRepositoryCustomPropertiesPropertyInput is an input type that accepts GetRepositoryCustomPropertiesPropertyArgs and GetRepositoryCustomPropertiesPropertyOutput values. +// You can construct a concrete instance of `GetRepositoryCustomPropertiesPropertyInput` via: +// +// GetRepositoryCustomPropertiesPropertyArgs{...} +type GetRepositoryCustomPropertiesPropertyInput interface { + pulumi.Input + + ToGetRepositoryCustomPropertiesPropertyOutput() GetRepositoryCustomPropertiesPropertyOutput + ToGetRepositoryCustomPropertiesPropertyOutputWithContext(context.Context) GetRepositoryCustomPropertiesPropertyOutput +} + +type GetRepositoryCustomPropertiesPropertyArgs struct { + // Name of the property + PropertyName pulumi.StringInput `pulumi:"propertyName"` + // Value of the property + PropertyValues pulumi.StringArrayInput `pulumi:"propertyValues"` +} + +func (GetRepositoryCustomPropertiesPropertyArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryCustomPropertiesProperty)(nil)).Elem() +} + +func (i GetRepositoryCustomPropertiesPropertyArgs) ToGetRepositoryCustomPropertiesPropertyOutput() GetRepositoryCustomPropertiesPropertyOutput { + return i.ToGetRepositoryCustomPropertiesPropertyOutputWithContext(context.Background()) +} + +func (i GetRepositoryCustomPropertiesPropertyArgs) ToGetRepositoryCustomPropertiesPropertyOutputWithContext(ctx context.Context) GetRepositoryCustomPropertiesPropertyOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetRepositoryCustomPropertiesPropertyOutput) +} + +// GetRepositoryCustomPropertiesPropertyArrayInput is an input type that accepts GetRepositoryCustomPropertiesPropertyArray and GetRepositoryCustomPropertiesPropertyArrayOutput values. +// You can construct a concrete instance of `GetRepositoryCustomPropertiesPropertyArrayInput` via: +// +// GetRepositoryCustomPropertiesPropertyArray{ GetRepositoryCustomPropertiesPropertyArgs{...} } +type GetRepositoryCustomPropertiesPropertyArrayInput interface { + pulumi.Input + + ToGetRepositoryCustomPropertiesPropertyArrayOutput() GetRepositoryCustomPropertiesPropertyArrayOutput + ToGetRepositoryCustomPropertiesPropertyArrayOutputWithContext(context.Context) GetRepositoryCustomPropertiesPropertyArrayOutput +} + +type GetRepositoryCustomPropertiesPropertyArray []GetRepositoryCustomPropertiesPropertyInput + +func (GetRepositoryCustomPropertiesPropertyArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetRepositoryCustomPropertiesProperty)(nil)).Elem() +} + +func (i GetRepositoryCustomPropertiesPropertyArray) ToGetRepositoryCustomPropertiesPropertyArrayOutput() GetRepositoryCustomPropertiesPropertyArrayOutput { + return i.ToGetRepositoryCustomPropertiesPropertyArrayOutputWithContext(context.Background()) +} + +func (i GetRepositoryCustomPropertiesPropertyArray) ToGetRepositoryCustomPropertiesPropertyArrayOutputWithContext(ctx context.Context) GetRepositoryCustomPropertiesPropertyArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetRepositoryCustomPropertiesPropertyArrayOutput) +} + +type GetRepositoryCustomPropertiesPropertyOutput struct{ *pulumi.OutputState } + +func (GetRepositoryCustomPropertiesPropertyOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryCustomPropertiesProperty)(nil)).Elem() +} + +func (o GetRepositoryCustomPropertiesPropertyOutput) ToGetRepositoryCustomPropertiesPropertyOutput() GetRepositoryCustomPropertiesPropertyOutput { + return o +} + +func (o GetRepositoryCustomPropertiesPropertyOutput) ToGetRepositoryCustomPropertiesPropertyOutputWithContext(ctx context.Context) GetRepositoryCustomPropertiesPropertyOutput { + return o +} + +// Name of the property +func (o GetRepositoryCustomPropertiesPropertyOutput) PropertyName() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryCustomPropertiesProperty) string { return v.PropertyName }).(pulumi.StringOutput) +} + +// Value of the property +func (o GetRepositoryCustomPropertiesPropertyOutput) PropertyValues() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetRepositoryCustomPropertiesProperty) []string { return v.PropertyValues }).(pulumi.StringArrayOutput) +} + +type GetRepositoryCustomPropertiesPropertyArrayOutput struct{ *pulumi.OutputState } + +func (GetRepositoryCustomPropertiesPropertyArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetRepositoryCustomPropertiesProperty)(nil)).Elem() +} + +func (o GetRepositoryCustomPropertiesPropertyArrayOutput) ToGetRepositoryCustomPropertiesPropertyArrayOutput() GetRepositoryCustomPropertiesPropertyArrayOutput { + return o +} + +func (o GetRepositoryCustomPropertiesPropertyArrayOutput) ToGetRepositoryCustomPropertiesPropertyArrayOutputWithContext(ctx context.Context) GetRepositoryCustomPropertiesPropertyArrayOutput { + return o +} + +func (o GetRepositoryCustomPropertiesPropertyArrayOutput) Index(i pulumi.IntInput) GetRepositoryCustomPropertiesPropertyOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetRepositoryCustomPropertiesProperty { + return vs[0].([]GetRepositoryCustomPropertiesProperty)[vs[1].(int)] + }).(GetRepositoryCustomPropertiesPropertyOutput) +} + type GetRepositoryDeployKeysKey struct { // Key id Id int `pulumi:"id"` @@ -15352,6 +15574,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*OrganizationWebhookConfigurationPtrInput)(nil)).Elem(), OrganizationWebhookConfigurationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderAppAuthInput)(nil)).Elem(), ProviderAppAuthArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderAppAuthPtrInput)(nil)).Elem(), ProviderAppAuthArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCollaboratorsIgnoreTeamInput)(nil)).Elem(), RepositoryCollaboratorsIgnoreTeamArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCollaboratorsIgnoreTeamArrayInput)(nil)).Elem(), RepositoryCollaboratorsIgnoreTeamArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCollaboratorsTeamInput)(nil)).Elem(), RepositoryCollaboratorsTeamArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCollaboratorsTeamArrayInput)(nil)).Elem(), RepositoryCollaboratorsTeamArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCollaboratorsUserInput)(nil)).Elem(), RepositoryCollaboratorsUserArgs{}) @@ -15458,6 +15682,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryAutolinkReferencesAutolinkReferenceArrayInput)(nil)).Elem(), GetRepositoryAutolinkReferencesAutolinkReferenceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryBranchesBranchInput)(nil)).Elem(), GetRepositoryBranchesBranchArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryBranchesBranchArrayInput)(nil)).Elem(), GetRepositoryBranchesBranchArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryCustomPropertiesPropertyInput)(nil)).Elem(), GetRepositoryCustomPropertiesPropertyArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryCustomPropertiesPropertyArrayInput)(nil)).Elem(), GetRepositoryCustomPropertiesPropertyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryDeployKeysKeyInput)(nil)).Elem(), GetRepositoryDeployKeysKeyArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryDeployKeysKeyArrayInput)(nil)).Elem(), GetRepositoryDeployKeysKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyInput)(nil)).Elem(), GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyArgs{}) @@ -15548,6 +15774,8 @@ func init() { pulumi.RegisterOutputType(OrganizationWebhookConfigurationPtrOutput{}) pulumi.RegisterOutputType(ProviderAppAuthOutput{}) pulumi.RegisterOutputType(ProviderAppAuthPtrOutput{}) + pulumi.RegisterOutputType(RepositoryCollaboratorsIgnoreTeamOutput{}) + pulumi.RegisterOutputType(RepositoryCollaboratorsIgnoreTeamArrayOutput{}) pulumi.RegisterOutputType(RepositoryCollaboratorsTeamOutput{}) pulumi.RegisterOutputType(RepositoryCollaboratorsTeamArrayOutput{}) pulumi.RegisterOutputType(RepositoryCollaboratorsUserOutput{}) @@ -15654,6 +15882,8 @@ func init() { pulumi.RegisterOutputType(GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryBranchesBranchOutput{}) pulumi.RegisterOutputType(GetRepositoryBranchesBranchArrayOutput{}) + pulumi.RegisterOutputType(GetRepositoryCustomPropertiesPropertyOutput{}) + pulumi.RegisterOutputType(GetRepositoryCustomPropertiesPropertyArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryDeployKeysKeyOutput{}) pulumi.RegisterOutputType(GetRepositoryDeployKeysKeyArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyOutput{}) diff --git a/sdk/go/github/repositoryCollaborators.go b/sdk/go/github/repositoryCollaborators.go index ce6ecb7f..c161d03b 100644 --- a/sdk/go/github/repositoryCollaborators.go +++ b/sdk/go/github/repositoryCollaborators.go @@ -99,14 +99,16 @@ import ( type RepositoryCollaborators struct { pulumi.CustomResourceState + // List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + IgnoreTeams RepositoryCollaboratorsIgnoreTeamArrayOutput `pulumi:"ignoreTeams"` // Map of usernames to invitation ID for any users added as part of creation of this resource to // be used in `UserInvitationAccepter`. InvitationIds pulumi.StringMapOutput `pulumi:"invitationIds"` - // The GitHub repository + // The GitHub repository. Repository pulumi.StringOutput `pulumi:"repository"` - // List of teams + // List of teams to grant access to the repository. Teams RepositoryCollaboratorsTeamArrayOutput `pulumi:"teams"` - // List of users + // List of users to grant access to the repository. Users RepositoryCollaboratorsUserArrayOutput `pulumi:"users"` } @@ -143,26 +145,30 @@ func GetRepositoryCollaborators(ctx *pulumi.Context, // Input properties used for looking up and filtering RepositoryCollaborators resources. type repositoryCollaboratorsState struct { + // List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + IgnoreTeams []RepositoryCollaboratorsIgnoreTeam `pulumi:"ignoreTeams"` // Map of usernames to invitation ID for any users added as part of creation of this resource to // be used in `UserInvitationAccepter`. InvitationIds map[string]string `pulumi:"invitationIds"` - // The GitHub repository + // The GitHub repository. Repository *string `pulumi:"repository"` - // List of teams + // List of teams to grant access to the repository. Teams []RepositoryCollaboratorsTeam `pulumi:"teams"` - // List of users + // List of users to grant access to the repository. Users []RepositoryCollaboratorsUser `pulumi:"users"` } type RepositoryCollaboratorsState struct { + // List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + IgnoreTeams RepositoryCollaboratorsIgnoreTeamArrayInput // Map of usernames to invitation ID for any users added as part of creation of this resource to // be used in `UserInvitationAccepter`. InvitationIds pulumi.StringMapInput - // The GitHub repository + // The GitHub repository. Repository pulumi.StringPtrInput - // List of teams + // List of teams to grant access to the repository. Teams RepositoryCollaboratorsTeamArrayInput - // List of users + // List of users to grant access to the repository. Users RepositoryCollaboratorsUserArrayInput } @@ -171,21 +177,25 @@ func (RepositoryCollaboratorsState) ElementType() reflect.Type { } type repositoryCollaboratorsArgs struct { - // The GitHub repository + // List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + IgnoreTeams []RepositoryCollaboratorsIgnoreTeam `pulumi:"ignoreTeams"` + // The GitHub repository. Repository string `pulumi:"repository"` - // List of teams + // List of teams to grant access to the repository. Teams []RepositoryCollaboratorsTeam `pulumi:"teams"` - // List of users + // List of users to grant access to the repository. Users []RepositoryCollaboratorsUser `pulumi:"users"` } // The set of arguments for constructing a RepositoryCollaborators resource. type RepositoryCollaboratorsArgs struct { - // The GitHub repository + // List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + IgnoreTeams RepositoryCollaboratorsIgnoreTeamArrayInput + // The GitHub repository. Repository pulumi.StringInput - // List of teams + // List of teams to grant access to the repository. Teams RepositoryCollaboratorsTeamArrayInput - // List of users + // List of users to grant access to the repository. Users RepositoryCollaboratorsUserArrayInput } @@ -276,23 +286,28 @@ func (o RepositoryCollaboratorsOutput) ToRepositoryCollaboratorsOutputWithContex return o } +// List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. +func (o RepositoryCollaboratorsOutput) IgnoreTeams() RepositoryCollaboratorsIgnoreTeamArrayOutput { + return o.ApplyT(func(v *RepositoryCollaborators) RepositoryCollaboratorsIgnoreTeamArrayOutput { return v.IgnoreTeams }).(RepositoryCollaboratorsIgnoreTeamArrayOutput) +} + // Map of usernames to invitation ID for any users added as part of creation of this resource to // be used in `UserInvitationAccepter`. func (o RepositoryCollaboratorsOutput) InvitationIds() pulumi.StringMapOutput { return o.ApplyT(func(v *RepositoryCollaborators) pulumi.StringMapOutput { return v.InvitationIds }).(pulumi.StringMapOutput) } -// The GitHub repository +// The GitHub repository. func (o RepositoryCollaboratorsOutput) Repository() pulumi.StringOutput { return o.ApplyT(func(v *RepositoryCollaborators) pulumi.StringOutput { return v.Repository }).(pulumi.StringOutput) } -// List of teams +// List of teams to grant access to the repository. func (o RepositoryCollaboratorsOutput) Teams() RepositoryCollaboratorsTeamArrayOutput { return o.ApplyT(func(v *RepositoryCollaborators) RepositoryCollaboratorsTeamArrayOutput { return v.Teams }).(RepositoryCollaboratorsTeamArrayOutput) } -// List of users +// List of users to grant access to the repository. func (o RepositoryCollaboratorsOutput) Users() RepositoryCollaboratorsUserArrayOutput { return o.ApplyT(func(v *RepositoryCollaborators) RepositoryCollaboratorsUserArrayOutput { return v.Users }).(RepositoryCollaboratorsUserArrayOutput) } diff --git a/sdk/go/github/repositoryCustomProperty.go b/sdk/go/github/repositoryCustomProperty.go new file mode 100644 index 00000000..769760eb --- /dev/null +++ b/sdk/go/github/repositoryCustomProperty.go @@ -0,0 +1,321 @@ +// 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 github + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-github/sdk/v6/go/github/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// This resource allows you to create and manage a specific custom property for a GitHub repository. +// +// ## Example Usage +// +// > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-github/sdk/v6/go/github" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{ +// Name: pulumi.String("example"), +// Description: pulumi.String("My awesome codebase"), +// }) +// if err != nil { +// return err +// } +// _, err = github.NewRepositoryCustomProperty(ctx, "string", &github.RepositoryCustomPropertyArgs{ +// Repository: example.Name, +// PropertyName: pulumi.String("my-cool-property"), +// PropertyType: pulumi.String("string"), +// PropertyValues: pulumi.StringArray{ +// pulumi.String("test"), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// GitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g. +// +// ```sh +// $ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example :: +// ``` +type RepositoryCustomProperty struct { + pulumi.CustomResourceState + + // Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + PropertyName pulumi.StringOutput `pulumi:"propertyName"` + // Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + PropertyType pulumi.StringOutput `pulumi:"propertyType"` + // Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + PropertyValues pulumi.StringArrayOutput `pulumi:"propertyValues"` + // The repository of the environment. + Repository pulumi.StringOutput `pulumi:"repository"` +} + +// NewRepositoryCustomProperty registers a new resource with the given unique name, arguments, and options. +func NewRepositoryCustomProperty(ctx *pulumi.Context, + name string, args *RepositoryCustomPropertyArgs, opts ...pulumi.ResourceOption) (*RepositoryCustomProperty, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.PropertyName == nil { + return nil, errors.New("invalid value for required argument 'PropertyName'") + } + if args.PropertyType == nil { + return nil, errors.New("invalid value for required argument 'PropertyType'") + } + if args.PropertyValues == nil { + return nil, errors.New("invalid value for required argument 'PropertyValues'") + } + if args.Repository == nil { + return nil, errors.New("invalid value for required argument 'Repository'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource RepositoryCustomProperty + err := ctx.RegisterResource("github:index/repositoryCustomProperty:RepositoryCustomProperty", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetRepositoryCustomProperty gets an existing RepositoryCustomProperty 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 GetRepositoryCustomProperty(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *RepositoryCustomPropertyState, opts ...pulumi.ResourceOption) (*RepositoryCustomProperty, error) { + var resource RepositoryCustomProperty + err := ctx.ReadResource("github:index/repositoryCustomProperty:RepositoryCustomProperty", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering RepositoryCustomProperty resources. +type repositoryCustomPropertyState struct { + // Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + PropertyName *string `pulumi:"propertyName"` + // Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + PropertyType *string `pulumi:"propertyType"` + // Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + PropertyValues []string `pulumi:"propertyValues"` + // The repository of the environment. + Repository *string `pulumi:"repository"` +} + +type RepositoryCustomPropertyState struct { + // Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + PropertyName pulumi.StringPtrInput + // Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + PropertyType pulumi.StringPtrInput + // Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + PropertyValues pulumi.StringArrayInput + // The repository of the environment. + Repository pulumi.StringPtrInput +} + +func (RepositoryCustomPropertyState) ElementType() reflect.Type { + return reflect.TypeOf((*repositoryCustomPropertyState)(nil)).Elem() +} + +type repositoryCustomPropertyArgs struct { + // Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + PropertyName string `pulumi:"propertyName"` + // Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + PropertyType string `pulumi:"propertyType"` + // Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + PropertyValues []string `pulumi:"propertyValues"` + // The repository of the environment. + Repository string `pulumi:"repository"` +} + +// The set of arguments for constructing a RepositoryCustomProperty resource. +type RepositoryCustomPropertyArgs struct { + // Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + PropertyName pulumi.StringInput + // Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + PropertyType pulumi.StringInput + // Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + PropertyValues pulumi.StringArrayInput + // The repository of the environment. + Repository pulumi.StringInput +} + +func (RepositoryCustomPropertyArgs) ElementType() reflect.Type { + return reflect.TypeOf((*repositoryCustomPropertyArgs)(nil)).Elem() +} + +type RepositoryCustomPropertyInput interface { + pulumi.Input + + ToRepositoryCustomPropertyOutput() RepositoryCustomPropertyOutput + ToRepositoryCustomPropertyOutputWithContext(ctx context.Context) RepositoryCustomPropertyOutput +} + +func (*RepositoryCustomProperty) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryCustomProperty)(nil)).Elem() +} + +func (i *RepositoryCustomProperty) ToRepositoryCustomPropertyOutput() RepositoryCustomPropertyOutput { + return i.ToRepositoryCustomPropertyOutputWithContext(context.Background()) +} + +func (i *RepositoryCustomProperty) ToRepositoryCustomPropertyOutputWithContext(ctx context.Context) RepositoryCustomPropertyOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCustomPropertyOutput) +} + +// RepositoryCustomPropertyArrayInput is an input type that accepts RepositoryCustomPropertyArray and RepositoryCustomPropertyArrayOutput values. +// You can construct a concrete instance of `RepositoryCustomPropertyArrayInput` via: +// +// RepositoryCustomPropertyArray{ RepositoryCustomPropertyArgs{...} } +type RepositoryCustomPropertyArrayInput interface { + pulumi.Input + + ToRepositoryCustomPropertyArrayOutput() RepositoryCustomPropertyArrayOutput + ToRepositoryCustomPropertyArrayOutputWithContext(context.Context) RepositoryCustomPropertyArrayOutput +} + +type RepositoryCustomPropertyArray []RepositoryCustomPropertyInput + +func (RepositoryCustomPropertyArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RepositoryCustomProperty)(nil)).Elem() +} + +func (i RepositoryCustomPropertyArray) ToRepositoryCustomPropertyArrayOutput() RepositoryCustomPropertyArrayOutput { + return i.ToRepositoryCustomPropertyArrayOutputWithContext(context.Background()) +} + +func (i RepositoryCustomPropertyArray) ToRepositoryCustomPropertyArrayOutputWithContext(ctx context.Context) RepositoryCustomPropertyArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCustomPropertyArrayOutput) +} + +// RepositoryCustomPropertyMapInput is an input type that accepts RepositoryCustomPropertyMap and RepositoryCustomPropertyMapOutput values. +// You can construct a concrete instance of `RepositoryCustomPropertyMapInput` via: +// +// RepositoryCustomPropertyMap{ "key": RepositoryCustomPropertyArgs{...} } +type RepositoryCustomPropertyMapInput interface { + pulumi.Input + + ToRepositoryCustomPropertyMapOutput() RepositoryCustomPropertyMapOutput + ToRepositoryCustomPropertyMapOutputWithContext(context.Context) RepositoryCustomPropertyMapOutput +} + +type RepositoryCustomPropertyMap map[string]RepositoryCustomPropertyInput + +func (RepositoryCustomPropertyMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RepositoryCustomProperty)(nil)).Elem() +} + +func (i RepositoryCustomPropertyMap) ToRepositoryCustomPropertyMapOutput() RepositoryCustomPropertyMapOutput { + return i.ToRepositoryCustomPropertyMapOutputWithContext(context.Background()) +} + +func (i RepositoryCustomPropertyMap) ToRepositoryCustomPropertyMapOutputWithContext(ctx context.Context) RepositoryCustomPropertyMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCustomPropertyMapOutput) +} + +type RepositoryCustomPropertyOutput struct{ *pulumi.OutputState } + +func (RepositoryCustomPropertyOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryCustomProperty)(nil)).Elem() +} + +func (o RepositoryCustomPropertyOutput) ToRepositoryCustomPropertyOutput() RepositoryCustomPropertyOutput { + return o +} + +func (o RepositoryCustomPropertyOutput) ToRepositoryCustomPropertyOutputWithContext(ctx context.Context) RepositoryCustomPropertyOutput { + return o +} + +// Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level +func (o RepositoryCustomPropertyOutput) PropertyName() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryCustomProperty) pulumi.StringOutput { return v.PropertyName }).(pulumi.StringOutput) +} + +// Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` +func (o RepositoryCustomPropertyOutput) PropertyType() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryCustomProperty) pulumi.StringOutput { return v.PropertyType }).(pulumi.StringOutput) +} + +// Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 +func (o RepositoryCustomPropertyOutput) PropertyValues() pulumi.StringArrayOutput { + return o.ApplyT(func(v *RepositoryCustomProperty) pulumi.StringArrayOutput { return v.PropertyValues }).(pulumi.StringArrayOutput) +} + +// The repository of the environment. +func (o RepositoryCustomPropertyOutput) Repository() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryCustomProperty) pulumi.StringOutput { return v.Repository }).(pulumi.StringOutput) +} + +type RepositoryCustomPropertyArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryCustomPropertyArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RepositoryCustomProperty)(nil)).Elem() +} + +func (o RepositoryCustomPropertyArrayOutput) ToRepositoryCustomPropertyArrayOutput() RepositoryCustomPropertyArrayOutput { + return o +} + +func (o RepositoryCustomPropertyArrayOutput) ToRepositoryCustomPropertyArrayOutputWithContext(ctx context.Context) RepositoryCustomPropertyArrayOutput { + return o +} + +func (o RepositoryCustomPropertyArrayOutput) Index(i pulumi.IntInput) RepositoryCustomPropertyOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RepositoryCustomProperty { + return vs[0].([]*RepositoryCustomProperty)[vs[1].(int)] + }).(RepositoryCustomPropertyOutput) +} + +type RepositoryCustomPropertyMapOutput struct{ *pulumi.OutputState } + +func (RepositoryCustomPropertyMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RepositoryCustomProperty)(nil)).Elem() +} + +func (o RepositoryCustomPropertyMapOutput) ToRepositoryCustomPropertyMapOutput() RepositoryCustomPropertyMapOutput { + return o +} + +func (o RepositoryCustomPropertyMapOutput) ToRepositoryCustomPropertyMapOutputWithContext(ctx context.Context) RepositoryCustomPropertyMapOutput { + return o +} + +func (o RepositoryCustomPropertyMapOutput) MapIndex(k pulumi.StringInput) RepositoryCustomPropertyOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RepositoryCustomProperty { + return vs[0].(map[string]*RepositoryCustomProperty)[vs[1].(string)] + }).(RepositoryCustomPropertyOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCustomPropertyInput)(nil)).Elem(), &RepositoryCustomProperty{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCustomPropertyArrayInput)(nil)).Elem(), RepositoryCustomPropertyArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryCustomPropertyMapInput)(nil)).Elem(), RepositoryCustomPropertyMap{}) + pulumi.RegisterOutputType(RepositoryCustomPropertyOutput{}) + pulumi.RegisterOutputType(RepositoryCustomPropertyArrayOutput{}) + pulumi.RegisterOutputType(RepositoryCustomPropertyMapOutput{}) +} diff --git a/sdk/go/github/repositoryDependabotSecurityUpdates.go b/sdk/go/github/repositoryDependabotSecurityUpdates.go index d050ed9d..5047315a 100644 --- a/sdk/go/github/repositoryDependabotSecurityUpdates.go +++ b/sdk/go/github/repositoryDependabotSecurityUpdates.go @@ -40,7 +40,7 @@ import ( // return err // } // _, err = github.NewRepositoryDependabotSecurityUpdates(ctx, "example", &github.RepositoryDependabotSecurityUpdatesArgs{ -// Repository: pulumi.Any(test.Id), +// Repository: pulumi.Any(test.Name), // Enabled: pulumi.Bool(true), // }) // if err != nil { @@ -64,7 +64,7 @@ type RepositoryDependabotSecurityUpdates struct { // The state of the automated security fixes. Enabled pulumi.BoolOutput `pulumi:"enabled"` - // The repository to manage. + // The name of the GitHub repository. Repository pulumi.StringOutput `pulumi:"repository"` } @@ -106,14 +106,14 @@ func GetRepositoryDependabotSecurityUpdates(ctx *pulumi.Context, type repositoryDependabotSecurityUpdatesState struct { // The state of the automated security fixes. Enabled *bool `pulumi:"enabled"` - // The repository to manage. + // The name of the GitHub repository. Repository *string `pulumi:"repository"` } type RepositoryDependabotSecurityUpdatesState struct { // The state of the automated security fixes. Enabled pulumi.BoolPtrInput - // The repository to manage. + // The name of the GitHub repository. Repository pulumi.StringPtrInput } @@ -124,7 +124,7 @@ func (RepositoryDependabotSecurityUpdatesState) ElementType() reflect.Type { type repositoryDependabotSecurityUpdatesArgs struct { // The state of the automated security fixes. Enabled bool `pulumi:"enabled"` - // The repository to manage. + // The name of the GitHub repository. Repository string `pulumi:"repository"` } @@ -132,7 +132,7 @@ type repositoryDependabotSecurityUpdatesArgs struct { type RepositoryDependabotSecurityUpdatesArgs struct { // The state of the automated security fixes. Enabled pulumi.BoolInput - // The repository to manage. + // The name of the GitHub repository. Repository pulumi.StringInput } @@ -228,7 +228,7 @@ func (o RepositoryDependabotSecurityUpdatesOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v *RepositoryDependabotSecurityUpdates) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) } -// The repository to manage. +// The name of the GitHub repository. func (o RepositoryDependabotSecurityUpdatesOutput) Repository() pulumi.StringOutput { return o.ApplyT(func(v *RepositoryDependabotSecurityUpdates) pulumi.StringOutput { return v.Repository }).(pulumi.StringOutput) } diff --git a/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java b/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java index 7d69f38e..2b7b1cc8 100644 --- a/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java @@ -64,6 +64,8 @@ import com.pulumi.github.inputs.GetRepositoryAutolinkReferencesPlainArgs; import com.pulumi.github.inputs.GetRepositoryBranchesArgs; import com.pulumi.github.inputs.GetRepositoryBranchesPlainArgs; +import com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs; +import com.pulumi.github.inputs.GetRepositoryCustomPropertiesPlainArgs; import com.pulumi.github.inputs.GetRepositoryDeployKeysArgs; import com.pulumi.github.inputs.GetRepositoryDeployKeysPlainArgs; import com.pulumi.github.inputs.GetRepositoryDeploymentBranchPoliciesArgs; @@ -139,6 +141,7 @@ import com.pulumi.github.outputs.GetRepositoriesResult; import com.pulumi.github.outputs.GetRepositoryAutolinkReferencesResult; import com.pulumi.github.outputs.GetRepositoryBranchesResult; +import com.pulumi.github.outputs.GetRepositoryCustomPropertiesResult; import com.pulumi.github.outputs.GetRepositoryDeployKeysResult; import com.pulumi.github.outputs.GetRepositoryDeploymentBranchPoliciesResult; import com.pulumi.github.outputs.GetRepositoryEnvironmentsResult; @@ -11877,6 +11880,216 @@ public static Output getRepositoryBranches(GetRepos public static CompletableFuture getRepositoryBranchesPlain(GetRepositoryBranchesPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("github:index/getRepositoryBranches:getRepositoryBranches", TypeShape.of(GetRepositoryBranchesResult.class), args, Utilities.withVersion(options)); } + /** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.github.GithubFunctions;
+     * import com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs;
+     * 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 = GithubFunctions.getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs.builder()
+     *             .repository("example-repository")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs args) { + return getRepositoryCustomProperties(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.github.GithubFunctions;
+     * import com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs;
+     * 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 = GithubFunctions.getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs.builder()
+     *             .repository("example-repository")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getRepositoryCustomPropertiesPlain(GetRepositoryCustomPropertiesPlainArgs args) { + return getRepositoryCustomPropertiesPlain(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.github.GithubFunctions;
+     * import com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs;
+     * 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 = GithubFunctions.getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs.builder()
+     *             .repository("example-repository")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", TypeShape.of(GetRepositoryCustomPropertiesResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.github.GithubFunctions;
+     * import com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs;
+     * 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 = GithubFunctions.getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs.builder()
+     *             .repository("example-repository")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", TypeShape.of(GetRepositoryCustomPropertiesResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.github.GithubFunctions;
+     * import com.pulumi.github.inputs.GetRepositoryCustomPropertiesArgs;
+     * 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 = GithubFunctions.getRepositoryCustomProperties(GetRepositoryCustomPropertiesArgs.builder()
+     *             .repository("example-repository")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getRepositoryCustomPropertiesPlain(GetRepositoryCustomPropertiesPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", TypeShape.of(GetRepositoryCustomPropertiesResult.class), args, Utilities.withVersion(options)); + } /** * Use this data source to retrieve all deploy keys of a repository. * diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaborators.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaborators.java index 5f60b28a..44d44b48 100644 --- a/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaborators.java +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaborators.java @@ -10,6 +10,7 @@ import com.pulumi.github.RepositoryCollaboratorsArgs; import com.pulumi.github.Utilities; import com.pulumi.github.inputs.RepositoryCollaboratorsState; +import com.pulumi.github.outputs.RepositoryCollaboratorsIgnoreTeam; import com.pulumi.github.outputs.RepositoryCollaboratorsTeam; import com.pulumi.github.outputs.RepositoryCollaboratorsUser; import java.lang.String; @@ -114,6 +115,20 @@ */ @ResourceType(type="github:index/repositoryCollaborators:RepositoryCollaborators") public class RepositoryCollaborators extends com.pulumi.resources.CustomResource { + /** + * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + */ + @Export(name="ignoreTeams", refs={List.class,RepositoryCollaboratorsIgnoreTeam.class}, tree="[0,1]") + private Output> ignoreTeams; + + /** + * @return List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + */ + public Output>> ignoreTeams() { + return Codegen.optional(this.ignoreTeams); + } /** * Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. @@ -131,42 +146,42 @@ public Output> invitationIds() { return this.invitationIds; } /** - * The GitHub repository + * The GitHub repository. * */ @Export(name="repository", refs={String.class}, tree="[0]") private Output repository; /** - * @return The GitHub repository + * @return The GitHub repository. * */ public Output repository() { return this.repository; } /** - * List of teams + * List of teams to grant access to the repository. * */ @Export(name="teams", refs={List.class,RepositoryCollaboratorsTeam.class}, tree="[0,1]") private Output> teams; /** - * @return List of teams + * @return List of teams to grant access to the repository. * */ public Output>> teams() { return Codegen.optional(this.teams); } /** - * List of users + * List of users to grant access to the repository. * */ @Export(name="users", refs={List.class,RepositoryCollaboratorsUser.class}, tree="[0,1]") private Output> users; /** - * @return List of users + * @return List of users to grant access to the repository. * */ public Output>> users() { diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaboratorsArgs.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaboratorsArgs.java index b639789d..40bdc941 100644 --- a/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaboratorsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryCollaboratorsArgs.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import com.pulumi.github.inputs.RepositoryCollaboratorsIgnoreTeamArgs; import com.pulumi.github.inputs.RepositoryCollaboratorsTeamArgs; import com.pulumi.github.inputs.RepositoryCollaboratorsUserArgs; import java.lang.String; @@ -20,14 +21,29 @@ public final class RepositoryCollaboratorsArgs extends com.pulumi.resources.Reso public static final RepositoryCollaboratorsArgs Empty = new RepositoryCollaboratorsArgs(); /** - * The GitHub repository + * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + */ + @Import(name="ignoreTeams") + private @Nullable Output> ignoreTeams; + + /** + * @return List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + */ + public Optional>> ignoreTeams() { + return Optional.ofNullable(this.ignoreTeams); + } + + /** + * The GitHub repository. * */ @Import(name="repository", required=true) private Output repository; /** - * @return The GitHub repository + * @return The GitHub repository. * */ public Output repository() { @@ -35,14 +51,14 @@ public Output repository() { } /** - * List of teams + * List of teams to grant access to the repository. * */ @Import(name="teams") private @Nullable Output> teams; /** - * @return List of teams + * @return List of teams to grant access to the repository. * */ public Optional>> teams() { @@ -50,14 +66,14 @@ public Optional>> teams() { } /** - * List of users + * List of users to grant access to the repository. * */ @Import(name="users") private @Nullable Output> users; /** - * @return List of users + * @return List of users to grant access to the repository. * */ public Optional>> users() { @@ -67,6 +83,7 @@ public Optional>> users() { private RepositoryCollaboratorsArgs() {} private RepositoryCollaboratorsArgs(RepositoryCollaboratorsArgs $) { + this.ignoreTeams = $.ignoreTeams; this.repository = $.repository; this.teams = $.teams; this.users = $.users; @@ -91,7 +108,38 @@ public Builder(RepositoryCollaboratorsArgs defaults) { } /** - * @param repository The GitHub repository + * @param ignoreTeams List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + * @return builder + * + */ + public Builder ignoreTeams(@Nullable Output> ignoreTeams) { + $.ignoreTeams = ignoreTeams; + return this; + } + + /** + * @param ignoreTeams List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + * @return builder + * + */ + public Builder ignoreTeams(List ignoreTeams) { + return ignoreTeams(Output.of(ignoreTeams)); + } + + /** + * @param ignoreTeams List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + * @return builder + * + */ + public Builder ignoreTeams(RepositoryCollaboratorsIgnoreTeamArgs... ignoreTeams) { + return ignoreTeams(List.of(ignoreTeams)); + } + + /** + * @param repository The GitHub repository. * * @return builder * @@ -102,7 +150,7 @@ public Builder repository(Output repository) { } /** - * @param repository The GitHub repository + * @param repository The GitHub repository. * * @return builder * @@ -112,7 +160,7 @@ public Builder repository(String repository) { } /** - * @param teams List of teams + * @param teams List of teams to grant access to the repository. * * @return builder * @@ -123,7 +171,7 @@ public Builder teams(@Nullable Output> tea } /** - * @param teams List of teams + * @param teams List of teams to grant access to the repository. * * @return builder * @@ -133,7 +181,7 @@ public Builder teams(List teams) { } /** - * @param teams List of teams + * @param teams List of teams to grant access to the repository. * * @return builder * @@ -143,7 +191,7 @@ public Builder teams(RepositoryCollaboratorsTeamArgs... teams) { } /** - * @param users List of users + * @param users List of users to grant access to the repository. * * @return builder * @@ -154,7 +202,7 @@ public Builder users(@Nullable Output> use } /** - * @param users List of users + * @param users List of users to grant access to the repository. * * @return builder * @@ -164,7 +212,7 @@ public Builder users(List users) { } /** - * @param users List of users + * @param users List of users to grant access to the repository. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryCustomProperty.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryCustomProperty.java new file mode 100644 index 00000000..e5263aae --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryCustomProperty.java @@ -0,0 +1,190 @@ +// *** 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.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.github.RepositoryCustomPropertyArgs; +import com.pulumi.github.Utilities; +import com.pulumi.github.inputs.RepositoryCustomPropertyState; +import java.lang.String; +import java.util.List; +import javax.annotation.Nullable; + +/** + * This resource allows you to create and manage a specific custom property for a GitHub repository. + * + * ## Example Usage + * + * > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.github.Repository;
+ * import com.pulumi.github.RepositoryArgs;
+ * import com.pulumi.github.RepositoryCustomProperty;
+ * import com.pulumi.github.RepositoryCustomPropertyArgs;
+ * 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 example = new Repository("example", RepositoryArgs.builder()
+ *             .name("example")
+ *             .description("My awesome codebase")
+ *             .build());
+ * 
+ *         var string = new RepositoryCustomProperty("string", RepositoryCustomPropertyArgs.builder()
+ *             .repository(example.name())
+ *             .propertyName("my-cool-property")
+ *             .propertyType("string")
+ *             .propertyValues("test")
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + * ## Import + * + * GitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g. + * + * ```sh + * $ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example <organization-name>:<repo-name>:<custom-property-name> + * ``` + * + */ +@ResourceType(type="github:index/repositoryCustomProperty:RepositoryCustomProperty") +public class RepositoryCustomProperty extends com.pulumi.resources.CustomResource { + /** + * Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + */ + @Export(name="propertyName", refs={String.class}, tree="[0]") + private Output propertyName; + + /** + * @return Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + */ + public Output propertyName() { + return this.propertyName; + } + /** + * Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + */ + @Export(name="propertyType", refs={String.class}, tree="[0]") + private Output propertyType; + + /** + * @return Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + */ + public Output propertyType() { + return this.propertyType; + } + /** + * Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + */ + @Export(name="propertyValues", refs={List.class,String.class}, tree="[0,1]") + private Output> propertyValues; + + /** + * @return Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + */ + public Output> propertyValues() { + return this.propertyValues; + } + /** + * The repository of the environment. + * + */ + @Export(name="repository", refs={String.class}, tree="[0]") + private Output repository; + + /** + * @return The repository of the environment. + * + */ + public Output repository() { + return this.repository; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public RepositoryCustomProperty(java.lang.String name) { + this(name, RepositoryCustomPropertyArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public RepositoryCustomProperty(java.lang.String name, RepositoryCustomPropertyArgs 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 RepositoryCustomProperty(java.lang.String name, RepositoryCustomPropertyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/repositoryCustomProperty:RepositoryCustomProperty", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private RepositoryCustomProperty(java.lang.String name, Output id, @Nullable RepositoryCustomPropertyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/repositoryCustomProperty:RepositoryCustomProperty", name, state, makeResourceOptions(options, id), false); + } + + private static RepositoryCustomPropertyArgs makeArgs(RepositoryCustomPropertyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? RepositoryCustomPropertyArgs.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 RepositoryCustomProperty get(java.lang.String name, Output id, @Nullable RepositoryCustomPropertyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new RepositoryCustomProperty(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryCustomPropertyArgs.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryCustomPropertyArgs.java new file mode 100644 index 00000000..96bf016e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryCustomPropertyArgs.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.github; + +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; + + +public final class RepositoryCustomPropertyArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryCustomPropertyArgs Empty = new RepositoryCustomPropertyArgs(); + + /** + * Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + */ + @Import(name="propertyName", required=true) + private Output propertyName; + + /** + * @return Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + */ + public Output propertyName() { + return this.propertyName; + } + + /** + * Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + */ + @Import(name="propertyType", required=true) + private Output propertyType; + + /** + * @return Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + */ + public Output propertyType() { + return this.propertyType; + } + + /** + * Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + */ + @Import(name="propertyValues", required=true) + private Output> propertyValues; + + /** + * @return Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + */ + public Output> propertyValues() { + return this.propertyValues; + } + + /** + * The repository of the environment. + * + */ + @Import(name="repository", required=true) + private Output repository; + + /** + * @return The repository of the environment. + * + */ + public Output repository() { + return this.repository; + } + + private RepositoryCustomPropertyArgs() {} + + private RepositoryCustomPropertyArgs(RepositoryCustomPropertyArgs $) { + this.propertyName = $.propertyName; + this.propertyType = $.propertyType; + this.propertyValues = $.propertyValues; + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryCustomPropertyArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryCustomPropertyArgs $; + + public Builder() { + $ = new RepositoryCustomPropertyArgs(); + } + + public Builder(RepositoryCustomPropertyArgs defaults) { + $ = new RepositoryCustomPropertyArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param propertyName Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + * @return builder + * + */ + public Builder propertyName(Output propertyName) { + $.propertyName = propertyName; + return this; + } + + /** + * @param propertyName Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + * @return builder + * + */ + public Builder propertyName(String propertyName) { + return propertyName(Output.of(propertyName)); + } + + /** + * @param propertyType Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + * @return builder + * + */ + public Builder propertyType(Output propertyType) { + $.propertyType = propertyType; + return this; + } + + /** + * @param propertyType Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + * @return builder + * + */ + public Builder propertyType(String propertyType) { + return propertyType(Output.of(propertyType)); + } + + /** + * @param propertyValues Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + * @return builder + * + */ + public Builder propertyValues(Output> propertyValues) { + $.propertyValues = propertyValues; + return this; + } + + /** + * @param propertyValues Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + * @return builder + * + */ + public Builder propertyValues(List propertyValues) { + return propertyValues(Output.of(propertyValues)); + } + + /** + * @param propertyValues Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + * @return builder + * + */ + public Builder propertyValues(String... propertyValues) { + return propertyValues(List.of(propertyValues)); + } + + /** + * @param repository The repository of the environment. + * + * @return builder + * + */ + public Builder repository(Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository The repository of the environment. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + public RepositoryCustomPropertyArgs build() { + if ($.propertyName == null) { + throw new MissingRequiredPropertyException("RepositoryCustomPropertyArgs", "propertyName"); + } + if ($.propertyType == null) { + throw new MissingRequiredPropertyException("RepositoryCustomPropertyArgs", "propertyType"); + } + if ($.propertyValues == null) { + throw new MissingRequiredPropertyException("RepositoryCustomPropertyArgs", "propertyValues"); + } + if ($.repository == null) { + throw new MissingRequiredPropertyException("RepositoryCustomPropertyArgs", "repository"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdates.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdates.java index f12ccb80..4882ad3b 100644 --- a/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdates.java +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdates.java @@ -54,7 +54,7 @@ * .build()); * * var example = new RepositoryDependabotSecurityUpdates("example", RepositoryDependabotSecurityUpdatesArgs.builder() - * .repository(test.id()) + * .repository(test.name()) * .enabled(true) * .build()); * @@ -90,14 +90,14 @@ public Output enabled() { return this.enabled; } /** - * The repository to manage. + * The name of the GitHub repository. * */ @Export(name="repository", refs={String.class}, tree="[0]") private Output repository; /** - * @return The repository to manage. + * @return The name of the GitHub repository. * */ public Output repository() { diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdatesArgs.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdatesArgs.java index fca36cb8..4753a70f 100644 --- a/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdatesArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryDependabotSecurityUpdatesArgs.java @@ -31,14 +31,14 @@ public Output enabled() { } /** - * The repository to manage. + * The name of the GitHub repository. * */ @Import(name="repository", required=true) private Output repository; /** - * @return The repository to manage. + * @return The name of the GitHub repository. * */ public Output repository() { @@ -92,7 +92,7 @@ public Builder enabled(Boolean enabled) { } /** - * @param repository The repository to manage. + * @param repository The name of the GitHub repository. * * @return builder * @@ -103,7 +103,7 @@ public Builder repository(Output repository) { } /** - * @param repository The repository to manage. + * @param repository The name of the GitHub repository. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryCustomPropertiesArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryCustomPropertiesArgs.java new file mode 100644 index 00000000..e7314b5c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryCustomPropertiesArgs.java @@ -0,0 +1,85 @@ +// *** 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.github.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 GetRepositoryCustomPropertiesArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRepositoryCustomPropertiesArgs Empty = new GetRepositoryCustomPropertiesArgs(); + + /** + * Name of the repository to retrieve the custom properties from. + * + */ + @Import(name="repository", required=true) + private Output repository; + + /** + * @return Name of the repository to retrieve the custom properties from. + * + */ + public Output repository() { + return this.repository; + } + + private GetRepositoryCustomPropertiesArgs() {} + + private GetRepositoryCustomPropertiesArgs(GetRepositoryCustomPropertiesArgs $) { + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRepositoryCustomPropertiesArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRepositoryCustomPropertiesArgs $; + + public Builder() { + $ = new GetRepositoryCustomPropertiesArgs(); + } + + public Builder(GetRepositoryCustomPropertiesArgs defaults) { + $ = new GetRepositoryCustomPropertiesArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository Name of the repository to retrieve the custom properties from. + * + * @return builder + * + */ + public Builder repository(Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository Name of the repository to retrieve the custom properties from. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + public GetRepositoryCustomPropertiesArgs build() { + if ($.repository == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesArgs", "repository"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryCustomPropertiesPlainArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryCustomPropertiesPlainArgs.java new file mode 100644 index 00000000..10a52862 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryCustomPropertiesPlainArgs.java @@ -0,0 +1,74 @@ +// *** 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.github.inputs; + +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetRepositoryCustomPropertiesPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRepositoryCustomPropertiesPlainArgs Empty = new GetRepositoryCustomPropertiesPlainArgs(); + + /** + * Name of the repository to retrieve the custom properties from. + * + */ + @Import(name="repository", required=true) + private String repository; + + /** + * @return Name of the repository to retrieve the custom properties from. + * + */ + public String repository() { + return this.repository; + } + + private GetRepositoryCustomPropertiesPlainArgs() {} + + private GetRepositoryCustomPropertiesPlainArgs(GetRepositoryCustomPropertiesPlainArgs $) { + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRepositoryCustomPropertiesPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRepositoryCustomPropertiesPlainArgs $; + + public Builder() { + $ = new GetRepositoryCustomPropertiesPlainArgs(); + } + + public Builder(GetRepositoryCustomPropertiesPlainArgs defaults) { + $ = new GetRepositoryCustomPropertiesPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository Name of the repository to retrieve the custom properties from. + * + * @return builder + * + */ + public Builder repository(String repository) { + $.repository = repository; + return this; + } + + public GetRepositoryCustomPropertiesPlainArgs build() { + if ($.repository == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesPlainArgs", "repository"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsIgnoreTeamArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsIgnoreTeamArgs.java new file mode 100644 index 00000000..24883b59 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsIgnoreTeamArgs.java @@ -0,0 +1,85 @@ +// *** 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.github.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 RepositoryCollaboratorsIgnoreTeamArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryCollaboratorsIgnoreTeamArgs Empty = new RepositoryCollaboratorsIgnoreTeamArgs(); + + /** + * ID or slug of the team to ignore. + * + */ + @Import(name="teamId", required=true) + private Output teamId; + + /** + * @return ID or slug of the team to ignore. + * + */ + public Output teamId() { + return this.teamId; + } + + private RepositoryCollaboratorsIgnoreTeamArgs() {} + + private RepositoryCollaboratorsIgnoreTeamArgs(RepositoryCollaboratorsIgnoreTeamArgs $) { + this.teamId = $.teamId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryCollaboratorsIgnoreTeamArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryCollaboratorsIgnoreTeamArgs $; + + public Builder() { + $ = new RepositoryCollaboratorsIgnoreTeamArgs(); + } + + public Builder(RepositoryCollaboratorsIgnoreTeamArgs defaults) { + $ = new RepositoryCollaboratorsIgnoreTeamArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param teamId ID or slug of the team to ignore. + * + * @return builder + * + */ + public Builder teamId(Output teamId) { + $.teamId = teamId; + return this; + } + + /** + * @param teamId ID or slug of the team to ignore. + * + * @return builder + * + */ + public Builder teamId(String teamId) { + return teamId(Output.of(teamId)); + } + + public RepositoryCollaboratorsIgnoreTeamArgs build() { + if ($.teamId == null) { + throw new MissingRequiredPropertyException("RepositoryCollaboratorsIgnoreTeamArgs", "teamId"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsState.java index 8879ca81..6b1973ba 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsState.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsState.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.RepositoryCollaboratorsIgnoreTeamArgs; import com.pulumi.github.inputs.RepositoryCollaboratorsTeamArgs; import com.pulumi.github.inputs.RepositoryCollaboratorsUserArgs; import java.lang.String; @@ -19,6 +20,21 @@ public final class RepositoryCollaboratorsState extends com.pulumi.resources.Res public static final RepositoryCollaboratorsState Empty = new RepositoryCollaboratorsState(); + /** + * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + */ + @Import(name="ignoreTeams") + private @Nullable Output> ignoreTeams; + + /** + * @return List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + */ + public Optional>> ignoreTeams() { + return Optional.ofNullable(this.ignoreTeams); + } + /** * Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. @@ -37,14 +53,14 @@ public Optional>> invitationIds() { } /** - * The GitHub repository + * The GitHub repository. * */ @Import(name="repository") private @Nullable Output repository; /** - * @return The GitHub repository + * @return The GitHub repository. * */ public Optional> repository() { @@ -52,14 +68,14 @@ public Optional> repository() { } /** - * List of teams + * List of teams to grant access to the repository. * */ @Import(name="teams") private @Nullable Output> teams; /** - * @return List of teams + * @return List of teams to grant access to the repository. * */ public Optional>> teams() { @@ -67,14 +83,14 @@ public Optional>> teams() { } /** - * List of users + * List of users to grant access to the repository. * */ @Import(name="users") private @Nullable Output> users; /** - * @return List of users + * @return List of users to grant access to the repository. * */ public Optional>> users() { @@ -84,6 +100,7 @@ public Optional>> users() { private RepositoryCollaboratorsState() {} private RepositoryCollaboratorsState(RepositoryCollaboratorsState $) { + this.ignoreTeams = $.ignoreTeams; this.invitationIds = $.invitationIds; this.repository = $.repository; this.teams = $.teams; @@ -108,6 +125,37 @@ public Builder(RepositoryCollaboratorsState defaults) { $ = new RepositoryCollaboratorsState(Objects.requireNonNull(defaults)); } + /** + * @param ignoreTeams List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + * @return builder + * + */ + public Builder ignoreTeams(@Nullable Output> ignoreTeams) { + $.ignoreTeams = ignoreTeams; + return this; + } + + /** + * @param ignoreTeams List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + * @return builder + * + */ + public Builder ignoreTeams(List ignoreTeams) { + return ignoreTeams(Output.of(ignoreTeams)); + } + + /** + * @param ignoreTeams List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + * + * @return builder + * + */ + public Builder ignoreTeams(RepositoryCollaboratorsIgnoreTeamArgs... ignoreTeams) { + return ignoreTeams(List.of(ignoreTeams)); + } + /** * @param invitationIds Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. @@ -132,7 +180,7 @@ public Builder invitationIds(Map invitationIds) { } /** - * @param repository The GitHub repository + * @param repository The GitHub repository. * * @return builder * @@ -143,7 +191,7 @@ public Builder repository(@Nullable Output repository) { } /** - * @param repository The GitHub repository + * @param repository The GitHub repository. * * @return builder * @@ -153,7 +201,7 @@ public Builder repository(String repository) { } /** - * @param teams List of teams + * @param teams List of teams to grant access to the repository. * * @return builder * @@ -164,7 +212,7 @@ public Builder teams(@Nullable Output> tea } /** - * @param teams List of teams + * @param teams List of teams to grant access to the repository. * * @return builder * @@ -174,7 +222,7 @@ public Builder teams(List teams) { } /** - * @param teams List of teams + * @param teams List of teams to grant access to the repository. * * @return builder * @@ -184,7 +232,7 @@ public Builder teams(RepositoryCollaboratorsTeamArgs... teams) { } /** - * @param users List of users + * @param users List of users to grant access to the repository. * * @return builder * @@ -195,7 +243,7 @@ public Builder users(@Nullable Output> use } /** - * @param users List of users + * @param users List of users to grant access to the repository. * * @return builder * @@ -205,7 +253,7 @@ public Builder users(List users) { } /** - * @param users List of users + * @param users List of users to grant access to the repository. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsTeamArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsTeamArgs.java index 95d1811e..e05a7cbc 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsTeamArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCollaboratorsTeamArgs.java @@ -36,14 +36,14 @@ public Optional> permission() { } /** - * The GitHub team id or the GitHub team slug + * The GitHub team id or the GitHub team slug. * */ @Import(name="teamId", required=true) private Output teamId; /** - * @return The GitHub team id or the GitHub team slug + * @return The GitHub team id or the GitHub team slug. * */ public Output teamId() { @@ -101,7 +101,7 @@ public Builder permission(String permission) { } /** - * @param teamId The GitHub team id or the GitHub team slug + * @param teamId The GitHub team id or the GitHub team slug. * * @return builder * @@ -112,7 +112,7 @@ public Builder teamId(Output teamId) { } /** - * @param teamId The GitHub team id or the GitHub team slug + * @param teamId The GitHub team id or the GitHub team slug. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCustomPropertyState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCustomPropertyState.java new file mode 100644 index 00000000..74d5ccb2 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryCustomPropertyState.java @@ -0,0 +1,205 @@ +// *** 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.github.inputs; + +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 RepositoryCustomPropertyState extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryCustomPropertyState Empty = new RepositoryCustomPropertyState(); + + /** + * Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + */ + @Import(name="propertyName") + private @Nullable Output propertyName; + + /** + * @return Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + */ + public Optional> propertyName() { + return Optional.ofNullable(this.propertyName); + } + + /** + * Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + */ + @Import(name="propertyType") + private @Nullable Output propertyType; + + /** + * @return Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + */ + public Optional> propertyType() { + return Optional.ofNullable(this.propertyType); + } + + /** + * Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + */ + @Import(name="propertyValues") + private @Nullable Output> propertyValues; + + /** + * @return Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + */ + public Optional>> propertyValues() { + return Optional.ofNullable(this.propertyValues); + } + + /** + * The repository of the environment. + * + */ + @Import(name="repository") + private @Nullable Output repository; + + /** + * @return The repository of the environment. + * + */ + public Optional> repository() { + return Optional.ofNullable(this.repository); + } + + private RepositoryCustomPropertyState() {} + + private RepositoryCustomPropertyState(RepositoryCustomPropertyState $) { + this.propertyName = $.propertyName; + this.propertyType = $.propertyType; + this.propertyValues = $.propertyValues; + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryCustomPropertyState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryCustomPropertyState $; + + public Builder() { + $ = new RepositoryCustomPropertyState(); + } + + public Builder(RepositoryCustomPropertyState defaults) { + $ = new RepositoryCustomPropertyState(Objects.requireNonNull(defaults)); + } + + /** + * @param propertyName Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + * @return builder + * + */ + public Builder propertyName(@Nullable Output propertyName) { + $.propertyName = propertyName; + return this; + } + + /** + * @param propertyName Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + * + * @return builder + * + */ + public Builder propertyName(String propertyName) { + return propertyName(Output.of(propertyName)); + } + + /** + * @param propertyType Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + * @return builder + * + */ + public Builder propertyType(@Nullable Output propertyType) { + $.propertyType = propertyType; + return this; + } + + /** + * @param propertyType Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + * + * @return builder + * + */ + public Builder propertyType(String propertyType) { + return propertyType(Output.of(propertyType)); + } + + /** + * @param propertyValues Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + * @return builder + * + */ + public Builder propertyValues(@Nullable Output> propertyValues) { + $.propertyValues = propertyValues; + return this; + } + + /** + * @param propertyValues Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + * @return builder + * + */ + public Builder propertyValues(List propertyValues) { + return propertyValues(Output.of(propertyValues)); + } + + /** + * @param propertyValues Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + * + * @return builder + * + */ + public Builder propertyValues(String... propertyValues) { + return propertyValues(List.of(propertyValues)); + } + + /** + * @param repository The repository of the environment. + * + * @return builder + * + */ + public Builder repository(@Nullable Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository The repository of the environment. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + public RepositoryCustomPropertyState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDependabotSecurityUpdatesState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDependabotSecurityUpdatesState.java index 8a41778f..af7cecb6 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDependabotSecurityUpdatesState.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDependabotSecurityUpdatesState.java @@ -32,14 +32,14 @@ public Optional> enabled() { } /** - * The repository to manage. + * The name of the GitHub repository. * */ @Import(name="repository") private @Nullable Output repository; /** - * @return The repository to manage. + * @return The name of the GitHub repository. * */ public Optional> repository() { @@ -93,7 +93,7 @@ public Builder enabled(Boolean enabled) { } /** - * @param repository The repository to manage. + * @param repository The name of the GitHub repository. * * @return builder * @@ -104,7 +104,7 @@ public Builder repository(@Nullable Output repository) { } /** - * @param repository The repository to manage. + * @param repository The name of the GitHub repository. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java index 475378da..b17402fe 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java @@ -16,14 +16,14 @@ public final class RepositoryRulesetBypassActorArgs extends com.pulumi.resources public static final RepositoryRulesetBypassActorArgs Empty = new RepositoryRulesetBypassActorArgs(); /** - * (Number) The ID of the actor that can bypass a ruleset. + * (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) * */ @Import(name="actorId", required=true) private Output actorId; /** - * @return (Number) The ID of the actor that can bypass a ruleset. + * @return (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) * */ public Output actorId() { @@ -95,7 +95,7 @@ public Builder(RepositoryRulesetBypassActorArgs defaults) { } /** - * @param actorId (Number) The ID of the actor that can bypass a ruleset. + * @param actorId (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) * * @return builder * @@ -106,7 +106,7 @@ public Builder actorId(Output actorId) { } /** - * @param actorId (Number) The ID of the actor that can bypass a ruleset. + * @param actorId (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java index 5a4e077b..c9194f06 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java @@ -18,6 +18,21 @@ public final class RepositoryRulesetRulesRequiredStatusChecksArgs extends com.pu public static final RepositoryRulesetRulesRequiredStatusChecksArgs Empty = new RepositoryRulesetRulesRequiredStatusChecksArgs(); + /** + * Allow repositories and branches to be created if a check would otherwise prohibit it. + * + */ + @Import(name="doNotEnforceOnCreate") + private @Nullable Output doNotEnforceOnCreate; + + /** + * @return Allow repositories and branches to be created if a check would otherwise prohibit it. + * + */ + public Optional> doNotEnforceOnCreate() { + return Optional.ofNullable(this.doNotEnforceOnCreate); + } + /** * Status checks that are required. Several can be defined. * @@ -51,6 +66,7 @@ public Optional> strictRequiredStatusChecksPolicy() { private RepositoryRulesetRulesRequiredStatusChecksArgs() {} private RepositoryRulesetRulesRequiredStatusChecksArgs(RepositoryRulesetRulesRequiredStatusChecksArgs $) { + this.doNotEnforceOnCreate = $.doNotEnforceOnCreate; this.requiredChecks = $.requiredChecks; this.strictRequiredStatusChecksPolicy = $.strictRequiredStatusChecksPolicy; } @@ -73,6 +89,27 @@ public Builder(RepositoryRulesetRulesRequiredStatusChecksArgs defaults) { $ = new RepositoryRulesetRulesRequiredStatusChecksArgs(Objects.requireNonNull(defaults)); } + /** + * @param doNotEnforceOnCreate Allow repositories and branches to be created if a check would otherwise prohibit it. + * + * @return builder + * + */ + public Builder doNotEnforceOnCreate(@Nullable Output doNotEnforceOnCreate) { + $.doNotEnforceOnCreate = doNotEnforceOnCreate; + return this; + } + + /** + * @param doNotEnforceOnCreate Allow repositories and branches to be created if a check would otherwise prohibit it. + * + * @return builder + * + */ + public Builder doNotEnforceOnCreate(Boolean doNotEnforceOnCreate) { + return doNotEnforceOnCreate(Output.of(doNotEnforceOnCreate)); + } + /** * @param requiredChecks Status checks that are required. Several can be defined. * diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryCustomPropertiesProperty.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryCustomPropertiesProperty.java new file mode 100644 index 00000000..e3e9bfed --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryCustomPropertiesProperty.java @@ -0,0 +1,85 @@ +// *** 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.github.outputs; + +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 GetRepositoryCustomPropertiesProperty { + /** + * @return Name of the property + * + */ + private String propertyName; + /** + * @return Value of the property + * + */ + private List propertyValues; + + private GetRepositoryCustomPropertiesProperty() {} + /** + * @return Name of the property + * + */ + public String propertyName() { + return this.propertyName; + } + /** + * @return Value of the property + * + */ + public List propertyValues() { + return this.propertyValues; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRepositoryCustomPropertiesProperty defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String propertyName; + private List propertyValues; + public Builder() {} + public Builder(GetRepositoryCustomPropertiesProperty defaults) { + Objects.requireNonNull(defaults); + this.propertyName = defaults.propertyName; + this.propertyValues = defaults.propertyValues; + } + + @CustomType.Setter + public Builder propertyName(String propertyName) { + if (propertyName == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesProperty", "propertyName"); + } + this.propertyName = propertyName; + return this; + } + @CustomType.Setter + public Builder propertyValues(List propertyValues) { + if (propertyValues == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesProperty", "propertyValues"); + } + this.propertyValues = propertyValues; + return this; + } + public Builder propertyValues(String... propertyValues) { + return propertyValues(List.of(propertyValues)); + } + public GetRepositoryCustomPropertiesProperty build() { + final var _resultValue = new GetRepositoryCustomPropertiesProperty(); + _resultValue.propertyName = propertyName; + _resultValue.propertyValues = propertyValues; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryCustomPropertiesResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryCustomPropertiesResult.java new file mode 100644 index 00000000..0670264d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryCustomPropertiesResult.java @@ -0,0 +1,101 @@ +// *** 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.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import com.pulumi.github.outputs.GetRepositoryCustomPropertiesProperty; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetRepositoryCustomPropertiesResult { + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + /** + * @return The list of this repository's custom properties. Each element of `property` has the following attributes: + * + */ + private List properties; + private String repository; + + private GetRepositoryCustomPropertiesResult() {} + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + /** + * @return The list of this repository's custom properties. Each element of `property` has the following attributes: + * + */ + public List properties() { + return this.properties; + } + public String repository() { + return this.repository; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRepositoryCustomPropertiesResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String id; + private List properties; + private String repository; + public Builder() {} + public Builder(GetRepositoryCustomPropertiesResult defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.properties = defaults.properties; + this.repository = defaults.repository; + } + + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesResult", "id"); + } + this.id = id; + return this; + } + @CustomType.Setter + public Builder properties(List properties) { + if (properties == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesResult", "properties"); + } + this.properties = properties; + return this; + } + public Builder properties(GetRepositoryCustomPropertiesProperty... properties) { + return properties(List.of(properties)); + } + @CustomType.Setter + public Builder repository(String repository) { + if (repository == null) { + throw new MissingRequiredPropertyException("GetRepositoryCustomPropertiesResult", "repository"); + } + this.repository = repository; + return this; + } + public GetRepositoryCustomPropertiesResult build() { + final var _resultValue = new GetRepositoryCustomPropertiesResult(); + _resultValue.id = id; + _resultValue.properties = properties; + _resultValue.repository = repository; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsIgnoreTeam.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsIgnoreTeam.java new file mode 100644 index 00000000..1854014a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsIgnoreTeam.java @@ -0,0 +1,58 @@ +// *** 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.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class RepositoryCollaboratorsIgnoreTeam { + /** + * @return ID or slug of the team to ignore. + * + */ + private String teamId; + + private RepositoryCollaboratorsIgnoreTeam() {} + /** + * @return ID or slug of the team to ignore. + * + */ + public String teamId() { + return this.teamId; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryCollaboratorsIgnoreTeam defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String teamId; + public Builder() {} + public Builder(RepositoryCollaboratorsIgnoreTeam defaults) { + Objects.requireNonNull(defaults); + this.teamId = defaults.teamId; + } + + @CustomType.Setter + public Builder teamId(String teamId) { + if (teamId == null) { + throw new MissingRequiredPropertyException("RepositoryCollaboratorsIgnoreTeam", "teamId"); + } + this.teamId = teamId; + return this; + } + public RepositoryCollaboratorsIgnoreTeam build() { + final var _resultValue = new RepositoryCollaboratorsIgnoreTeam(); + _resultValue.teamId = teamId; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsTeam.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsTeam.java index fa1e35da..526d2a52 100644 --- a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsTeam.java +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryCollaboratorsTeam.java @@ -20,7 +20,7 @@ public final class RepositoryCollaboratorsTeam { */ private @Nullable String permission; /** - * @return The GitHub team id or the GitHub team slug + * @return The GitHub team id or the GitHub team slug. * */ private String teamId; @@ -36,7 +36,7 @@ public Optional permission() { return Optional.ofNullable(this.permission); } /** - * @return The GitHub team id or the GitHub team slug + * @return The GitHub team id or the GitHub team slug. * */ public String teamId() { diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java index 35462fb8..3416e904 100644 --- a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java @@ -12,7 +12,7 @@ @CustomType public final class RepositoryRulesetBypassActor { /** - * @return (Number) The ID of the actor that can bypass a ruleset. + * @return (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) * */ private Integer actorId; @@ -33,7 +33,7 @@ public final class RepositoryRulesetBypassActor { private RepositoryRulesetBypassActor() {} /** - * @return (Number) The ID of the actor that can bypass a ruleset. + * @return (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) * */ public Integer actorId() { diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java index 844d08a7..e718d603 100644 --- a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java @@ -14,6 +14,11 @@ @CustomType public final class RepositoryRulesetRulesRequiredStatusChecks { + /** + * @return Allow repositories and branches to be created if a check would otherwise prohibit it. + * + */ + private @Nullable Boolean doNotEnforceOnCreate; /** * @return Status checks that are required. Several can be defined. * @@ -26,6 +31,13 @@ public final class RepositoryRulesetRulesRequiredStatusChecks { private @Nullable Boolean strictRequiredStatusChecksPolicy; private RepositoryRulesetRulesRequiredStatusChecks() {} + /** + * @return Allow repositories and branches to be created if a check would otherwise prohibit it. + * + */ + public Optional doNotEnforceOnCreate() { + return Optional.ofNullable(this.doNotEnforceOnCreate); + } /** * @return Status checks that are required. Several can be defined. * @@ -50,15 +62,23 @@ public static Builder builder(RepositoryRulesetRulesRequiredStatusChecks default } @CustomType.Builder public static final class Builder { + private @Nullable Boolean doNotEnforceOnCreate; private List requiredChecks; private @Nullable Boolean strictRequiredStatusChecksPolicy; public Builder() {} public Builder(RepositoryRulesetRulesRequiredStatusChecks defaults) { Objects.requireNonNull(defaults); + this.doNotEnforceOnCreate = defaults.doNotEnforceOnCreate; this.requiredChecks = defaults.requiredChecks; this.strictRequiredStatusChecksPolicy = defaults.strictRequiredStatusChecksPolicy; } + @CustomType.Setter + public Builder doNotEnforceOnCreate(@Nullable Boolean doNotEnforceOnCreate) { + + this.doNotEnforceOnCreate = doNotEnforceOnCreate; + return this; + } @CustomType.Setter public Builder requiredChecks(List requiredChecks) { if (requiredChecks == null) { @@ -78,6 +98,7 @@ public Builder strictRequiredStatusChecksPolicy(@Nullable Boolean strictRequired } public RepositoryRulesetRulesRequiredStatusChecks build() { final var _resultValue = new RepositoryRulesetRulesRequiredStatusChecks(); + _resultValue.doNotEnforceOnCreate = doNotEnforceOnCreate; _resultValue.requiredChecks = requiredChecks; _resultValue.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; return _resultValue; diff --git a/sdk/nodejs/getRepositoryCustomProperties.ts b/sdk/nodejs/getRepositoryCustomProperties.ts new file mode 100644 index 00000000..c7223c9e --- /dev/null +++ b/sdk/nodejs/getRepositoryCustomProperties.ts @@ -0,0 +1,83 @@ +// *** 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"; + +/** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRepositoryCustomProperties({ + * repository: "example-repository", + * }); + * ``` + */ +export function getRepositoryCustomProperties(args: GetRepositoryCustomPropertiesArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", { + "repository": args.repository, + }, opts); +} + +/** + * A collection of arguments for invoking getRepositoryCustomProperties. + */ +export interface GetRepositoryCustomPropertiesArgs { + /** + * Name of the repository to retrieve the custom properties from. + */ + repository: string; +} + +/** + * A collection of values returned by getRepositoryCustomProperties. + */ +export interface GetRepositoryCustomPropertiesResult { + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * The list of this repository's custom properties. Each element of `property` has the following attributes: + */ + readonly properties: outputs.GetRepositoryCustomPropertiesProperty[]; + readonly repository: string; +} +/** + * Use this data source to retrieve all custom properties of a repository. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRepositoryCustomProperties({ + * repository: "example-repository", + * }); + * ``` + */ +export function getRepositoryCustomPropertiesOutput(args: GetRepositoryCustomPropertiesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("github:index/getRepositoryCustomProperties:getRepositoryCustomProperties", { + "repository": args.repository, + }, opts); +} + +/** + * A collection of arguments for invoking getRepositoryCustomProperties. + */ +export interface GetRepositoryCustomPropertiesOutputArgs { + /** + * Name of the repository to retrieve the custom properties from. + */ + repository: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index dc4cf525..cab7c413 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -380,6 +380,11 @@ export const getRepositoryBranches: typeof import("./getRepositoryBranches").get export const getRepositoryBranchesOutput: typeof import("./getRepositoryBranches").getRepositoryBranchesOutput = null as any; utilities.lazyLoad(exports, ["getRepositoryBranches","getRepositoryBranchesOutput"], () => require("./getRepositoryBranches")); +export { GetRepositoryCustomPropertiesArgs, GetRepositoryCustomPropertiesResult, GetRepositoryCustomPropertiesOutputArgs } from "./getRepositoryCustomProperties"; +export const getRepositoryCustomProperties: typeof import("./getRepositoryCustomProperties").getRepositoryCustomProperties = null as any; +export const getRepositoryCustomPropertiesOutput: typeof import("./getRepositoryCustomProperties").getRepositoryCustomPropertiesOutput = null as any; +utilities.lazyLoad(exports, ["getRepositoryCustomProperties","getRepositoryCustomPropertiesOutput"], () => require("./getRepositoryCustomProperties")); + export { GetRepositoryDeployKeysArgs, GetRepositoryDeployKeysResult, GetRepositoryDeployKeysOutputArgs } from "./getRepositoryDeployKeys"; export const getRepositoryDeployKeys: typeof import("./getRepositoryDeployKeys").getRepositoryDeployKeys = null as any; export const getRepositoryDeployKeysOutput: typeof import("./getRepositoryDeployKeys").getRepositoryDeployKeysOutput = null as any; @@ -555,6 +560,11 @@ export type RepositoryCollaborators = import("./repositoryCollaborators").Reposi export const RepositoryCollaborators: typeof import("./repositoryCollaborators").RepositoryCollaborators = null as any; utilities.lazyLoad(exports, ["RepositoryCollaborators"], () => require("./repositoryCollaborators")); +export { RepositoryCustomPropertyArgs, RepositoryCustomPropertyState } from "./repositoryCustomProperty"; +export type RepositoryCustomProperty = import("./repositoryCustomProperty").RepositoryCustomProperty; +export const RepositoryCustomProperty: typeof import("./repositoryCustomProperty").RepositoryCustomProperty = null as any; +utilities.lazyLoad(exports, ["RepositoryCustomProperty"], () => require("./repositoryCustomProperty")); + export { RepositoryDependabotSecurityUpdatesArgs, RepositoryDependabotSecurityUpdatesState } from "./repositoryDependabotSecurityUpdates"; export type RepositoryDependabotSecurityUpdates = import("./repositoryDependabotSecurityUpdates").RepositoryDependabotSecurityUpdates; export const RepositoryDependabotSecurityUpdates: typeof import("./repositoryDependabotSecurityUpdates").RepositoryDependabotSecurityUpdates = null as any; @@ -770,6 +780,8 @@ const _module = { return new RepositoryCollaborator(name, undefined, { urn }) case "github:index/repositoryCollaborators:RepositoryCollaborators": return new RepositoryCollaborators(name, undefined, { urn }) + case "github:index/repositoryCustomProperty:RepositoryCustomProperty": + return new RepositoryCustomProperty(name, undefined, { urn }) case "github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates": return new RepositoryDependabotSecurityUpdates(name, undefined, { urn }) case "github:index/repositoryDeployKey:RepositoryDeployKey": @@ -865,6 +877,7 @@ pulumi.runtime.registerResourceModule("github", "index/repository", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryAutolinkReference", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryCollaborator", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryCollaborators", _module) +pulumi.runtime.registerResourceModule("github", "index/repositoryCustomProperty", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryDependabotSecurityUpdates", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryDeployKey", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryDeploymentBranchPolicy", _module) diff --git a/sdk/nodejs/repositoryCollaborators.ts b/sdk/nodejs/repositoryCollaborators.ts index 105e44e1..42db34ef 100644 --- a/sdk/nodejs/repositoryCollaborators.ts +++ b/sdk/nodejs/repositoryCollaborators.ts @@ -94,20 +94,24 @@ export class RepositoryCollaborators extends pulumi.CustomResource { } /** - * Map of usernames to invitation ID for any users added as part of creation of this resource to + * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + */ + public readonly ignoreTeams!: pulumi.Output; + /** + * Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. */ public /*out*/ readonly invitationIds!: pulumi.Output<{[key: string]: string}>; /** - * The GitHub repository + * The GitHub repository. */ public readonly repository!: pulumi.Output; /** - * List of teams + * List of teams to grant access to the repository. */ public readonly teams!: pulumi.Output; /** - * List of users + * List of users to grant access to the repository. */ public readonly users!: pulumi.Output; @@ -124,6 +128,7 @@ export class RepositoryCollaborators extends pulumi.CustomResource { opts = opts || {}; if (opts.id) { const state = argsOrState as RepositoryCollaboratorsState | undefined; + resourceInputs["ignoreTeams"] = state ? state.ignoreTeams : undefined; resourceInputs["invitationIds"] = state ? state.invitationIds : undefined; resourceInputs["repository"] = state ? state.repository : undefined; resourceInputs["teams"] = state ? state.teams : undefined; @@ -133,6 +138,7 @@ export class RepositoryCollaborators extends pulumi.CustomResource { if ((!args || args.repository === undefined) && !opts.urn) { throw new Error("Missing required property 'repository'"); } + resourceInputs["ignoreTeams"] = args ? args.ignoreTeams : undefined; resourceInputs["repository"] = args ? args.repository : undefined; resourceInputs["teams"] = args ? args.teams : undefined; resourceInputs["users"] = args ? args.users : undefined; @@ -148,20 +154,24 @@ export class RepositoryCollaborators extends pulumi.CustomResource { */ export interface RepositoryCollaboratorsState { /** - * Map of usernames to invitation ID for any users added as part of creation of this resource to + * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + */ + ignoreTeams?: pulumi.Input[]>; + /** + * Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. */ invitationIds?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The GitHub repository + * The GitHub repository. */ repository?: pulumi.Input; /** - * List of teams + * List of teams to grant access to the repository. */ teams?: pulumi.Input[]>; /** - * List of users + * List of users to grant access to the repository. */ users?: pulumi.Input[]>; } @@ -171,15 +181,19 @@ export interface RepositoryCollaboratorsState { */ export interface RepositoryCollaboratorsArgs { /** - * The GitHub repository + * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + */ + ignoreTeams?: pulumi.Input[]>; + /** + * The GitHub repository. */ repository: pulumi.Input; /** - * List of teams + * List of teams to grant access to the repository. */ teams?: pulumi.Input[]>; /** - * List of users + * List of users to grant access to the repository. */ users?: pulumi.Input[]>; } diff --git a/sdk/nodejs/repositoryCustomProperty.ts b/sdk/nodejs/repositoryCustomProperty.ts new file mode 100644 index 00000000..9266f7ba --- /dev/null +++ b/sdk/nodejs/repositoryCustomProperty.ts @@ -0,0 +1,166 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * This resource allows you to create and manage a specific custom property for a GitHub repository. + * + * ## Example Usage + * + * > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = new github.Repository("example", { + * name: "example", + * description: "My awesome codebase", + * }); + * const string = new github.RepositoryCustomProperty("string", { + * repository: example.name, + * propertyName: "my-cool-property", + * propertyType: "string", + * propertyValues: ["test"], + * }); + * ``` + * + * ## Import + * + * GitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g. + * + * ```sh + * $ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example :: + * ``` + */ +export class RepositoryCustomProperty extends pulumi.CustomResource { + /** + * Get an existing RepositoryCustomProperty 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?: RepositoryCustomPropertyState, opts?: pulumi.CustomResourceOptions): RepositoryCustomProperty { + return new RepositoryCustomProperty(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'github:index/repositoryCustomProperty:RepositoryCustomProperty'; + + /** + * Returns true if the given object is an instance of RepositoryCustomProperty. 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 RepositoryCustomProperty { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === RepositoryCustomProperty.__pulumiType; + } + + /** + * Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + */ + public readonly propertyName!: pulumi.Output; + /** + * Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + */ + public readonly propertyType!: pulumi.Output; + /** + * Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + */ + public readonly propertyValues!: pulumi.Output; + /** + * The repository of the environment. + */ + public readonly repository!: pulumi.Output; + + /** + * Create a RepositoryCustomProperty 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: RepositoryCustomPropertyArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: RepositoryCustomPropertyArgs | RepositoryCustomPropertyState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as RepositoryCustomPropertyState | undefined; + resourceInputs["propertyName"] = state ? state.propertyName : undefined; + resourceInputs["propertyType"] = state ? state.propertyType : undefined; + resourceInputs["propertyValues"] = state ? state.propertyValues : undefined; + resourceInputs["repository"] = state ? state.repository : undefined; + } else { + const args = argsOrState as RepositoryCustomPropertyArgs | undefined; + if ((!args || args.propertyName === undefined) && !opts.urn) { + throw new Error("Missing required property 'propertyName'"); + } + if ((!args || args.propertyType === undefined) && !opts.urn) { + throw new Error("Missing required property 'propertyType'"); + } + if ((!args || args.propertyValues === undefined) && !opts.urn) { + throw new Error("Missing required property 'propertyValues'"); + } + if ((!args || args.repository === undefined) && !opts.urn) { + throw new Error("Missing required property 'repository'"); + } + resourceInputs["propertyName"] = args ? args.propertyName : undefined; + resourceInputs["propertyType"] = args ? args.propertyType : undefined; + resourceInputs["propertyValues"] = args ? args.propertyValues : undefined; + resourceInputs["repository"] = args ? args.repository : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(RepositoryCustomProperty.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering RepositoryCustomProperty resources. + */ +export interface RepositoryCustomPropertyState { + /** + * Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + */ + propertyName?: pulumi.Input; + /** + * Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + */ + propertyType?: pulumi.Input; + /** + * Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + */ + propertyValues?: pulumi.Input[]>; + /** + * The repository of the environment. + */ + repository?: pulumi.Input; +} + +/** + * The set of arguments for constructing a RepositoryCustomProperty resource. + */ +export interface RepositoryCustomPropertyArgs { + /** + * Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + */ + propertyName: pulumi.Input; + /** + * Type of the custom property. Can be one of `singleSelect`, `multiSelect`, `string`, or `trueFalse` + */ + propertyType: pulumi.Input; + /** + * Value of the custom property in the form of an array. Properties of type `singleSelect`, `string`, and `trueFalse` are represented as a string array of length 1 + */ + propertyValues: pulumi.Input[]>; + /** + * The repository of the environment. + */ + repository: pulumi.Input; +} diff --git a/sdk/nodejs/repositoryDependabotSecurityUpdates.ts b/sdk/nodejs/repositoryDependabotSecurityUpdates.ts index 7582596b..96a6215f 100644 --- a/sdk/nodejs/repositoryDependabotSecurityUpdates.ts +++ b/sdk/nodejs/repositoryDependabotSecurityUpdates.ts @@ -22,7 +22,7 @@ import * as utilities from "./utilities"; * vulnerabilityAlerts: true, * }); * const example = new github.RepositoryDependabotSecurityUpdates("example", { - * repository: test.id, + * repository: test.name, * enabled: true, * }); * ``` @@ -68,7 +68,7 @@ export class RepositoryDependabotSecurityUpdates extends pulumi.CustomResource { */ public readonly enabled!: pulumi.Output; /** - * The repository to manage. + * The name of the GitHub repository. */ public readonly repository!: pulumi.Output; @@ -112,7 +112,7 @@ export interface RepositoryDependabotSecurityUpdatesState { */ enabled?: pulumi.Input; /** - * The repository to manage. + * The name of the GitHub repository. */ repository?: pulumi.Input; } @@ -126,7 +126,7 @@ export interface RepositoryDependabotSecurityUpdatesArgs { */ enabled: pulumi.Input; /** - * The repository to manage. + * The name of the GitHub repository. */ repository: pulumi.Input; } diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 6a5a450b..3f285376 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -90,6 +90,7 @@ "getRepository.ts", "getRepositoryAutolinkReferences.ts", "getRepositoryBranches.ts", + "getRepositoryCustomProperties.ts", "getRepositoryDeployKeys.ts", "getRepositoryDeploymentBranchPolicies.ts", "getRepositoryEnvironments.ts", @@ -126,6 +127,7 @@ "repositoryAutolinkReference.ts", "repositoryCollaborator.ts", "repositoryCollaborators.ts", + "repositoryCustomProperty.ts", "repositoryDependabotSecurityUpdates.ts", "repositoryDeployKey.ts", "repositoryDeploymentBranchPolicy.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index cf100654..cf5de884 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -585,6 +585,13 @@ export interface ProviderAppAuth { pemFile: pulumi.Input; } +export interface RepositoryCollaboratorsIgnoreTeam { + /** + * ID or slug of the team to ignore. + */ + teamId: pulumi.Input; +} + export interface RepositoryCollaboratorsTeam { /** * The permission of the outside collaborators for the repository. @@ -593,7 +600,7 @@ export interface RepositoryCollaboratorsTeam { */ permission?: pulumi.Input; /** - * The GitHub team id or the GitHub team slug + * The GitHub team id or the GitHub team slug. */ teamId: pulumi.Input; } @@ -674,7 +681,7 @@ export interface RepositoryPagesSource { export interface RepositoryRulesetBypassActor { /** - * (Number) The ID of the actor that can bypass a ruleset. + * (Number) The ID of the actor that can bypass a ruleset. If `actorType` is `Integration`, `actorId` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) */ actorId: pulumi.Input; /** @@ -905,6 +912,10 @@ export interface RepositoryRulesetRulesRequiredDeployments { } export interface RepositoryRulesetRulesRequiredStatusChecks { + /** + * Allow repositories and branches to be created if a check would otherwise prohibit it. + */ + doNotEnforceOnCreate?: pulumi.Input; /** * Status checks that are required. Several can be defined. */ diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index feb6d713..6f817500 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -717,6 +717,17 @@ export interface GetRepositoryBranchesBranch { protected: boolean; } +export interface GetRepositoryCustomPropertiesProperty { + /** + * Name of the property + */ + propertyName: string; + /** + * Value of the property + */ + propertyValues: string[]; +} + export interface GetRepositoryDeployKeysKey { /** * Key id @@ -1355,6 +1366,13 @@ export interface OrganizationWebhookConfiguration { url: string; } +export interface RepositoryCollaboratorsIgnoreTeam { + /** + * ID or slug of the team to ignore. + */ + teamId: string; +} + export interface RepositoryCollaboratorsTeam { /** * The permission of the outside collaborators for the repository. @@ -1363,7 +1381,7 @@ export interface RepositoryCollaboratorsTeam { */ permission?: string; /** - * The GitHub team id or the GitHub team slug + * The GitHub team id or the GitHub team slug. */ teamId: string; } @@ -1444,7 +1462,7 @@ export interface RepositoryPagesSource { export interface RepositoryRulesetBypassActor { /** - * (Number) The ID of the actor that can bypass a ruleset. + * (Number) The ID of the actor that can bypass a ruleset. If `actorType` is `Integration`, `actorId` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) */ actorId: number; /** @@ -1675,6 +1693,10 @@ export interface RepositoryRulesetRulesRequiredDeployments { } export interface RepositoryRulesetRulesRequiredStatusChecks { + /** + * Allow repositories and branches to be created if a check would otherwise prohibit it. + */ + doNotEnforceOnCreate?: boolean; /** * Status checks that are required. Several can be defined. */ diff --git a/sdk/python/pulumi_github/__init__.py b/sdk/python/pulumi_github/__init__.py index 74549b2e..bfc83061 100644 --- a/sdk/python/pulumi_github/__init__.py +++ b/sdk/python/pulumi_github/__init__.py @@ -80,6 +80,7 @@ from .get_repository import * from .get_repository_autolink_references import * from .get_repository_branches import * +from .get_repository_custom_properties import * from .get_repository_deploy_keys import * from .get_repository_deployment_branch_policies import * from .get_repository_environments import * @@ -115,6 +116,7 @@ from .repository_autolink_reference import * from .repository_collaborator import * from .repository_collaborators import * +from .repository_custom_property import * from .repository_dependabot_security_updates import * from .repository_deploy_key import * from .repository_deployment_branch_policy import * @@ -533,6 +535,14 @@ "github:index/repositoryCollaborators:RepositoryCollaborators": "RepositoryCollaborators" } }, + { + "pkg": "github", + "mod": "index/repositoryCustomProperty", + "fqn": "pulumi_github", + "classes": { + "github:index/repositoryCustomProperty:RepositoryCustomProperty": "RepositoryCustomProperty" + } + }, { "pkg": "github", "mod": "index/repositoryDependabotSecurityUpdates", diff --git a/sdk/python/pulumi_github/_inputs.py b/sdk/python/pulumi_github/_inputs.py index c825adc1..8e3fdb42 100644 --- a/sdk/python/pulumi_github/_inputs.py +++ b/sdk/python/pulumi_github/_inputs.py @@ -79,6 +79,8 @@ 'OrganizationWebhookConfigurationArgsDict', 'ProviderAppAuthArgs', 'ProviderAppAuthArgsDict', + 'RepositoryCollaboratorsIgnoreTeamArgs', + 'RepositoryCollaboratorsIgnoreTeamArgsDict', 'RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict', 'RepositoryCollaboratorsUserArgs', @@ -2853,11 +2855,42 @@ def pem_file(self, value: pulumi.Input[str]): pulumi.set(self, "pem_file", value) +if not MYPY: + class RepositoryCollaboratorsIgnoreTeamArgsDict(TypedDict): + team_id: pulumi.Input[str] + """ + ID or slug of the team to ignore. + """ +elif False: + RepositoryCollaboratorsIgnoreTeamArgsDict: TypeAlias = Mapping[str, Any] + +@pulumi.input_type +class RepositoryCollaboratorsIgnoreTeamArgs: + def __init__(__self__, *, + team_id: pulumi.Input[str]): + """ + :param pulumi.Input[str] team_id: ID or slug of the team to ignore. + """ + pulumi.set(__self__, "team_id", team_id) + + @property + @pulumi.getter(name="teamId") + def team_id(self) -> pulumi.Input[str]: + """ + ID or slug of the team to ignore. + """ + return pulumi.get(self, "team_id") + + @team_id.setter + def team_id(self, value: pulumi.Input[str]): + pulumi.set(self, "team_id", value) + + if not MYPY: class RepositoryCollaboratorsTeamArgsDict(TypedDict): team_id: pulumi.Input[str] """ - The GitHub team id or the GitHub team slug + The GitHub team id or the GitHub team slug. """ permission: NotRequired[pulumi.Input[str]] """ @@ -2874,7 +2907,7 @@ def __init__(__self__, *, team_id: pulumi.Input[str], permission: Optional[pulumi.Input[str]] = None): """ - :param pulumi.Input[str] team_id: The GitHub team id or the GitHub team slug + :param pulumi.Input[str] team_id: The GitHub team id or the GitHub team slug. :param pulumi.Input[str] permission: The permission of the outside collaborators for the repository. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. Must be `push` for personal repositories. Defaults to `push`. @@ -2887,7 +2920,7 @@ def __init__(__self__, *, @pulumi.getter(name="teamId") def team_id(self) -> pulumi.Input[str]: """ - The GitHub team id or the GitHub team slug + The GitHub team id or the GitHub team slug. """ return pulumi.get(self, "team_id") @@ -3269,7 +3302,7 @@ def path(self, value: Optional[pulumi.Input[str]]): class RepositoryRulesetBypassActorArgsDict(TypedDict): actor_id: pulumi.Input[int] """ - (Number) The ID of the actor that can bypass a ruleset. + (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) """ actor_type: pulumi.Input[str] """ @@ -3293,7 +3326,7 @@ def __init__(__self__, *, actor_type: pulumi.Input[str], bypass_mode: pulumi.Input[str]): """ - :param pulumi.Input[int] actor_id: (Number) The ID of the actor that can bypass a ruleset. + :param pulumi.Input[int] actor_id: (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) :param pulumi.Input[str] actor_type: The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. :param pulumi.Input[str] bypass_mode: (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. @@ -3309,7 +3342,7 @@ def __init__(__self__, *, @pulumi.getter(name="actorId") def actor_id(self) -> pulumi.Input[int]: """ - (Number) The ID of the actor that can bypass a ruleset. + (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) """ return pulumi.get(self, "actor_id") @@ -4368,6 +4401,10 @@ class RepositoryRulesetRulesRequiredStatusChecksArgsDict(TypedDict): """ Status checks that are required. Several can be defined. """ + do_not_enforce_on_create: NotRequired[pulumi.Input[bool]] + """ + Allow repositories and branches to be created if a check would otherwise prohibit it. + """ strict_required_status_checks_policy: NotRequired[pulumi.Input[bool]] """ Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. @@ -4379,12 +4416,16 @@ class RepositoryRulesetRulesRequiredStatusChecksArgsDict(TypedDict): class RepositoryRulesetRulesRequiredStatusChecksArgs: def __init__(__self__, *, required_checks: pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]], + do_not_enforce_on_create: Optional[pulumi.Input[bool]] = None, strict_required_status_checks_policy: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]] required_checks: Status checks that are required. Several can be defined. + :param pulumi.Input[bool] do_not_enforce_on_create: Allow repositories and branches to be created if a check would otherwise prohibit it. :param pulumi.Input[bool] strict_required_status_checks_policy: Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. """ pulumi.set(__self__, "required_checks", required_checks) + if do_not_enforce_on_create is not None: + pulumi.set(__self__, "do_not_enforce_on_create", do_not_enforce_on_create) if strict_required_status_checks_policy is not None: pulumi.set(__self__, "strict_required_status_checks_policy", strict_required_status_checks_policy) @@ -4400,6 +4441,18 @@ def required_checks(self) -> pulumi.Input[Sequence[pulumi.Input['RepositoryRules def required_checks(self, value: pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]]): pulumi.set(self, "required_checks", value) + @property + @pulumi.getter(name="doNotEnforceOnCreate") + def do_not_enforce_on_create(self) -> Optional[pulumi.Input[bool]]: + """ + Allow repositories and branches to be created if a check would otherwise prohibit it. + """ + return pulumi.get(self, "do_not_enforce_on_create") + + @do_not_enforce_on_create.setter + def do_not_enforce_on_create(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "do_not_enforce_on_create", value) + @property @pulumi.getter(name="strictRequiredStatusChecksPolicy") def strict_required_status_checks_policy(self) -> Optional[pulumi.Input[bool]]: diff --git a/sdk/python/pulumi_github/get_repository_custom_properties.py b/sdk/python/pulumi_github/get_repository_custom_properties.py new file mode 100644 index 00000000..92e9ce80 --- /dev/null +++ b/sdk/python/pulumi_github/get_repository_custom_properties.py @@ -0,0 +1,124 @@ +# 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__ = [ + 'GetRepositoryCustomPropertiesResult', + 'AwaitableGetRepositoryCustomPropertiesResult', + 'get_repository_custom_properties', + 'get_repository_custom_properties_output', +] + +@pulumi.output_type +class GetRepositoryCustomPropertiesResult: + """ + A collection of values returned by getRepositoryCustomProperties. + """ + def __init__(__self__, id=None, properties=None, repository=None): + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if properties and not isinstance(properties, list): + raise TypeError("Expected argument 'properties' to be a list") + pulumi.set(__self__, "properties", properties) + if repository and not isinstance(repository, str): + raise TypeError("Expected argument 'repository' to be a str") + pulumi.set(__self__, "repository", repository) + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def properties(self) -> Sequence['outputs.GetRepositoryCustomPropertiesPropertyResult']: + """ + The list of this repository's custom properties. Each element of `property` has the following attributes: + """ + return pulumi.get(self, "properties") + + @property + @pulumi.getter + def repository(self) -> str: + return pulumi.get(self, "repository") + + +class AwaitableGetRepositoryCustomPropertiesResult(GetRepositoryCustomPropertiesResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRepositoryCustomPropertiesResult( + id=self.id, + properties=self.properties, + repository=self.repository) + + +def get_repository_custom_properties(repository: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRepositoryCustomPropertiesResult: + """ + Use this data source to retrieve all custom properties of a repository. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_repository_custom_properties(repository="example-repository") + ``` + + + :param str repository: Name of the repository to retrieve the custom properties from. + """ + __args__ = dict() + __args__['repository'] = repository + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('github:index/getRepositoryCustomProperties:getRepositoryCustomProperties', __args__, opts=opts, typ=GetRepositoryCustomPropertiesResult).value + + return AwaitableGetRepositoryCustomPropertiesResult( + id=pulumi.get(__ret__, 'id'), + properties=pulumi.get(__ret__, 'properties'), + repository=pulumi.get(__ret__, 'repository')) +def get_repository_custom_properties_output(repository: Optional[pulumi.Input[str]] = None, + opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRepositoryCustomPropertiesResult]: + """ + Use this data source to retrieve all custom properties of a repository. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_repository_custom_properties(repository="example-repository") + ``` + + + :param str repository: Name of the repository to retrieve the custom properties from. + """ + __args__ = dict() + __args__['repository'] = repository + opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('github:index/getRepositoryCustomProperties:getRepositoryCustomProperties', __args__, opts=opts, typ=GetRepositoryCustomPropertiesResult) + return __ret__.apply(lambda __response__: GetRepositoryCustomPropertiesResult( + id=pulumi.get(__response__, 'id'), + properties=pulumi.get(__response__, 'properties'), + repository=pulumi.get(__response__, 'repository'))) diff --git a/sdk/python/pulumi_github/outputs.py b/sdk/python/pulumi_github/outputs.py index 0347ed19..70fe7b9d 100644 --- a/sdk/python/pulumi_github/outputs.py +++ b/sdk/python/pulumi_github/outputs.py @@ -47,6 +47,7 @@ 'OrganizationRulesetRulesRequiredWorkflowsRequiredWorkflow', 'OrganizationRulesetRulesTagNamePattern', 'OrganizationWebhookConfiguration', + 'RepositoryCollaboratorsIgnoreTeam', 'RepositoryCollaboratorsTeam', 'RepositoryCollaboratorsUser', 'RepositoryEnvironmentDeploymentBranchPolicy', @@ -100,6 +101,7 @@ 'GetReleaseAssetResult', 'GetRepositoryAutolinkReferencesAutolinkReferenceResult', 'GetRepositoryBranchesBranchResult', + 'GetRepositoryCustomPropertiesPropertyResult', 'GetRepositoryDeployKeysKeyResult', 'GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyResult', 'GetRepositoryEnvironmentsEnvironmentResult', @@ -2106,6 +2108,41 @@ def secret(self) -> Optional[str]: return pulumi.get(self, "secret") +@pulumi.output_type +class RepositoryCollaboratorsIgnoreTeam(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "teamId": + suggest = "team_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryCollaboratorsIgnoreTeam. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryCollaboratorsIgnoreTeam.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryCollaboratorsIgnoreTeam.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + team_id: str): + """ + :param str team_id: ID or slug of the team to ignore. + """ + pulumi.set(__self__, "team_id", team_id) + + @property + @pulumi.getter(name="teamId") + def team_id(self) -> str: + """ + ID or slug of the team to ignore. + """ + return pulumi.get(self, "team_id") + + @pulumi.output_type class RepositoryCollaboratorsTeam(dict): @staticmethod @@ -2129,7 +2166,7 @@ def __init__(__self__, *, team_id: str, permission: Optional[str] = None): """ - :param str team_id: The GitHub team id or the GitHub team slug + :param str team_id: The GitHub team id or the GitHub team slug. :param str permission: The permission of the outside collaborators for the repository. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. Must be `push` for personal repositories. Defaults to `push`. @@ -2142,7 +2179,7 @@ def __init__(__self__, *, @pulumi.getter(name="teamId") def team_id(self) -> str: """ - The GitHub team id or the GitHub team slug + The GitHub team id or the GitHub team slug. """ return pulumi.get(self, "team_id") @@ -2434,7 +2471,7 @@ def __init__(__self__, *, actor_type: str, bypass_mode: str): """ - :param int actor_id: (Number) The ID of the actor that can bypass a ruleset. + :param int actor_id: (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) :param str actor_type: The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. :param str bypass_mode: (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. @@ -2450,7 +2487,7 @@ def __init__(__self__, *, @pulumi.getter(name="actorId") def actor_id(self) -> int: """ - (Number) The ID of the actor that can bypass a ruleset. + (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app) """ return pulumi.get(self, "actor_id") @@ -3219,6 +3256,8 @@ def __key_warning(key: str): suggest = None if key == "requiredChecks": suggest = "required_checks" + elif key == "doNotEnforceOnCreate": + suggest = "do_not_enforce_on_create" elif key == "strictRequiredStatusChecksPolicy": suggest = "strict_required_status_checks_policy" @@ -3235,12 +3274,16 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, required_checks: Sequence['outputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheck'], + do_not_enforce_on_create: Optional[bool] = None, strict_required_status_checks_policy: Optional[bool] = None): """ :param Sequence['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs'] required_checks: Status checks that are required. Several can be defined. + :param bool do_not_enforce_on_create: Allow repositories and branches to be created if a check would otherwise prohibit it. :param bool strict_required_status_checks_policy: Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. """ pulumi.set(__self__, "required_checks", required_checks) + if do_not_enforce_on_create is not None: + pulumi.set(__self__, "do_not_enforce_on_create", do_not_enforce_on_create) if strict_required_status_checks_policy is not None: pulumi.set(__self__, "strict_required_status_checks_policy", strict_required_status_checks_policy) @@ -3252,6 +3295,14 @@ def required_checks(self) -> Sequence['outputs.RepositoryRulesetRulesRequiredSta """ return pulumi.get(self, "required_checks") + @property + @pulumi.getter(name="doNotEnforceOnCreate") + def do_not_enforce_on_create(self) -> Optional[bool]: + """ + Allow repositories and branches to be created if a check would otherwise prohibit it. + """ + return pulumi.get(self, "do_not_enforce_on_create") + @property @pulumi.getter(name="strictRequiredStatusChecksPolicy") def strict_required_status_checks_policy(self) -> Optional[bool]: @@ -5094,6 +5145,35 @@ def protected(self) -> bool: return pulumi.get(self, "protected") +@pulumi.output_type +class GetRepositoryCustomPropertiesPropertyResult(dict): + def __init__(__self__, *, + property_name: str, + property_values: Sequence[str]): + """ + :param str property_name: Name of the property + :param Sequence[str] property_values: Value of the property + """ + pulumi.set(__self__, "property_name", property_name) + pulumi.set(__self__, "property_values", property_values) + + @property + @pulumi.getter(name="propertyName") + def property_name(self) -> str: + """ + Name of the property + """ + return pulumi.get(self, "property_name") + + @property + @pulumi.getter(name="propertyValues") + def property_values(self) -> Sequence[str]: + """ + Value of the property + """ + return pulumi.get(self, "property_values") + + @pulumi.output_type class GetRepositoryDeployKeysKeyResult(dict): def __init__(__self__, *, diff --git a/sdk/python/pulumi_github/repository_collaborators.py b/sdk/python/pulumi_github/repository_collaborators.py index afe75728..511ce805 100644 --- a/sdk/python/pulumi_github/repository_collaborators.py +++ b/sdk/python/pulumi_github/repository_collaborators.py @@ -22,15 +22,19 @@ class RepositoryCollaboratorsArgs: def __init__(__self__, *, repository: pulumi.Input[str], + ignore_teams: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]]] = None, teams: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]]] = None, users: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]]] = None): """ The set of arguments for constructing a RepositoryCollaborators resource. - :param pulumi.Input[str] repository: The GitHub repository - :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]] teams: List of teams - :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]] users: List of users + :param pulumi.Input[str] repository: The GitHub repository. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]] ignore_teams: List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]] teams: List of teams to grant access to the repository. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]] users: List of users to grant access to the repository. """ pulumi.set(__self__, "repository", repository) + if ignore_teams is not None: + pulumi.set(__self__, "ignore_teams", ignore_teams) if teams is not None: pulumi.set(__self__, "teams", teams) if users is not None: @@ -40,7 +44,7 @@ def __init__(__self__, *, @pulumi.getter def repository(self) -> pulumi.Input[str]: """ - The GitHub repository + The GitHub repository. """ return pulumi.get(self, "repository") @@ -48,11 +52,23 @@ def repository(self) -> pulumi.Input[str]: def repository(self, value: pulumi.Input[str]): pulumi.set(self, "repository", value) + @property + @pulumi.getter(name="ignoreTeams") + def ignore_teams(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]]]: + """ + List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + """ + return pulumi.get(self, "ignore_teams") + + @ignore_teams.setter + def ignore_teams(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]]]): + pulumi.set(self, "ignore_teams", value) + @property @pulumi.getter def teams(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]]]: """ - List of teams + List of teams to grant access to the repository. """ return pulumi.get(self, "teams") @@ -64,7 +80,7 @@ def teams(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCo @pulumi.getter def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]]]: """ - List of users + List of users to grant access to the repository. """ return pulumi.get(self, "users") @@ -76,18 +92,22 @@ def users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCo @pulumi.input_type class _RepositoryCollaboratorsState: def __init__(__self__, *, + ignore_teams: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]]] = None, invitation_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, repository: Optional[pulumi.Input[str]] = None, teams: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]]] = None, users: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]]] = None): """ Input properties used for looking up and filtering RepositoryCollaborators resources. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] invitation_ids: Map of usernames to invitation ID for any users added as part of creation of this resource to + :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]] ignore_teams: List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] invitation_ids: Map of usernames to invitation ID for any users added as part of creation of this resource to be used in `UserInvitationAccepter`. - :param pulumi.Input[str] repository: The GitHub repository - :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]] teams: List of teams - :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]] users: List of users + :param pulumi.Input[str] repository: The GitHub repository. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]] teams: List of teams to grant access to the repository. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]] users: List of users to grant access to the repository. """ + if ignore_teams is not None: + pulumi.set(__self__, "ignore_teams", ignore_teams) if invitation_ids is not None: pulumi.set(__self__, "invitation_ids", invitation_ids) if repository is not None: @@ -97,11 +117,23 @@ def __init__(__self__, *, if users is not None: pulumi.set(__self__, "users", users) + @property + @pulumi.getter(name="ignoreTeams") + def ignore_teams(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]]]: + """ + List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + """ + return pulumi.get(self, "ignore_teams") + + @ignore_teams.setter + def ignore_teams(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsIgnoreTeamArgs']]]]): + pulumi.set(self, "ignore_teams", value) + @property @pulumi.getter(name="invitationIds") def invitation_ids(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Map of usernames to invitation ID for any users added as part of creation of this resource to + Map of usernames to invitation ID for any users added as part of creation of this resource to be used in `UserInvitationAccepter`. """ return pulumi.get(self, "invitation_ids") @@ -114,7 +146,7 @@ def invitation_ids(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[ @pulumi.getter def repository(self) -> Optional[pulumi.Input[str]]: """ - The GitHub repository + The GitHub repository. """ return pulumi.get(self, "repository") @@ -126,7 +158,7 @@ def repository(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def teams(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsTeamArgs']]]]: """ - List of teams + List of teams to grant access to the repository. """ return pulumi.get(self, "teams") @@ -138,7 +170,7 @@ def teams(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCo @pulumi.getter def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryCollaboratorsUserArgs']]]]: """ - List of users + List of users to grant access to the repository. """ return pulumi.get(self, "users") @@ -152,6 +184,7 @@ class RepositoryCollaborators(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + ignore_teams: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsIgnoreTeamArgs', 'RepositoryCollaboratorsIgnoreTeamArgsDict']]]]] = None, repository: Optional[pulumi.Input[str]] = None, teams: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]]] = None, users: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsUserArgs', 'RepositoryCollaboratorsUserArgsDict']]]]] = None, @@ -215,9 +248,10 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] repository: The GitHub repository - :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]] teams: List of teams - :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsUserArgs', 'RepositoryCollaboratorsUserArgsDict']]]] users: List of users + :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsIgnoreTeamArgs', 'RepositoryCollaboratorsIgnoreTeamArgsDict']]]] ignore_teams: List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + :param pulumi.Input[str] repository: The GitHub repository. + :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]] teams: List of teams to grant access to the repository. + :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsUserArgs', 'RepositoryCollaboratorsUserArgsDict']]]] users: List of users to grant access to the repository. """ ... @overload @@ -297,6 +331,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + ignore_teams: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsIgnoreTeamArgs', 'RepositoryCollaboratorsIgnoreTeamArgsDict']]]]] = None, repository: Optional[pulumi.Input[str]] = None, teams: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]]] = None, users: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsUserArgs', 'RepositoryCollaboratorsUserArgsDict']]]]] = None, @@ -309,6 +344,7 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = RepositoryCollaboratorsArgs.__new__(RepositoryCollaboratorsArgs) + __props__.__dict__["ignore_teams"] = ignore_teams if repository is None and not opts.urn: raise TypeError("Missing required property 'repository'") __props__.__dict__["repository"] = repository @@ -325,6 +361,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, + ignore_teams: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsIgnoreTeamArgs', 'RepositoryCollaboratorsIgnoreTeamArgsDict']]]]] = None, invitation_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, repository: Optional[pulumi.Input[str]] = None, teams: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]]] = None, @@ -336,27 +373,37 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] invitation_ids: Map of usernames to invitation ID for any users added as part of creation of this resource to + :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsIgnoreTeamArgs', 'RepositoryCollaboratorsIgnoreTeamArgsDict']]]] ignore_teams: List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] invitation_ids: Map of usernames to invitation ID for any users added as part of creation of this resource to be used in `UserInvitationAccepter`. - :param pulumi.Input[str] repository: The GitHub repository - :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]] teams: List of teams - :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsUserArgs', 'RepositoryCollaboratorsUserArgsDict']]]] users: List of users + :param pulumi.Input[str] repository: The GitHub repository. + :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsTeamArgs', 'RepositoryCollaboratorsTeamArgsDict']]]] teams: List of teams to grant access to the repository. + :param pulumi.Input[Sequence[pulumi.Input[Union['RepositoryCollaboratorsUserArgs', 'RepositoryCollaboratorsUserArgsDict']]]] users: List of users to grant access to the repository. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _RepositoryCollaboratorsState.__new__(_RepositoryCollaboratorsState) + __props__.__dict__["ignore_teams"] = ignore_teams __props__.__dict__["invitation_ids"] = invitation_ids __props__.__dict__["repository"] = repository __props__.__dict__["teams"] = teams __props__.__dict__["users"] = users return RepositoryCollaborators(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter(name="ignoreTeams") + def ignore_teams(self) -> pulumi.Output[Optional[Sequence['outputs.RepositoryCollaboratorsIgnoreTeam']]]: + """ + List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + """ + return pulumi.get(self, "ignore_teams") + @property @pulumi.getter(name="invitationIds") def invitation_ids(self) -> pulumi.Output[Mapping[str, str]]: """ - Map of usernames to invitation ID for any users added as part of creation of this resource to + Map of usernames to invitation ID for any users added as part of creation of this resource to be used in `UserInvitationAccepter`. """ return pulumi.get(self, "invitation_ids") @@ -365,7 +412,7 @@ def invitation_ids(self) -> pulumi.Output[Mapping[str, str]]: @pulumi.getter def repository(self) -> pulumi.Output[str]: """ - The GitHub repository + The GitHub repository. """ return pulumi.get(self, "repository") @@ -373,7 +420,7 @@ def repository(self) -> pulumi.Output[str]: @pulumi.getter def teams(self) -> pulumi.Output[Optional[Sequence['outputs.RepositoryCollaboratorsTeam']]]: """ - List of teams + List of teams to grant access to the repository. """ return pulumi.get(self, "teams") @@ -381,7 +428,7 @@ def teams(self) -> pulumi.Output[Optional[Sequence['outputs.RepositoryCollaborat @pulumi.getter def users(self) -> pulumi.Output[Optional[Sequence['outputs.RepositoryCollaboratorsUser']]]: """ - List of users + List of users to grant access to the repository. """ return pulumi.get(self, "users") diff --git a/sdk/python/pulumi_github/repository_custom_property.py b/sdk/python/pulumi_github/repository_custom_property.py new file mode 100644 index 00000000..e016c1a6 --- /dev/null +++ b/sdk/python/pulumi_github/repository_custom_property.py @@ -0,0 +1,347 @@ +# 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 + +__all__ = ['RepositoryCustomPropertyArgs', 'RepositoryCustomProperty'] + +@pulumi.input_type +class RepositoryCustomPropertyArgs: + def __init__(__self__, *, + property_name: pulumi.Input[str], + property_type: pulumi.Input[str], + property_values: pulumi.Input[Sequence[pulumi.Input[str]]], + repository: pulumi.Input[str]): + """ + The set of arguments for constructing a RepositoryCustomProperty resource. + :param pulumi.Input[str] property_name: Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + :param pulumi.Input[str] property_type: Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + :param pulumi.Input[Sequence[pulumi.Input[str]]] property_values: Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + :param pulumi.Input[str] repository: The repository of the environment. + """ + pulumi.set(__self__, "property_name", property_name) + pulumi.set(__self__, "property_type", property_type) + pulumi.set(__self__, "property_values", property_values) + pulumi.set(__self__, "repository", repository) + + @property + @pulumi.getter(name="propertyName") + def property_name(self) -> pulumi.Input[str]: + """ + Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + """ + return pulumi.get(self, "property_name") + + @property_name.setter + def property_name(self, value: pulumi.Input[str]): + pulumi.set(self, "property_name", value) + + @property + @pulumi.getter(name="propertyType") + def property_type(self) -> pulumi.Input[str]: + """ + Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + """ + return pulumi.get(self, "property_type") + + @property_type.setter + def property_type(self, value: pulumi.Input[str]): + pulumi.set(self, "property_type", value) + + @property + @pulumi.getter(name="propertyValues") + def property_values(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + """ + return pulumi.get(self, "property_values") + + @property_values.setter + def property_values(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "property_values", value) + + @property + @pulumi.getter + def repository(self) -> pulumi.Input[str]: + """ + The repository of the environment. + """ + return pulumi.get(self, "repository") + + @repository.setter + def repository(self, value: pulumi.Input[str]): + pulumi.set(self, "repository", value) + + +@pulumi.input_type +class _RepositoryCustomPropertyState: + def __init__(__self__, *, + property_name: Optional[pulumi.Input[str]] = None, + property_type: Optional[pulumi.Input[str]] = None, + property_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + repository: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering RepositoryCustomProperty resources. + :param pulumi.Input[str] property_name: Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + :param pulumi.Input[str] property_type: Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + :param pulumi.Input[Sequence[pulumi.Input[str]]] property_values: Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + :param pulumi.Input[str] repository: The repository of the environment. + """ + if property_name is not None: + pulumi.set(__self__, "property_name", property_name) + if property_type is not None: + pulumi.set(__self__, "property_type", property_type) + if property_values is not None: + pulumi.set(__self__, "property_values", property_values) + if repository is not None: + pulumi.set(__self__, "repository", repository) + + @property + @pulumi.getter(name="propertyName") + def property_name(self) -> Optional[pulumi.Input[str]]: + """ + Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + """ + return pulumi.get(self, "property_name") + + @property_name.setter + def property_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "property_name", value) + + @property + @pulumi.getter(name="propertyType") + def property_type(self) -> Optional[pulumi.Input[str]]: + """ + Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + """ + return pulumi.get(self, "property_type") + + @property_type.setter + def property_type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "property_type", value) + + @property + @pulumi.getter(name="propertyValues") + def property_values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + """ + return pulumi.get(self, "property_values") + + @property_values.setter + def property_values(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "property_values", value) + + @property + @pulumi.getter + def repository(self) -> Optional[pulumi.Input[str]]: + """ + The repository of the environment. + """ + return pulumi.get(self, "repository") + + @repository.setter + def repository(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "repository", value) + + +class RepositoryCustomProperty(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + property_name: Optional[pulumi.Input[str]] = None, + property_type: Optional[pulumi.Input[str]] = None, + property_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + repository: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + This resource allows you to create and manage a specific custom property for a GitHub repository. + + ## Example Usage + + > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` + + ```python + import pulumi + import pulumi_github as github + + example = github.Repository("example", + name="example", + description="My awesome codebase") + string = github.RepositoryCustomProperty("string", + repository=example.name, + property_name="my-cool-property", + property_type="string", + property_values=["test"]) + ``` + + ## Import + + GitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g. + + ```sh + $ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example :: + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] property_name: Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + :param pulumi.Input[str] property_type: Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + :param pulumi.Input[Sequence[pulumi.Input[str]]] property_values: Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + :param pulumi.Input[str] repository: The repository of the environment. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: RepositoryCustomPropertyArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + This resource allows you to create and manage a specific custom property for a GitHub repository. + + ## Example Usage + + > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` + + ```python + import pulumi + import pulumi_github as github + + example = github.Repository("example", + name="example", + description="My awesome codebase") + string = github.RepositoryCustomProperty("string", + repository=example.name, + property_name="my-cool-property", + property_type="string", + property_values=["test"]) + ``` + + ## Import + + GitHub Repository Custom Property can be imported using an ID made up of a comibnation of the names of the organization, repository, custom property separated by a `:` character, e.g. + + ```sh + $ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example :: + ``` + + :param str resource_name: The name of the resource. + :param RepositoryCustomPropertyArgs 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(RepositoryCustomPropertyArgs, 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, + property_name: Optional[pulumi.Input[str]] = None, + property_type: Optional[pulumi.Input[str]] = None, + property_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + repository: Optional[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__ = RepositoryCustomPropertyArgs.__new__(RepositoryCustomPropertyArgs) + + if property_name is None and not opts.urn: + raise TypeError("Missing required property 'property_name'") + __props__.__dict__["property_name"] = property_name + if property_type is None and not opts.urn: + raise TypeError("Missing required property 'property_type'") + __props__.__dict__["property_type"] = property_type + if property_values is None and not opts.urn: + raise TypeError("Missing required property 'property_values'") + __props__.__dict__["property_values"] = property_values + if repository is None and not opts.urn: + raise TypeError("Missing required property 'repository'") + __props__.__dict__["repository"] = repository + super(RepositoryCustomProperty, __self__).__init__( + 'github:index/repositoryCustomProperty:RepositoryCustomProperty', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + property_name: Optional[pulumi.Input[str]] = None, + property_type: Optional[pulumi.Input[str]] = None, + property_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + repository: Optional[pulumi.Input[str]] = None) -> 'RepositoryCustomProperty': + """ + Get an existing RepositoryCustomProperty 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] property_name: Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + :param pulumi.Input[str] property_type: Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + :param pulumi.Input[Sequence[pulumi.Input[str]]] property_values: Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + :param pulumi.Input[str] repository: The repository of the environment. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _RepositoryCustomPropertyState.__new__(_RepositoryCustomPropertyState) + + __props__.__dict__["property_name"] = property_name + __props__.__dict__["property_type"] = property_type + __props__.__dict__["property_values"] = property_values + __props__.__dict__["repository"] = repository + return RepositoryCustomProperty(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="propertyName") + def property_name(self) -> pulumi.Output[str]: + """ + Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + """ + return pulumi.get(self, "property_name") + + @property + @pulumi.getter(name="propertyType") + def property_type(self) -> pulumi.Output[str]: + """ + Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + """ + return pulumi.get(self, "property_type") + + @property + @pulumi.getter(name="propertyValues") + def property_values(self) -> pulumi.Output[Sequence[str]]: + """ + Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + """ + return pulumi.get(self, "property_values") + + @property + @pulumi.getter + def repository(self) -> pulumi.Output[str]: + """ + The repository of the environment. + """ + return pulumi.get(self, "repository") + diff --git a/sdk/python/pulumi_github/repository_dependabot_security_updates.py b/sdk/python/pulumi_github/repository_dependabot_security_updates.py index ebc67d5b..88798223 100644 --- a/sdk/python/pulumi_github/repository_dependabot_security_updates.py +++ b/sdk/python/pulumi_github/repository_dependabot_security_updates.py @@ -24,7 +24,7 @@ def __init__(__self__, *, """ The set of arguments for constructing a RepositoryDependabotSecurityUpdates resource. :param pulumi.Input[bool] enabled: The state of the automated security fixes. - :param pulumi.Input[str] repository: The repository to manage. + :param pulumi.Input[str] repository: The name of the GitHub repository. """ pulumi.set(__self__, "enabled", enabled) pulumi.set(__self__, "repository", repository) @@ -45,7 +45,7 @@ def enabled(self, value: pulumi.Input[bool]): @pulumi.getter def repository(self) -> pulumi.Input[str]: """ - The repository to manage. + The name of the GitHub repository. """ return pulumi.get(self, "repository") @@ -62,7 +62,7 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering RepositoryDependabotSecurityUpdates resources. :param pulumi.Input[bool] enabled: The state of the automated security fixes. - :param pulumi.Input[str] repository: The repository to manage. + :param pulumi.Input[str] repository: The name of the GitHub repository. """ if enabled is not None: pulumi.set(__self__, "enabled", enabled) @@ -85,7 +85,7 @@ def enabled(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def repository(self) -> Optional[pulumi.Input[str]]: """ - The repository to manage. + The name of the GitHub repository. """ return pulumi.get(self, "repository") @@ -119,7 +119,7 @@ def __init__(__self__, private=False, vulnerability_alerts=True) example = github.RepositoryDependabotSecurityUpdates("example", - repository=test["id"], + repository=test["name"], enabled=True) ``` @@ -134,7 +134,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] enabled: The state of the automated security fixes. - :param pulumi.Input[str] repository: The repository to manage. + :param pulumi.Input[str] repository: The name of the GitHub repository. """ ... @overload @@ -159,7 +159,7 @@ def __init__(__self__, private=False, vulnerability_alerts=True) example = github.RepositoryDependabotSecurityUpdates("example", - repository=test["id"], + repository=test["name"], enabled=True) ``` @@ -223,7 +223,7 @@ def get(resource_name: str, :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] enabled: The state of the automated security fixes. - :param pulumi.Input[str] repository: The repository to manage. + :param pulumi.Input[str] repository: The name of the GitHub repository. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -245,7 +245,7 @@ def enabled(self) -> pulumi.Output[bool]: @pulumi.getter def repository(self) -> pulumi.Output[str]: """ - The repository to manage. + The name of the GitHub repository. """ return pulumi.get(self, "repository") diff --git a/upstream b/upstream index 84c6bd21..1ca7092b 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 84c6bd2189177d0f685121b3b35f2bccecc70b9e +Subproject commit 1ca7092bbae5cf41e4255e19b38297958d416258