From 3a4c9e64b1126bc073dabea866866f580761b14f Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:55:03 -0700 Subject: [PATCH] Upgrade pulumi-terraform-bridge to v3.63.1 (#410) This PR was generated via `$ upgrade-provider pulumi/pulumi-gitlab --kind=bridge --target-bridge-version=v3.63.1 --pr-reviewers=t0yv0 --pr-description=`. --- - Upgrading pulumi-terraform-bridge from v3.63.0 to v3.63.1. --- provider/go.mod | 2 +- provider/go.sum | 4 +- sdk/dotnet/Application.cs | 23 ++++ sdk/dotnet/ApplicationSettings.cs | 21 ++++ sdk/dotnet/Branch.cs | 26 +++++ sdk/dotnet/ClusterAgent.cs | 33 ++++++ sdk/dotnet/ClusterAgentToken.cs | 57 ++++++++++ sdk/dotnet/ComplianceFramework.cs | 22 ++++ sdk/dotnet/DeployKey.cs | 20 ++++ sdk/dotnet/DeployKeyEnable.cs | 34 ++++++ sdk/dotnet/GetBranch.cs | 46 ++++++++ sdk/dotnet/GetClusterAgent.cs | 46 ++++++++ sdk/dotnet/GetClusterAgents.cs | 44 ++++++++ sdk/dotnet/GetCurrentUser.cs | 38 +++++++ sdk/dotnet/GetGroup.cs | 44 ++++++++ sdk/dotnet/GetGroupMembership.cs | 44 ++++++++ sdk/dotnet/GetGroupSubgroups.cs | 52 +++++++++ sdk/dotnet/GetGroupVariable.cs | 60 ++++++++++ sdk/dotnet/GetGroupVariables.cs | 56 +++++++++ sdk/dotnet/GetGroups.cs | 56 +++++++++ sdk/dotnet/GetInstanceDeployKeys.cs | 44 ++++++++ sdk/dotnet/GetInstanceVariable.cs | 44 ++++++++ sdk/dotnet/GetInstanceVariables.cs | 38 +++++++ sdk/dotnet/GetMetadata.cs | 38 +++++++ sdk/dotnet/GetProject.cs | 44 ++++++++ sdk/dotnet/GetProjectBranches.cs | 44 ++++++++ sdk/dotnet/GetProjectHook.cs | 56 +++++++++ sdk/dotnet/GetProjectHooks.cs | 54 +++++++++ sdk/dotnet/GetProjectIssue.cs | 64 +++++++++++ sdk/dotnet/GetProjectIssues.cs | 56 +++++++++ sdk/dotnet/GetProjectMembership.cs | 46 ++++++++ sdk/dotnet/GetProjectMilestone.cs | 46 ++++++++ sdk/dotnet/GetProjectMilestones.cs | 44 ++++++++ sdk/dotnet/GetProjectProtectedBranch.cs | 46 ++++++++ sdk/dotnet/GetProjectProtectedBranches.cs | 44 ++++++++ sdk/dotnet/GetProjectTag.cs | 46 ++++++++ sdk/dotnet/GetProjectTags.cs | 44 ++++++++ sdk/dotnet/GetProjectVariable.cs | 60 ++++++++++ sdk/dotnet/GetProjectVariables.cs | 56 +++++++++ sdk/dotnet/GetProjects.cs | 72 ++++++++++++ sdk/dotnet/GetReleaseLink.cs | 48 ++++++++ sdk/dotnet/GetReleaseLinks.cs | 46 ++++++++ sdk/dotnet/GetRepositoryFile.cs | 48 ++++++++ sdk/dotnet/GetRepositoryTree.cs | 50 +++++++++ sdk/dotnet/GetUsers.cs | 58 ++++++++++ sdk/dotnet/Group.cs | 26 +++++ sdk/dotnet/GroupAccessToken.cs | 31 +++++ sdk/dotnet/GroupBadge.cs | 46 ++++++++ sdk/dotnet/GroupCluster.cs | 31 +++++ sdk/dotnet/GroupCustomAttribute.cs | 20 ++++ sdk/dotnet/GroupEpicBoard.cs | 43 +++++++ sdk/dotnet/GroupHook.cs | 43 +++++++ sdk/dotnet/GroupLabel.cs | 20 ++++ sdk/dotnet/GroupMembership.cs | 21 ++++ sdk/dotnet/GroupProjectFileTemplate.cs | 32 ++++++ sdk/dotnet/GroupSamlLink.cs | 20 ++++ sdk/dotnet/GroupShareGroup.cs | 21 ++++ sdk/dotnet/GroupVariable.cs | 23 ++++ sdk/dotnet/InstanceCluster.cs | 26 +++++ sdk/dotnet/InstanceVariable.cs | 21 ++++ sdk/dotnet/IntegrationCustomIssueTracker.cs | 26 +++++ sdk/dotnet/IntegrationEmailsOnPush.cs | 25 +++++ sdk/dotnet/IntegrationExternalWiki.cs | 25 +++++ sdk/dotnet/IntegrationGithub.cs | 26 +++++ sdk/dotnet/IntegrationJira.cs | 27 +++++ sdk/dotnet/IntegrationMattermost.cs | 28 +++++ sdk/dotnet/IntegrationMicrosoftTeams.cs | 26 +++++ sdk/dotnet/IntegrationPipelinesEmail.cs | 30 +++++ sdk/dotnet/IntegrationSlack.cs | 28 +++++ sdk/dotnet/PagesDomain.cs | 31 +++++ sdk/dotnet/PersonalAccessToken.cs | 30 +++++ sdk/dotnet/PipelineSchedule.cs | 21 ++++ sdk/dotnet/PipelineScheduleVariable.cs | 29 +++++ sdk/dotnet/PipelineTrigger.cs | 19 ++++ sdk/dotnet/Project.cs | 96 ++++++++++++++++ sdk/dotnet/ProjectAccessToken.cs | 31 +++++ sdk/dotnet/ProjectBadge.cs | 46 ++++++++ sdk/dotnet/ProjectCluster.cs | 29 +++++ sdk/dotnet/ProjectComplianceFramework.cs | 28 +++++ sdk/dotnet/ProjectCustomAttribute.cs | 20 ++++ sdk/dotnet/ProjectEnvironment.cs | 31 +++++ sdk/dotnet/ProjectFreezePeriod.cs | 21 ++++ sdk/dotnet/ProjectHook.cs | 20 ++++ sdk/dotnet/ProjectIssue.cs | 33 ++++++ sdk/dotnet/ProjectLabel.cs | 28 +++++ sdk/dotnet/ProjectLevelMrApprovals.cs | 27 +++++ sdk/dotnet/ProjectMembership.cs | 28 +++++ sdk/dotnet/ProjectMilestone.cs | 26 +++++ sdk/dotnet/ProjectMirror.cs | 19 ++++ sdk/dotnet/ProjectRunnerEnablement.cs | 19 ++++ sdk/dotnet/ProjectShareGroup.cs | 20 ++++ sdk/dotnet/ProjectTag.cs | 26 +++++ sdk/dotnet/ProjectVariable.cs | 21 ++++ sdk/dotnet/ReleaseLink.cs | 27 +++++ sdk/dotnet/Runner.cs | 76 +++++++++++++ sdk/dotnet/ServiceCustomIssueTracker.cs | 26 +++++ sdk/dotnet/ServiceEmailsOnPush.cs | 25 +++++ sdk/dotnet/ServiceExternalWiki.cs | 25 +++++ sdk/dotnet/ServiceGithub.cs | 26 +++++ sdk/dotnet/ServiceJira.cs | 27 +++++ sdk/dotnet/ServiceMicrosoftTeams.cs | 26 +++++ sdk/dotnet/ServicePipelinesEmail.cs | 30 +++++ sdk/dotnet/ServiceSlack.cs | 28 +++++ sdk/dotnet/SystemHook.cs | 24 ++++ sdk/dotnet/TagProtection.cs | 31 +++++ sdk/dotnet/User.cs | 25 +++++ sdk/dotnet/UserCustomAttribute.cs | 20 ++++ sdk/dotnet/UserGpgKey.cs | 35 ++++++ sdk/dotnet/UserSshKey.cs | 26 +++++ sdk/go/gitlab/application.go | 30 +++++ sdk/go/gitlab/applicationSettings.go | 26 +++++ sdk/go/gitlab/branch.go | 34 ++++++ sdk/go/gitlab/clusterAgent.go | 44 ++++++++ sdk/go/gitlab/clusterAgentToken.go | 66 +++++++++++ sdk/go/gitlab/complianceFramework.go | 30 +++++ sdk/go/gitlab/deployKey.go | 28 +++++ sdk/go/gitlab/deployKeyEnable.go | 43 +++++++ sdk/go/gitlab/getBranch.go | 27 +++++ sdk/go/gitlab/getClusterAgent.go | 27 +++++ sdk/go/gitlab/getClusterAgents.go | 26 +++++ sdk/go/gitlab/getCurrentUser.go | 24 ++++ sdk/go/gitlab/getGroup.go | 26 +++++ sdk/go/gitlab/getGroupMembership.go | 26 +++++ sdk/go/gitlab/getGroupSubgroups.go | 27 +++++ sdk/go/gitlab/getGroupVariable.go | 35 ++++++ sdk/go/gitlab/getGroupVariables.go | 33 ++++++ sdk/go/gitlab/getGroups.go | 33 ++++++ sdk/go/gitlab/getInstanceDeployKeys.go | 26 +++++ sdk/go/gitlab/getInstanceVariable.go | 26 +++++ sdk/go/gitlab/getInstanceVariables.go | 24 ++++ sdk/go/gitlab/getMetadata.go | 24 ++++ sdk/go/gitlab/getProject.go | 26 +++++ sdk/go/gitlab/getProjectBranches.go | 26 +++++ sdk/go/gitlab/getProjectHook.go | 33 ++++++ sdk/go/gitlab/getProjectHooks.go | 32 ++++++ sdk/go/gitlab/getProjectIssue.go | 34 ++++++ sdk/go/gitlab/getProjectIssues.go | 33 ++++++ sdk/go/gitlab/getProjectMembership.go | 27 +++++ sdk/go/gitlab/getProjectMilestone.go | 27 +++++ sdk/go/gitlab/getProjectMilestones.go | 26 +++++ sdk/go/gitlab/getProjectProtectedBranch.go | 27 +++++ sdk/go/gitlab/getProjectProtectedBranches.go | 26 +++++ sdk/go/gitlab/getProjectTag.go | 27 +++++ sdk/go/gitlab/getProjectTags.go | 26 +++++ sdk/go/gitlab/getProjectVariable.go | 35 ++++++ sdk/go/gitlab/getProjectVariables.go | 33 ++++++ sdk/go/gitlab/getProjects.go | 42 +++++++ sdk/go/gitlab/getReleaseLink.go | 28 +++++ sdk/go/gitlab/getReleaseLinks.go | 27 +++++ sdk/go/gitlab/getRepositoryFile.go | 28 +++++ sdk/go/gitlab/getRepositoryTree.go | 29 +++++ sdk/go/gitlab/getUsers.go | 34 ++++++ sdk/go/gitlab/group.go | 34 ++++++ sdk/go/gitlab/groupAccessToken.go | 39 +++++++ sdk/go/gitlab/groupBadge.go | 56 +++++++++ sdk/go/gitlab/groupCluster.go | 40 +++++++ sdk/go/gitlab/groupCustomAttribute.go | 28 +++++ sdk/go/gitlab/groupEpicBoard.go | 52 +++++++++ sdk/go/gitlab/groupHook.go | 51 +++++++++ sdk/go/gitlab/groupLabel.go | 28 +++++ sdk/go/gitlab/groupMembership.go | 29 +++++ sdk/go/gitlab/groupProjectFileTemplate.go | 42 +++++++ sdk/go/gitlab/groupSamlLink.go | 28 +++++ sdk/go/gitlab/groupShareGroup.go | 29 +++++ sdk/go/gitlab/groupVariable.go | 31 +++++ sdk/go/gitlab/instanceCluster.go | 34 ++++++ sdk/go/gitlab/instanceVariable.go | 29 +++++ .../gitlab/integrationCustomIssueTracker.go | 35 ++++++ sdk/go/gitlab/integrationEmailsOnPush.go | 34 ++++++ sdk/go/gitlab/integrationExternalWiki.go | 34 ++++++ sdk/go/gitlab/integrationGithub.go | 35 ++++++ sdk/go/gitlab/integrationJira.go | 36 ++++++ sdk/go/gitlab/integrationMattermost.go | 37 ++++++ sdk/go/gitlab/integrationMicrosoftTeams.go | 35 ++++++ sdk/go/gitlab/integrationPipelinesEmail.go | 38 +++++++ sdk/go/gitlab/integrationSlack.go | 37 ++++++ sdk/go/gitlab/pagesDomain.go | 48 ++++++++ sdk/go/gitlab/personalAccessToken.go | 38 +++++++ sdk/go/gitlab/pipelineSchedule.go | 29 +++++ sdk/go/gitlab/pipelineScheduleVariable.go | 38 +++++++ sdk/go/gitlab/pipelineTrigger.go | 27 +++++ sdk/go/gitlab/project.go | 103 +++++++++++++++++ sdk/go/gitlab/projectAccessToken.go | 39 +++++++ sdk/go/gitlab/projectBadge.go | 56 +++++++++ sdk/go/gitlab/projectCluster.go | 39 +++++++ sdk/go/gitlab/projectComplianceFramework.go | 37 ++++++ sdk/go/gitlab/projectCustomAttribute.go | 28 +++++ sdk/go/gitlab/projectEnvironment.go | 41 +++++++ sdk/go/gitlab/projectFreezePeriod.go | 29 +++++ sdk/go/gitlab/projectHook.go | 28 +++++ sdk/go/gitlab/projectIssue.go | 41 +++++++ sdk/go/gitlab/projectLabel.go | 36 ++++++ sdk/go/gitlab/projectLevelMrApprovals.go | 36 ++++++ sdk/go/gitlab/projectMembership.go | 37 ++++++ sdk/go/gitlab/projectMilestone.go | 34 ++++++ sdk/go/gitlab/projectMirror.go | 27 +++++ sdk/go/gitlab/projectRunnerEnablement.go | 27 +++++ sdk/go/gitlab/projectShareGroup.go | 28 +++++ sdk/go/gitlab/projectTag.go | 34 ++++++ sdk/go/gitlab/projectVariable.go | 29 +++++ sdk/go/gitlab/releaseLink.go | 34 ++++++ sdk/go/gitlab/runner.go | 85 ++++++++++++++ sdk/go/gitlab/serviceCustomIssueTracker.go | 35 ++++++ sdk/go/gitlab/serviceEmailsOnPush.go | 34 ++++++ sdk/go/gitlab/serviceExternalWiki.go | 34 ++++++ sdk/go/gitlab/serviceGithub.go | 35 ++++++ sdk/go/gitlab/serviceJira.go | 36 ++++++ sdk/go/gitlab/serviceMicrosoftTeams.go | 35 ++++++ sdk/go/gitlab/servicePipelinesEmail.go | 38 +++++++ sdk/go/gitlab/serviceSlack.go | 37 ++++++ sdk/go/gitlab/systemHook.go | 32 ++++++ sdk/go/gitlab/tagProtection.go | 36 ++++++ sdk/go/gitlab/user.go | 33 ++++++ sdk/go/gitlab/userCustomAttribute.go | 28 +++++ sdk/go/gitlab/userGpgKey.go | 39 +++++++ sdk/go/gitlab/userSshKey.go | 35 ++++++ sdk/nodejs/application.ts | 13 +++ sdk/nodejs/applicationSettings.ts | 14 +++ sdk/nodejs/branch.ts | 17 +++ sdk/nodejs/clusterAgent.ts | 22 ++++ sdk/nodejs/clusterAgentToken.ts | 36 ++++++ sdk/nodejs/complianceFramework.ts | 15 +++ sdk/nodejs/deployKey.ts | 13 +++ sdk/nodejs/deployKeyEnable.ts | 23 ++++ sdk/nodejs/getBranch.ts | 24 ++++ sdk/nodejs/getClusterAgent.ts | 24 ++++ sdk/nodejs/getClusterAgents.ts | 22 ++++ sdk/nodejs/getCurrentUser.ts | 18 +++ sdk/nodejs/getGroup.ts | 22 ++++ sdk/nodejs/getGroupMembership.ts | 22 ++++ sdk/nodejs/getGroupSubgroups.ts | 24 ++++ sdk/nodejs/getGroupVariable.ts | 34 ++++++ sdk/nodejs/getGroupVariables.ts | 30 +++++ sdk/nodejs/getGroups.ts | 30 +++++ sdk/nodejs/getInstanceDeployKeys.ts | 22 ++++ sdk/nodejs/getInstanceVariable.ts | 22 ++++ sdk/nodejs/getInstanceVariables.ts | 18 +++ sdk/nodejs/getMetadata.ts | 18 +++ sdk/nodejs/getProject.ts | 22 ++++ sdk/nodejs/getProjectBranches.ts | 22 ++++ sdk/nodejs/getProjectHook.ts | 30 +++++ sdk/nodejs/getProjectHooks.ts | 28 +++++ sdk/nodejs/getProjectIssue.ts | 32 ++++++ sdk/nodejs/getProjectIssues.ts | 30 +++++ sdk/nodejs/getProjectMembership.ts | 24 ++++ sdk/nodejs/getProjectMilestone.ts | 24 ++++ sdk/nodejs/getProjectMilestones.ts | 22 ++++ sdk/nodejs/getProjectProtectedBranch.ts | 24 ++++ sdk/nodejs/getProjectProtectedBranches.ts | 22 ++++ sdk/nodejs/getProjectTag.ts | 24 ++++ sdk/nodejs/getProjectTags.ts | 22 ++++ sdk/nodejs/getProjectVariable.ts | 34 ++++++ sdk/nodejs/getProjectVariables.ts | 30 +++++ sdk/nodejs/getProjects.ts | 42 +++++++ sdk/nodejs/getReleaseLink.ts | 26 +++++ sdk/nodejs/getReleaseLinks.ts | 24 ++++ sdk/nodejs/getRepositoryFile.ts | 26 +++++ sdk/nodejs/getRepositoryTree.ts | 28 +++++ sdk/nodejs/getUsers.ts | 32 ++++++ sdk/nodejs/group.ts | 17 +++ sdk/nodejs/groupAccessToken.ts | 19 ++++ sdk/nodejs/groupBadge.ts | 32 ++++++ sdk/nodejs/groupCluster.ts | 20 ++++ sdk/nodejs/groupCustomAttribute.ts | 13 +++ sdk/nodejs/groupEpicBoard.ts | 26 +++++ sdk/nodejs/groupHook.ts | 34 ++++++ sdk/nodejs/groupLabel.ts | 13 +++ sdk/nodejs/groupMembership.ts | 14 +++ sdk/nodejs/groupProjectFileTemplate.ts | 21 ++++ sdk/nodejs/groupSamlLink.ts | 13 +++ sdk/nodejs/groupShareGroup.ts | 14 +++ sdk/nodejs/groupVariable.ts | 16 +++ sdk/nodejs/instanceCluster.ts | 19 ++++ sdk/nodejs/instanceVariable.ts | 14 +++ sdk/nodejs/integrationCustomIssueTracker.ts | 17 +++ sdk/nodejs/integrationEmailsOnPush.ts | 16 +++ sdk/nodejs/integrationExternalWiki.ts | 16 +++ sdk/nodejs/integrationGithub.ts | 17 +++ sdk/nodejs/integrationJira.ts | 18 +++ sdk/nodejs/integrationMattermost.ts | 19 ++++ sdk/nodejs/integrationMicrosoftTeams.ts | 17 +++ sdk/nodejs/integrationPipelinesEmail.ts | 18 +++ sdk/nodejs/integrationSlack.ts | 19 ++++ sdk/nodejs/pagesDomain.ts | 22 ++++ sdk/nodejs/personalAccessToken.ts | 18 +++ sdk/nodejs/pipelineSchedule.ts | 14 +++ sdk/nodejs/pipelineScheduleVariable.ts | 20 ++++ sdk/nodejs/pipelineTrigger.ts | 12 ++ sdk/nodejs/project.ts | 62 ++++++++++ sdk/nodejs/projectAccessToken.ts | 19 ++++ sdk/nodejs/projectBadge.ts | 32 ++++++ sdk/nodejs/projectCluster.ts | 21 ++++ sdk/nodejs/projectComplianceFramework.ts | 19 ++++ sdk/nodejs/projectCustomAttribute.ts | 13 +++ sdk/nodejs/projectEnvironment.ts | 20 ++++ sdk/nodejs/projectFreezePeriod.ts | 14 +++ sdk/nodejs/projectHook.ts | 13 +++ sdk/nodejs/projectIssue.ts | 21 ++++ sdk/nodejs/projectLabel.ts | 19 ++++ sdk/nodejs/projectLevelMrApprovals.ts | 16 +++ sdk/nodejs/projectMembership.ts | 19 ++++ sdk/nodejs/projectMilestone.ts | 17 +++ sdk/nodejs/projectMirror.ts | 12 ++ sdk/nodejs/projectRunnerEnablement.ts | 12 ++ sdk/nodejs/projectShareGroup.ts | 13 +++ sdk/nodejs/projectTag.ts | 17 +++ sdk/nodejs/projectVariable.ts | 14 +++ sdk/nodejs/releaseLink.ts | 16 +++ sdk/nodejs/runner.ts | 48 ++++++++ sdk/nodejs/serviceCustomIssueTracker.ts | 17 +++ sdk/nodejs/serviceEmailsOnPush.ts | 16 +++ sdk/nodejs/serviceExternalWiki.ts | 16 +++ sdk/nodejs/serviceGithub.ts | 17 +++ sdk/nodejs/serviceJira.ts | 18 +++ sdk/nodejs/serviceMicrosoftTeams.ts | 17 +++ sdk/nodejs/servicePipelinesEmail.ts | 18 +++ sdk/nodejs/serviceSlack.ts | 19 ++++ sdk/nodejs/systemHook.ts | 17 +++ sdk/nodejs/tagProtection.ts | 21 ++++ sdk/nodejs/user.ts | 18 +++ sdk/nodejs/userCustomAttribute.ts | 13 +++ sdk/nodejs/userGpgKey.ts | 22 ++++ sdk/nodejs/userSshKey.ts | 17 +++ sdk/python/pulumi_gitlab/application.py | 24 ++++ .../pulumi_gitlab/application_settings.py | 26 ++++- sdk/python/pulumi_gitlab/branch.py | 30 +++++ sdk/python/pulumi_gitlab/cluster_agent.py | 42 +++++++ .../pulumi_gitlab/cluster_agent_token.py | 62 ++++++++++ .../pulumi_gitlab/compliance_framework.py | 28 +++++ sdk/python/pulumi_gitlab/deploy_key.py | 24 ++++ sdk/python/pulumi_gitlab/deploy_key_enable.py | 42 +++++++ sdk/python/pulumi_gitlab/get_branch.py | 20 ++++ sdk/python/pulumi_gitlab/get_cluster_agent.py | 20 ++++ .../pulumi_gitlab/get_cluster_agents.py | 18 +++ sdk/python/pulumi_gitlab/get_current_user.py | 18 +++ sdk/python/pulumi_gitlab/get_group.py | 18 +++ .../pulumi_gitlab/get_group_membership.py | 18 +++ .../pulumi_gitlab/get_group_subgroups.py | 20 ++++ .../pulumi_gitlab/get_group_variable.py | 26 +++++ .../pulumi_gitlab/get_group_variables.py | 22 ++++ sdk/python/pulumi_gitlab/get_groups.py | 22 ++++ .../pulumi_gitlab/get_instance_deploy_keys.py | 18 +++ .../pulumi_gitlab/get_instance_variable.py | 18 +++ .../pulumi_gitlab/get_instance_variables.py | 18 +++ sdk/python/pulumi_gitlab/get_metadata.py | 18 +++ sdk/python/pulumi_gitlab/get_project.py | 18 +++ .../pulumi_gitlab/get_project_branches.py | 18 +++ sdk/python/pulumi_gitlab/get_project_hook.py | 22 ++++ sdk/python/pulumi_gitlab/get_project_hooks.py | 20 ++++ sdk/python/pulumi_gitlab/get_project_issue.py | 24 ++++ .../pulumi_gitlab/get_project_issues.py | 22 ++++ .../pulumi_gitlab/get_project_membership.py | 20 ++++ .../pulumi_gitlab/get_project_milestone.py | 20 ++++ .../pulumi_gitlab/get_project_milestones.py | 18 +++ .../get_project_protected_branch.py | 20 ++++ .../get_project_protected_branches.py | 18 +++ sdk/python/pulumi_gitlab/get_project_tag.py | 20 ++++ sdk/python/pulumi_gitlab/get_project_tags.py | 18 +++ .../pulumi_gitlab/get_project_variable.py | 26 +++++ .../pulumi_gitlab/get_project_variables.py | 22 ++++ sdk/python/pulumi_gitlab/get_projects.py | 30 +++++ sdk/python/pulumi_gitlab/get_release_link.py | 22 ++++ sdk/python/pulumi_gitlab/get_release_links.py | 20 ++++ .../pulumi_gitlab/get_repository_file.py | 22 ++++ .../pulumi_gitlab/get_repository_tree.py | 24 ++++ sdk/python/pulumi_gitlab/get_users.py | 24 ++++ sdk/python/pulumi_gitlab/group.py | 30 +++++ .../pulumi_gitlab/group_access_token.py | 34 ++++++ sdk/python/pulumi_gitlab/group_badge.py | 56 +++++++++ sdk/python/pulumi_gitlab/group_cluster.py | 38 +++++++ .../pulumi_gitlab/group_custom_attribute.py | 24 ++++ sdk/python/pulumi_gitlab/group_epic_board.py | 44 ++++++++ sdk/python/pulumi_gitlab/group_hook.py | 64 +++++++++++ sdk/python/pulumi_gitlab/group_label.py | 24 ++++ sdk/python/pulumi_gitlab/group_membership.py | 26 +++++ .../group_project_file_template.py | 36 ++++++ sdk/python/pulumi_gitlab/group_saml_link.py | 24 ++++ sdk/python/pulumi_gitlab/group_share_group.py | 26 +++++ sdk/python/pulumi_gitlab/group_variable.py | 30 +++++ sdk/python/pulumi_gitlab/instance_cluster.py | 36 ++++++ sdk/python/pulumi_gitlab/instance_variable.py | 26 +++++ .../integration_custom_issue_tracker.py | 30 +++++ .../integration_emails_on_push.py | 28 +++++ .../integration_external_wiki.py | 28 +++++ .../pulumi_gitlab/integration_github.py | 30 +++++ sdk/python/pulumi_gitlab/integration_jira.py | 32 ++++++ .../pulumi_gitlab/integration_mattermost.py | 34 ++++++ .../integration_microsoft_teams.py | 30 +++++ .../integration_pipelines_email.py | 32 ++++++ sdk/python/pulumi_gitlab/integration_slack.py | 34 ++++++ sdk/python/pulumi_gitlab/pages_domain.py | 38 +++++++ .../pulumi_gitlab/personal_access_token.py | 32 ++++++ sdk/python/pulumi_gitlab/pipeline_schedule.py | 26 +++++ .../pipeline_schedule_variable.py | 36 ++++++ sdk/python/pulumi_gitlab/pipeline_trigger.py | 22 ++++ sdk/python/pulumi_gitlab/project.py | 106 ++++++++++++++++++ .../pulumi_gitlab/project_access_token.py | 34 ++++++ sdk/python/pulumi_gitlab/project_badge.py | 56 +++++++++ sdk/python/pulumi_gitlab/project_cluster.py | 40 +++++++ .../project_compliance_framework.py | 34 ++++++ .../pulumi_gitlab/project_custom_attribute.py | 24 ++++ .../pulumi_gitlab/project_environment.py | 34 ++++++ .../pulumi_gitlab/project_freeze_period.py | 26 +++++ sdk/python/pulumi_gitlab/project_hook.py | 24 ++++ sdk/python/pulumi_gitlab/project_issue.py | 38 +++++++ sdk/python/pulumi_gitlab/project_label.py | 34 ++++++ .../project_level_mr_approvals.py | 30 +++++ .../pulumi_gitlab/project_membership.py | 34 ++++++ sdk/python/pulumi_gitlab/project_milestone.py | 30 +++++ sdk/python/pulumi_gitlab/project_mirror.py | 22 ++++ .../project_runner_enablement.py | 22 ++++ .../pulumi_gitlab/project_share_group.py | 24 ++++ sdk/python/pulumi_gitlab/project_tag.py | 30 +++++ sdk/python/pulumi_gitlab/project_variable.py | 26 +++++ sdk/python/pulumi_gitlab/release_link.py | 30 +++++ sdk/python/pulumi_gitlab/runner.py | 90 +++++++++++++++ .../service_custom_issue_tracker.py | 30 +++++ .../pulumi_gitlab/service_emails_on_push.py | 28 +++++ .../pulumi_gitlab/service_external_wiki.py | 28 +++++ sdk/python/pulumi_gitlab/service_github.py | 30 +++++ sdk/python/pulumi_gitlab/service_jira.py | 32 ++++++ .../pulumi_gitlab/service_microsoft_teams.py | 30 +++++ .../pulumi_gitlab/service_pipelines_email.py | 32 ++++++ sdk/python/pulumi_gitlab/service_slack.py | 34 ++++++ sdk/python/pulumi_gitlab/system_hook.py | 32 ++++++ sdk/python/pulumi_gitlab/tag_protection.py | 40 +++++++ sdk/python/pulumi_gitlab/user.py | 34 ++++++ .../pulumi_gitlab/user_custom_attribute.py | 24 ++++ sdk/python/pulumi_gitlab/user_gpg_key.py | 38 +++++++ sdk/python/pulumi_gitlab/user_ssh_key.py | 28 +++++ 430 files changed, 12937 insertions(+), 5 deletions(-) diff --git a/provider/go.mod b/provider/go.mod index cbadf0430..ae8e157f2 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/pulumi/pulumi-terraform-bridge/pf v0.18.2 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1 github.com/pulumi/pulumi/sdk/v3 v3.90.1 gitlab.com/gitlab-org/terraform-provider-gitlab v0.0.0 ) diff --git a/provider/go.sum b/provider/go.sum index 87e77de06..bd4bcc706 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2182,8 +2182,8 @@ github.com/pulumi/pulumi-terraform-bridge/pf v0.18.2 h1:lSm5nbZETkeVNJQTcGOmuHCS github.com/pulumi/pulumi-terraform-bridge/pf v0.18.2/go.mod h1:4ii0lFkIQMhCZg5du0xEtAB36Kk0WuLtDVO/ntTxRIs= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1/go.mod h1:7OeUPH8rpt5ipyj9EFcnXpuzQ8SHL0dyqdfa8nOacdk= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0 h1:otdmkNsMGyZ+proUZClznZo+cEchkSSkmaGcq+Gf+6s= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0/go.mod h1:6YVbDo019OeHkQWo9MnUbBy6cCgCQeoXZDjmR9SYmUA= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1 h1:hBgediyT2LdS5yfD5AMiCmBJ/TYP94Xxv6a4TcAfV0g= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1/go.mod h1:6YVbDo019OeHkQWo9MnUbBy6cCgCQeoXZDjmR9SYmUA= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.6 h1:uy8P3aaAbrOrGvytvCb2KsYqZMA9TJiY8IKeVQgNAJo= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.6/go.mod h1:uw1IN0Mlvi5SL0cmWzmKqZ+ZDNueRIXkr9aE+XQkrug= github.com/pulumi/pulumi-yaml v1.2.2 h1:W6BeUBLhDrJ2GSU0em1AUVelG9PBI4ABY61DdhJOO3E= diff --git a/sdk/dotnet/Application.cs b/sdk/dotnet/Application.cs index 3c0b79d27..7e491b5b4 100644 --- a/sdk/dotnet/Application.cs +++ b/sdk/dotnet/Application.cs @@ -17,6 +17,29 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/applications.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var oidc = new GitLab.Application("oidc", new() + /// { + /// Confidential = true, + /// RedirectUrl = "https://mycompany.com", + /// Scopes = new[] + /// { + /// "openid", + /// }, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab applications can be imported with their id, e.g. diff --git a/sdk/dotnet/ApplicationSettings.cs b/sdk/dotnet/ApplicationSettings.cs index b9a9f9f92..c0d597fec 100644 --- a/sdk/dotnet/ApplicationSettings.cs +++ b/sdk/dotnet/ApplicationSettings.cs @@ -9,6 +9,27 @@ namespace Pulumi.GitLab { + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Set the 2FA settings + /// var @this = new GitLab.ApplicationSettings("this", new() + /// { + /// RequireTwoFactorAuthentication = true, + /// TwoFactorGracePeriod = 24, + /// }); + /// + /// }); + /// ``` + /// [GitLabResourceType("gitlab:index/applicationSettings:ApplicationSettings")] public partial class ApplicationSettings : global::Pulumi.CustomResource { diff --git a/sdk/dotnet/Branch.cs b/sdk/dotnet/Branch.cs index 9a425ea82..8ed3776f5 100644 --- a/sdk/dotnet/Branch.cs +++ b/sdk/dotnet/Branch.cs @@ -14,6 +14,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create a project for the branch to use + /// var exampleProject = new GitLab.Project("exampleProject", new() + /// { + /// Description = "An example project", + /// NamespaceId = gitlab_group.Example.Id, + /// }); + /// + /// var exampleBranch = new GitLab.Branch("exampleBranch", new() + /// { + /// Ref = "main", + /// Project = exampleProject.Id, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab branches can be imported with a key composed of `<project_id>:<branch_name>`, e.g. diff --git a/sdk/dotnet/ClusterAgent.cs b/sdk/dotnet/ClusterAgent.cs index c566e4425..c1cac1af7 100644 --- a/sdk/dotnet/ClusterAgent.cs +++ b/sdk/dotnet/ClusterAgent.cs @@ -23,6 +23,39 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.ClusterAgent("example", new() + /// { + /// Project = "12345", + /// }); + /// + /// // Optionally, configure the agent as described in + /// // https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#create-an-agent-configuration-file + /// var exampleAgentConfig = new GitLab.RepositoryFile("exampleAgentConfig", new() + /// { + /// Project = example.Project, + /// Branch = "main", + /// FilePath = example.Name.Apply(name => $".gitlab/agents/{name}"), + /// Content = @" gitops: + /// ... + /// ", + /// AuthorEmail = "terraform@example.com", + /// AuthorName = "Terraform", + /// CommitMessage = example.Name.Apply(name => $"feature: add agent config for {name}"), + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab Agent for Kubernetes can be imported with the following command and the id pattern `<project>:<agent-id>` diff --git a/sdk/dotnet/ClusterAgentToken.cs b/sdk/dotnet/ClusterAgentToken.cs index bb0c35240..335542a73 100644 --- a/sdk/dotnet/ClusterAgentToken.cs +++ b/sdk/dotnet/ClusterAgentToken.cs @@ -18,6 +18,63 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html#create-an-agent-token) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// using Helm = Pulumi.Helm; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create token for an agent + /// var example = new GitLab.ClusterAgentToken("example", new() + /// { + /// Project = "12345", + /// AgentId = 42, + /// Description = "some token", + /// }); + /// + /// var thisProject = GitLab.GetProject.Invoke(new() + /// { + /// PathWithNamespace = "my-org/example", + /// }); + /// + /// var thisClusterAgent = new GitLab.ClusterAgent("thisClusterAgent", new() + /// { + /// Project = thisProject.Apply(getProjectResult => getProjectResult.Id), + /// }); + /// + /// var thisClusterAgentToken = new GitLab.ClusterAgentToken("thisClusterAgentToken", new() + /// { + /// Project = thisProject.Apply(getProjectResult => getProjectResult.Id), + /// AgentId = thisClusterAgent.AgentId, + /// Description = "Token for the my-agent used with `gitlab-agent` Helm Chart", + /// }); + /// + /// var gitlabAgent = new Helm.Index.Helm_release("gitlabAgent", new() + /// { + /// Name = "gitlab-agent", + /// Namespace = "gitlab-agent", + /// CreateNamespace = true, + /// Repository = "https://charts.gitlab.io", + /// Chart = "gitlab-agent", + /// Version = "1.2.0", + /// Set = new[] + /// { + /// + /// { + /// { "name", "config.token" }, + /// { "value", thisClusterAgentToken.Token }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A token for a GitLab Agent for Kubernetes can be imported with the following command and the id pattern `<project>:<agent-id>:<token-id>` diff --git a/sdk/dotnet/ComplianceFramework.cs b/sdk/dotnet/ComplianceFramework.cs index 225fe0b81..c3c7f95de 100644 --- a/sdk/dotnet/ComplianceFramework.cs +++ b/sdk/dotnet/ComplianceFramework.cs @@ -20,6 +20,28 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sample = new GitLab.ComplianceFramework("sample", new() + /// { + /// Color = "#87BEEF", + /// Default = false, + /// Description = "A HIPAA Compliance Framework", + /// NamespacePath = "top-level-group", + /// PipelineConfigurationFullPath = ".hipaa.yml@top-level-group/compliance-frameworks", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab compliance frameworks can be imported with a key composed of `<namespace_path>:<framework_id>`, e.g. diff --git a/sdk/dotnet/DeployKey.cs b/sdk/dotnet/DeployKey.cs index f1d71f269..c2a864355 100644 --- a/sdk/dotnet/DeployKey.cs +++ b/sdk/dotnet/DeployKey.cs @@ -16,6 +16,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.DeployKey("example", new() + /// { + /// Key = "ssh-ed25519 AAAA...", + /// Project = "example/deploying", + /// Title = "Example deploy key", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/dotnet/DeployKeyEnable.cs b/sdk/dotnet/DeployKeyEnable.cs index 725a4a457..8b74749fd 100644 --- a/sdk/dotnet/DeployKeyEnable.cs +++ b/sdk/dotnet/DeployKeyEnable.cs @@ -14,6 +14,40 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#enable-a-deploy-key) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // A repo to host the deployment key + /// var parentProject = new GitLab.Project("parentProject"); + /// + /// // A second repo to use the deployment key from the parent project + /// var fooProject = new GitLab.Project("fooProject"); + /// + /// // Upload a deployment key for the parent repo + /// var parentDeployKey = new GitLab.DeployKey("parentDeployKey", new() + /// { + /// Project = parentProject.Id, + /// Title = "Example deploy key", + /// Key = "ssh-ed25519 AAAA...", + /// }); + /// + /// // Enable the deployment key on the second repo + /// var fooDeployKeyEnable = new GitLab.DeployKeyEnable("fooDeployKeyEnable", new() + /// { + /// Project = fooProject.Id, + /// KeyId = parentDeployKey.DeployKeyId, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab enabled deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/dotnet/GetBranch.cs b/sdk/dotnet/GetBranch.cs index c9d08b7ac..23c857838 100644 --- a/sdk/dotnet/GetBranch.cs +++ b/sdk/dotnet/GetBranch.cs @@ -15,6 +15,29 @@ public static class GetBranch /// The `gitlab.Branch` data source allows details of a repository branch to be retrieved by its name and project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetBranch.Invoke(new() + /// { + /// Name = "example", + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetBranchArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getBranch:getBranch", args ?? new GetBranchArgs(), options.WithDefaults()); @@ -23,6 +46,29 @@ public static Task InvokeAsync(GetBranchArgs args, InvokeOption /// The `gitlab.Branch` data source allows details of a repository branch to be retrieved by its name and project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetBranch.Invoke(new() + /// { + /// Name = "example", + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetBranchInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getBranch:getBranch", args ?? new GetBranchInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetClusterAgent.cs b/sdk/dotnet/GetClusterAgent.cs index dcbec931a..571cad214 100644 --- a/sdk/dotnet/GetClusterAgent.cs +++ b/sdk/dotnet/GetClusterAgent.cs @@ -17,6 +17,29 @@ public static class GetClusterAgent /// > Requires at least GitLab 14.10 /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetClusterAgent.Invoke(new() + /// { + /// AgentId = 1, + /// Project = "12345", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetClusterAgentArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getClusterAgent:getClusterAgent", args ?? new GetClusterAgentArgs(), options.WithDefaults()); @@ -27,6 +50,29 @@ public static Task InvokeAsync(GetClusterAgentArgs args, /// > Requires at least GitLab 14.10 /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetClusterAgent.Invoke(new() + /// { + /// AgentId = 1, + /// Project = "12345", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetClusterAgentInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getClusterAgent:getClusterAgent", args ?? new GetClusterAgentInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetClusterAgents.cs b/sdk/dotnet/GetClusterAgents.cs index f40b86e26..193a78f8b 100644 --- a/sdk/dotnet/GetClusterAgents.cs +++ b/sdk/dotnet/GetClusterAgents.cs @@ -17,6 +17,28 @@ public static class GetClusterAgents /// > Requires at least GitLab 14.10 /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var agents = GitLab.GetClusterAgents.Invoke(new() + /// { + /// Project = "12345", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetClusterAgentsArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getClusterAgents:getClusterAgents", args ?? new GetClusterAgentsArgs(), options.WithDefaults()); @@ -27,6 +49,28 @@ public static Task InvokeAsync(GetClusterAgentsArgs args /// > Requires at least GitLab 14.10 /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var agents = GitLab.GetClusterAgents.Invoke(new() + /// { + /// Project = "12345", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetClusterAgentsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getClusterAgents:getClusterAgents", args ?? new GetClusterAgentsInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetCurrentUser.cs b/sdk/dotnet/GetCurrentUser.cs index 8ef5f8213..be571d622 100644 --- a/sdk/dotnet/GetCurrentUser.cs +++ b/sdk/dotnet/GetCurrentUser.cs @@ -15,6 +15,25 @@ public static class GetCurrentUser /// The `gitlab.getCurrentUser` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. /// /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetCurrentUser.Invoke(); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getCurrentUser:getCurrentUser", InvokeArgs.Empty, options.WithDefaults()); @@ -23,6 +42,25 @@ public static Task InvokeAsync(InvokeOptions? options = nu /// The `gitlab.getCurrentUser` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. /// /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetCurrentUser.Invoke(); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getCurrentUser:getCurrentUser", InvokeArgs.Empty, options.WithDefaults()); diff --git a/sdk/dotnet/GetGroup.cs b/sdk/dotnet/GetGroup.cs index 2fb268b40..6e8f9123e 100644 --- a/sdk/dotnet/GetGroup.cs +++ b/sdk/dotnet/GetGroup.cs @@ -15,6 +15,28 @@ public static class GetGroup /// The `gitlab.Group` data source allows details of a group to be retrieved by its id or full path. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetGroup.Invoke(new() + /// { + /// FullPath = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetGroupArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroup:getGroup", args ?? new GetGroupArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetGroupArgs? args = null, Invoke /// The `gitlab.Group` data source allows details of a group to be retrieved by its id or full path. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetGroup.Invoke(new() + /// { + /// FullPath = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetGroupInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroup:getGroup", args ?? new GetGroupInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetGroupMembership.cs b/sdk/dotnet/GetGroupMembership.cs index 4236e0c71..cf0c24edb 100644 --- a/sdk/dotnet/GetGroupMembership.cs +++ b/sdk/dotnet/GetGroupMembership.cs @@ -15,6 +15,28 @@ public static class GetGroupMembership /// The `gitlab.GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetGroupMembership.Invoke(new() + /// { + /// FullPath = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetGroupMembershipArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroupMembership:getGroupMembership", args ?? new GetGroupMembershipArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetGroupMembershipArgs? /// The `gitlab.GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetGroupMembership.Invoke(new() + /// { + /// FullPath = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetGroupMembershipInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroupMembership:getGroupMembership", args ?? new GetGroupMembershipInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetGroupSubgroups.cs b/sdk/dotnet/GetGroupSubgroups.cs index 6b495cc41..91705335a 100644 --- a/sdk/dotnet/GetGroupSubgroups.cs +++ b/sdk/dotnet/GetGroupSubgroups.cs @@ -15,6 +15,32 @@ public static class GetGroupSubgroups /// The `gitlab.getGroupSubgroups` data source allows to get subgroups of a group. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var subgroupsGroupSubgroups = GitLab.GetGroupSubgroups.Invoke(new() + /// { + /// GroupId = 123456, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["subgroups"] = subgroupsGroupSubgroups, + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetGroupSubgroupsArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroupSubgroups:getGroupSubgroups", args ?? new GetGroupSubgroupsArgs(), options.WithDefaults()); @@ -23,6 +49,32 @@ public static Task InvokeAsync(GetGroupSubgroupsArgs ar /// The `gitlab.getGroupSubgroups` data source allows to get subgroups of a group. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var subgroupsGroupSubgroups = GitLab.GetGroupSubgroups.Invoke(new() + /// { + /// GroupId = 123456, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["subgroups"] = subgroupsGroupSubgroups, + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetGroupSubgroupsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroupSubgroups:getGroupSubgroups", args ?? new GetGroupSubgroupsInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetGroupVariable.cs b/sdk/dotnet/GetGroupVariable.cs index 4b4c046fa..4b90cbc5e 100644 --- a/sdk/dotnet/GetGroupVariable.cs +++ b/sdk/dotnet/GetGroupVariable.cs @@ -15,6 +15,36 @@ public static class GetGroupVariable /// The `gitlab.GroupVariable` data source allows to retrieve details about a group-level CI/CD variable. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetGroupVariable.Invoke(new() + /// { + /// Group = "my/example/group", + /// Key = "foo", + /// }); + /// + /// var bar = GitLab.GetGroupVariable.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Group = "my/example/group", + /// Key = "bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetGroupVariableArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroupVariable:getGroupVariable", args ?? new GetGroupVariableArgs(), options.WithDefaults()); @@ -23,6 +53,36 @@ public static Task InvokeAsync(GetGroupVariableArgs args /// The `gitlab.GroupVariable` data source allows to retrieve details about a group-level CI/CD variable. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetGroupVariable.Invoke(new() + /// { + /// Group = "my/example/group", + /// Key = "foo", + /// }); + /// + /// var bar = GitLab.GetGroupVariable.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Group = "my/example/group", + /// Key = "bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetGroupVariableInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroupVariable:getGroupVariable", args ?? new GetGroupVariableInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetGroupVariables.cs b/sdk/dotnet/GetGroupVariables.cs index 8244635b6..068fb0381 100644 --- a/sdk/dotnet/GetGroupVariables.cs +++ b/sdk/dotnet/GetGroupVariables.cs @@ -15,6 +15,34 @@ public static class GetGroupVariables /// The `gitlab.getGroupVariables` data source allows to retrieve all group-level CI/CD variables. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vars = GitLab.GetGroupVariables.Invoke(new() + /// { + /// Group = "my/example/group", + /// }); + /// + /// var stagingVars = GitLab.GetGroupVariables.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Group = "my/example/group", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetGroupVariablesArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroupVariables:getGroupVariables", args ?? new GetGroupVariablesArgs(), options.WithDefaults()); @@ -23,6 +51,34 @@ public static Task InvokeAsync(GetGroupVariablesArgs ar /// The `gitlab.getGroupVariables` data source allows to retrieve all group-level CI/CD variables. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vars = GitLab.GetGroupVariables.Invoke(new() + /// { + /// Group = "my/example/group", + /// }); + /// + /// var stagingVars = GitLab.GetGroupVariables.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Group = "my/example/group", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetGroupVariablesInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroupVariables:getGroupVariables", args ?? new GetGroupVariablesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetGroups.cs b/sdk/dotnet/GetGroups.cs index f6bbd3265..2c93e2af8 100644 --- a/sdk/dotnet/GetGroups.cs +++ b/sdk/dotnet/GetGroups.cs @@ -19,6 +19,34 @@ public static class GetGroups /// > Some available options require administrator privileges. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetGroups.Invoke(new() + /// { + /// OrderBy = "name", + /// Sort = "desc", + /// }); + /// + /// var example_two = GitLab.GetGroups.Invoke(new() + /// { + /// Search = "GitLab", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetGroupsArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroups:getGroups", args ?? new GetGroupsArgs(), options.WithDefaults()); @@ -31,6 +59,34 @@ public static Task InvokeAsync(GetGroupsArgs? args = null, Invo /// > Some available options require administrator privileges. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetGroups.Invoke(new() + /// { + /// OrderBy = "name", + /// Sort = "desc", + /// }); + /// + /// var example_two = GitLab.GetGroups.Invoke(new() + /// { + /// Search = "GitLab", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetGroupsInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroups:getGroups", args ?? new GetGroupsInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetInstanceDeployKeys.cs b/sdk/dotnet/GetInstanceDeployKeys.cs index 07dce810e..29f3ca745 100644 --- a/sdk/dotnet/GetInstanceDeployKeys.cs +++ b/sdk/dotnet/GetInstanceDeployKeys.cs @@ -17,6 +17,28 @@ public static class GetInstanceDeployKeys /// > This data source requires administration privileges. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetInstanceDeployKeys.Invoke(new() + /// { + /// Public = true, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetInstanceDeployKeysArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getInstanceDeployKeys:getInstanceDeployKeys", args ?? new GetInstanceDeployKeysArgs(), options.WithDefaults()); @@ -27,6 +49,28 @@ public static Task InvokeAsync(GetInstanceDeployKey /// > This data source requires administration privileges. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetInstanceDeployKeys.Invoke(new() + /// { + /// Public = true, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetInstanceDeployKeysInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getInstanceDeployKeys:getInstanceDeployKeys", args ?? new GetInstanceDeployKeysInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetInstanceVariable.cs b/sdk/dotnet/GetInstanceVariable.cs index 060e9c273..f8afa5dfd 100644 --- a/sdk/dotnet/GetInstanceVariable.cs +++ b/sdk/dotnet/GetInstanceVariable.cs @@ -15,6 +15,28 @@ public static class GetInstanceVariable /// The `gitlab.InstanceVariable` data source allows to retrieve details about an instance-level CI/CD variable. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetInstanceVariable.Invoke(new() + /// { + /// Key = "foo", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetInstanceVariableArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getInstanceVariable:getInstanceVariable", args ?? new GetInstanceVariableArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetInstanceVariableArg /// The `gitlab.InstanceVariable` data source allows to retrieve details about an instance-level CI/CD variable. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetInstanceVariable.Invoke(new() + /// { + /// Key = "foo", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetInstanceVariableInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getInstanceVariable:getInstanceVariable", args ?? new GetInstanceVariableInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetInstanceVariables.cs b/sdk/dotnet/GetInstanceVariables.cs index 3f1d80a13..6c82eaf73 100644 --- a/sdk/dotnet/GetInstanceVariables.cs +++ b/sdk/dotnet/GetInstanceVariables.cs @@ -15,6 +15,25 @@ public static class GetInstanceVariables /// The `gitlab.getInstanceVariables` data source allows to retrieve all instance-level CI/CD variables. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vars = GitLab.GetInstanceVariables.Invoke(); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getInstanceVariables:getInstanceVariables", InvokeArgs.Empty, options.WithDefaults()); @@ -23,6 +42,25 @@ public static Task InvokeAsync(InvokeOptions? option /// The `gitlab.getInstanceVariables` data source allows to retrieve all instance-level CI/CD variables. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vars = GitLab.GetInstanceVariables.Invoke(); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getInstanceVariables:getInstanceVariables", InvokeArgs.Empty, options.WithDefaults()); diff --git a/sdk/dotnet/GetMetadata.cs b/sdk/dotnet/GetMetadata.cs index cff57d7f0..e69836e92 100644 --- a/sdk/dotnet/GetMetadata.cs +++ b/sdk/dotnet/GetMetadata.cs @@ -15,6 +15,25 @@ public static class GetMetadata /// The `gitlab.getMetadata` data source retrieves the metadata of the GitLab instance. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var @this = GitLab.GetMetadata.Invoke(); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getMetadata:getMetadata", InvokeArgs.Empty, options.WithDefaults()); @@ -23,6 +42,25 @@ public static Task InvokeAsync(InvokeOptions? options = null) /// The `gitlab.getMetadata` data source retrieves the metadata of the GitLab instance. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var @this = GitLab.GetMetadata.Invoke(); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getMetadata:getMetadata", InvokeArgs.Empty, options.WithDefaults()); diff --git a/sdk/dotnet/GetProject.cs b/sdk/dotnet/GetProject.cs index 5f97019a7..2eb18c898 100644 --- a/sdk/dotnet/GetProject.cs +++ b/sdk/dotnet/GetProject.cs @@ -15,6 +15,28 @@ public static class GetProject /// The `gitlab.Project` data source allows details of a project to be retrieved by either its ID or its path with namespace. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProject.Invoke(new() + /// { + /// PathWithNamespace = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProject:getProject", args ?? new GetProjectArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetProjectArgs? args = null, In /// The `gitlab.Project` data source allows details of a project to be retrieved by either its ID or its path with namespace. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProject.Invoke(new() + /// { + /// PathWithNamespace = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProject:getProject", args ?? new GetProjectInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectBranches.cs b/sdk/dotnet/GetProjectBranches.cs index 157262af9..92099e872 100644 --- a/sdk/dotnet/GetProjectBranches.cs +++ b/sdk/dotnet/GetProjectBranches.cs @@ -15,6 +15,28 @@ public static class GetProjectBranches /// The `gitlab.getProjectBranches` data source allows details of the branches of a given project to be retrieved. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectBranches.Invoke(new() + /// { + /// Project = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectBranchesArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectBranches:getProjectBranches", args ?? new GetProjectBranchesArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetProjectBranchesArgs /// The `gitlab.getProjectBranches` data source allows details of the branches of a given project to be retrieved. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectBranches.Invoke(new() + /// { + /// Project = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectBranchesInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectBranches:getProjectBranches", args ?? new GetProjectBranchesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectHook.cs b/sdk/dotnet/GetProjectHook.cs index 11fdfd9dc..e4370851c 100644 --- a/sdk/dotnet/GetProjectHook.cs +++ b/sdk/dotnet/GetProjectHook.cs @@ -15,6 +15,34 @@ public static class GetProjectHook /// The `gitlab.ProjectHook` data source allows to retrieve details about a hook in a project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleProject = GitLab.GetProject.Invoke(new() + /// { + /// Id = "foo/bar/baz", + /// }); + /// + /// var exampleProjectHook = GitLab.GetProjectHook.Invoke(new() + /// { + /// Project = exampleProject.Apply(getProjectResult => getProjectResult.Id), + /// HookId = 1, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectHookArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectHook:getProjectHook", args ?? new GetProjectHookArgs(), options.WithDefaults()); @@ -23,6 +51,34 @@ public static Task InvokeAsync(GetProjectHookArgs args, In /// The `gitlab.ProjectHook` data source allows to retrieve details about a hook in a project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleProject = GitLab.GetProject.Invoke(new() + /// { + /// Id = "foo/bar/baz", + /// }); + /// + /// var exampleProjectHook = GitLab.GetProjectHook.Invoke(new() + /// { + /// Project = exampleProject.Apply(getProjectResult => getProjectResult.Id), + /// HookId = 1, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectHookInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectHook:getProjectHook", args ?? new GetProjectHookInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectHooks.cs b/sdk/dotnet/GetProjectHooks.cs index 665958223..2e311b1ae 100644 --- a/sdk/dotnet/GetProjectHooks.cs +++ b/sdk/dotnet/GetProjectHooks.cs @@ -15,6 +15,33 @@ public static class GetProjectHooks /// The `gitlab.getProjectHooks` data source allows to retrieve details about hooks in a project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProject.Invoke(new() + /// { + /// Id = "foo/bar/baz", + /// }); + /// + /// var examples = GitLab.GetProjectHooks.Invoke(new() + /// { + /// Project = example.Apply(getProjectResult => getProjectResult.Id), + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectHooksArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectHooks:getProjectHooks", args ?? new GetProjectHooksArgs(), options.WithDefaults()); @@ -23,6 +50,33 @@ public static Task InvokeAsync(GetProjectHooksArgs args, /// The `gitlab.getProjectHooks` data source allows to retrieve details about hooks in a project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProject.Invoke(new() + /// { + /// Id = "foo/bar/baz", + /// }); + /// + /// var examples = GitLab.GetProjectHooks.Invoke(new() + /// { + /// Project = example.Apply(getProjectResult => getProjectResult.Id), + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectHooksInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectHooks:getProjectHooks", args ?? new GetProjectHooksInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectIssue.cs b/sdk/dotnet/GetProjectIssue.cs index 412e9b0fa..0481e0647 100644 --- a/sdk/dotnet/GetProjectIssue.cs +++ b/sdk/dotnet/GetProjectIssue.cs @@ -15,6 +15,38 @@ public static class GetProjectIssue /// The `gitlab.ProjectIssue` data source allows to retrieve details about an issue in a project. /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProject.Invoke(new() + /// { + /// PathWithNamespace = "foo/bar/baz", + /// }); + /// + /// var welcomeIssue = GitLab.GetProjectIssue.Invoke(new() + /// { + /// Project = foo.Apply(getProjectResult => getProjectResult.Id), + /// Iid = 1, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["welcomeIssueWebUrl"] = data.Gitlab_project_issue.Web_url, + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectIssueArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectIssue:getProjectIssue", args ?? new GetProjectIssueArgs(), options.WithDefaults()); @@ -23,6 +55,38 @@ public static Task InvokeAsync(GetProjectIssueArgs args, /// The `gitlab.ProjectIssue` data source allows to retrieve details about an issue in a project. /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProject.Invoke(new() + /// { + /// PathWithNamespace = "foo/bar/baz", + /// }); + /// + /// var welcomeIssue = GitLab.GetProjectIssue.Invoke(new() + /// { + /// Project = foo.Apply(getProjectResult => getProjectResult.Id), + /// Iid = 1, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["welcomeIssueWebUrl"] = data.Gitlab_project_issue.Web_url, + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectIssueInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectIssue:getProjectIssue", args ?? new GetProjectIssueInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectIssues.cs b/sdk/dotnet/GetProjectIssues.cs index 05a48ab06..97ec4d808 100644 --- a/sdk/dotnet/GetProjectIssues.cs +++ b/sdk/dotnet/GetProjectIssues.cs @@ -15,6 +15,34 @@ public static class GetProjectIssues /// The `gitlab.getProjectIssues` data source allows to retrieve details about issues in a project. /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProject.Invoke(new() + /// { + /// Id = "foo/bar/baz", + /// }); + /// + /// var allWithFoo = GitLab.GetProjectIssues.Invoke(new() + /// { + /// Project = foo.Apply(getProjectResult => getProjectResult.Id), + /// Search = "foo", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectIssuesArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectIssues:getProjectIssues", args ?? new GetProjectIssuesArgs(), options.WithDefaults()); @@ -23,6 +51,34 @@ public static Task InvokeAsync(GetProjectIssuesArgs args /// The `gitlab.getProjectIssues` data source allows to retrieve details about issues in a project. /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProject.Invoke(new() + /// { + /// Id = "foo/bar/baz", + /// }); + /// + /// var allWithFoo = GitLab.GetProjectIssues.Invoke(new() + /// { + /// Project = foo.Apply(getProjectResult => getProjectResult.Id), + /// Search = "foo", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectIssuesInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectIssues:getProjectIssues", args ?? new GetProjectIssuesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectMembership.cs b/sdk/dotnet/GetProjectMembership.cs index 9d1cb392a..0eda11b63 100644 --- a/sdk/dotnet/GetProjectMembership.cs +++ b/sdk/dotnet/GetProjectMembership.cs @@ -17,6 +17,29 @@ public static class GetProjectMembership /// > **Note** exactly one of project_id or full_path must be provided. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectMembership.Invoke(new() + /// { + /// Inherited = true, + /// ProjectId = 123, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectMembershipArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectMembership:getProjectMembership", args ?? new GetProjectMembershipArgs(), options.WithDefaults()); @@ -27,6 +50,29 @@ public static Task InvokeAsync(GetProjectMembershipA /// > **Note** exactly one of project_id or full_path must be provided. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectMembership.Invoke(new() + /// { + /// Inherited = true, + /// ProjectId = 123, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectMembershipInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectMembership:getProjectMembership", args ?? new GetProjectMembershipInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectMilestone.cs b/sdk/dotnet/GetProjectMilestone.cs index a368ddd6e..77b93d989 100644 --- a/sdk/dotnet/GetProjectMilestone.cs +++ b/sdk/dotnet/GetProjectMilestone.cs @@ -15,6 +15,29 @@ public static class GetProjectMilestone /// The `gitlab.ProjectMilestone` data source allows get details of a project milestone. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectMilestone.Invoke(new() + /// { + /// MilestoneId = 10, + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectMilestoneArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectMilestone:getProjectMilestone", args ?? new GetProjectMilestoneArgs(), options.WithDefaults()); @@ -23,6 +46,29 @@ public static Task InvokeAsync(GetProjectMilestoneArg /// The `gitlab.ProjectMilestone` data source allows get details of a project milestone. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectMilestone.Invoke(new() + /// { + /// MilestoneId = 10, + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectMilestoneInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectMilestone:getProjectMilestone", args ?? new GetProjectMilestoneInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectMilestones.cs b/sdk/dotnet/GetProjectMilestones.cs index 1b7be2cb9..76d911833 100644 --- a/sdk/dotnet/GetProjectMilestones.cs +++ b/sdk/dotnet/GetProjectMilestones.cs @@ -15,6 +15,28 @@ public static class GetProjectMilestones /// The `gitlab.getProjectMilestones` data source allows get details of a project milestones. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectMilestones.Invoke(new() + /// { + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectMilestonesArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectMilestones:getProjectMilestones", args ?? new GetProjectMilestonesArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetProjectMilestonesA /// The `gitlab.getProjectMilestones` data source allows get details of a project milestones. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectMilestones.Invoke(new() + /// { + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectMilestonesInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectMilestones:getProjectMilestones", args ?? new GetProjectMilestonesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectProtectedBranch.cs b/sdk/dotnet/GetProjectProtectedBranch.cs index 7fb8d6cb8..667ac104b 100644 --- a/sdk/dotnet/GetProjectProtectedBranch.cs +++ b/sdk/dotnet/GetProjectProtectedBranch.cs @@ -15,6 +15,29 @@ public static class GetProjectProtectedBranch /// The `gitlab_protected_branch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectProtectedBranch.Invoke(new() + /// { + /// Name = "main", + /// ProjectId = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectProtectedBranchArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectProtectedBranch:getProjectProtectedBranch", args ?? new GetProjectProtectedBranchArgs(), options.WithDefaults()); @@ -23,6 +46,29 @@ public static Task InvokeAsync(GetProjectProtec /// The `gitlab_protected_branch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectProtectedBranch.Invoke(new() + /// { + /// Name = "main", + /// ProjectId = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectProtectedBranchInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectProtectedBranch:getProjectProtectedBranch", args ?? new GetProjectProtectedBranchInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectProtectedBranches.cs b/sdk/dotnet/GetProjectProtectedBranches.cs index 0f58fe4f6..d53002a6c 100644 --- a/sdk/dotnet/GetProjectProtectedBranches.cs +++ b/sdk/dotnet/GetProjectProtectedBranches.cs @@ -15,6 +15,28 @@ public static class GetProjectProtectedBranches /// The `gitlab.getProjectProtectedBranches` data source allows details of the protected branches of a given project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectProtectedBranches.Invoke(new() + /// { + /// ProjectId = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectProtectedBranchesArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectProtectedBranches:getProjectProtectedBranches", args ?? new GetProjectProtectedBranchesArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetProjectProt /// The `gitlab.getProjectProtectedBranches` data source allows details of the protected branches of a given project. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectProtectedBranches.Invoke(new() + /// { + /// ProjectId = "foo/bar/baz", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectProtectedBranchesInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectProtectedBranches:getProjectProtectedBranches", args ?? new GetProjectProtectedBranchesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectTag.cs b/sdk/dotnet/GetProjectTag.cs index b35020f98..923ff4614 100644 --- a/sdk/dotnet/GetProjectTag.cs +++ b/sdk/dotnet/GetProjectTag.cs @@ -15,6 +15,29 @@ public static class GetProjectTag /// The `gitlab.ProjectTag` data source allows details of a project tag to be retrieved by its name. /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProjectTag.Invoke(new() + /// { + /// Name = "example", + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectTagArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectTag:getProjectTag", args ?? new GetProjectTagArgs(), options.WithDefaults()); @@ -23,6 +46,29 @@ public static Task InvokeAsync(GetProjectTagArgs args, Invo /// The `gitlab.ProjectTag` data source allows details of a project tag to be retrieved by its name. /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProjectTag.Invoke(new() + /// { + /// Name = "example", + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectTagInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectTag:getProjectTag", args ?? new GetProjectTagInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectTags.cs b/sdk/dotnet/GetProjectTags.cs index ea551d1f6..bfb996823 100644 --- a/sdk/dotnet/GetProjectTags.cs +++ b/sdk/dotnet/GetProjectTags.cs @@ -15,6 +15,28 @@ public static class GetProjectTags /// The `gitlab.getProjectTags` data source allows details of project tags to be retrieved by some search criteria. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectTags.Invoke(new() + /// { + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectTagsArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectTags:getProjectTags", args ?? new GetProjectTagsArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetProjectTagsArgs args, In /// The `gitlab.getProjectTags` data source allows details of project tags to be retrieved by some search criteria. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetProjectTags.Invoke(new() + /// { + /// Project = "foo/bar", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectTagsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectTags:getProjectTags", args ?? new GetProjectTagsInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectVariable.cs b/sdk/dotnet/GetProjectVariable.cs index 93746e432..a979de0d9 100644 --- a/sdk/dotnet/GetProjectVariable.cs +++ b/sdk/dotnet/GetProjectVariable.cs @@ -15,6 +15,36 @@ public static class GetProjectVariable /// The `gitlab.ProjectVariable` data source allows to retrieve details about a project-level CI/CD variable. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProjectVariable.Invoke(new() + /// { + /// Key = "foo", + /// Project = "my/example/project", + /// }); + /// + /// var bar = GitLab.GetProjectVariable.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Key = "bar", + /// Project = "my/example/project", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectVariableArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectVariable:getProjectVariable", args ?? new GetProjectVariableArgs(), options.WithDefaults()); @@ -23,6 +53,36 @@ public static Task InvokeAsync(GetProjectVariableArgs /// The `gitlab.ProjectVariable` data source allows to retrieve details about a project-level CI/CD variable. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = GitLab.GetProjectVariable.Invoke(new() + /// { + /// Key = "foo", + /// Project = "my/example/project", + /// }); + /// + /// var bar = GitLab.GetProjectVariable.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Key = "bar", + /// Project = "my/example/project", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectVariableInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectVariable:getProjectVariable", args ?? new GetProjectVariableInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjectVariables.cs b/sdk/dotnet/GetProjectVariables.cs index e34fa964e..c1a4ce4a3 100644 --- a/sdk/dotnet/GetProjectVariables.cs +++ b/sdk/dotnet/GetProjectVariables.cs @@ -15,6 +15,34 @@ public static class GetProjectVariables /// The `gitlab.getProjectVariables` data source allows to retrieve all project-level CI/CD variables. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vars = GitLab.GetProjectVariables.Invoke(new() + /// { + /// Project = "my/example/project", + /// }); + /// + /// var stagingVars = GitLab.GetProjectVariables.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Project = "my/example/project", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectVariablesArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectVariables:getProjectVariables", args ?? new GetProjectVariablesArgs(), options.WithDefaults()); @@ -23,6 +51,34 @@ public static Task InvokeAsync(GetProjectVariablesArg /// The `gitlab.getProjectVariables` data source allows to retrieve all project-level CI/CD variables. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vars = GitLab.GetProjectVariables.Invoke(new() + /// { + /// Project = "my/example/project", + /// }); + /// + /// var stagingVars = GitLab.GetProjectVariables.Invoke(new() + /// { + /// EnvironmentScope = "staging/*", + /// Project = "my/example/project", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectVariablesInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectVariables:getProjectVariables", args ?? new GetProjectVariablesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetProjects.cs b/sdk/dotnet/GetProjects.cs index 2b6a9d233..2f7b5683e 100644 --- a/sdk/dotnet/GetProjects.cs +++ b/sdk/dotnet/GetProjects.cs @@ -19,6 +19,42 @@ public static class GetProjects /// > The owner sub-attributes are only populated if the Gitlab token used has an administrator scope. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var mygroup = GitLab.GetGroup.Invoke(new() + /// { + /// FullPath = "mygroup", + /// }); + /// + /// var groupProjects = GitLab.GetProjects.Invoke(new() + /// { + /// GroupId = mygroup.Apply(getGroupResult => getGroupResult.Id), + /// OrderBy = "name", + /// IncludeSubgroups = true, + /// WithShared = false, + /// }); + /// + /// var projects = GitLab.GetProjects.Invoke(new() + /// { + /// Search = "postgresql", + /// Visibility = "private", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetProjectsArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjects:getProjects", args ?? new GetProjectsArgs(), options.WithDefaults()); @@ -31,6 +67,42 @@ public static Task InvokeAsync(GetProjectsArgs? args = null, /// > The owner sub-attributes are only populated if the Gitlab token used has an administrator scope. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var mygroup = GitLab.GetGroup.Invoke(new() + /// { + /// FullPath = "mygroup", + /// }); + /// + /// var groupProjects = GitLab.GetProjects.Invoke(new() + /// { + /// GroupId = mygroup.Apply(getGroupResult => getGroupResult.Id), + /// OrderBy = "name", + /// IncludeSubgroups = true, + /// WithShared = false, + /// }); + /// + /// var projects = GitLab.GetProjects.Invoke(new() + /// { + /// Search = "postgresql", + /// Visibility = "private", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetProjectsInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjects:getProjects", args ?? new GetProjectsInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetReleaseLink.cs b/sdk/dotnet/GetReleaseLink.cs index 0a17a0e93..79169c0d7 100644 --- a/sdk/dotnet/GetReleaseLink.cs +++ b/sdk/dotnet/GetReleaseLink.cs @@ -15,6 +15,30 @@ public static class GetReleaseLink /// The `gitlab.ReleaseLink` data source allows get details of a release link. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetReleaseLink.Invoke(new() + /// { + /// LinkId = 11, + /// Project = "foo/bar", + /// TagName = "v1.0.1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetReleaseLinkArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getReleaseLink:getReleaseLink", args ?? new GetReleaseLinkArgs(), options.WithDefaults()); @@ -23,6 +47,30 @@ public static Task InvokeAsync(GetReleaseLinkArgs args, In /// The `gitlab.ReleaseLink` data source allows get details of a release link. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetReleaseLink.Invoke(new() + /// { + /// LinkId = 11, + /// Project = "foo/bar", + /// TagName = "v1.0.1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetReleaseLinkInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getReleaseLink:getReleaseLink", args ?? new GetReleaseLinkInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetReleaseLinks.cs b/sdk/dotnet/GetReleaseLinks.cs index b48b222ae..3b43408ab 100644 --- a/sdk/dotnet/GetReleaseLinks.cs +++ b/sdk/dotnet/GetReleaseLinks.cs @@ -15,6 +15,29 @@ public static class GetReleaseLinks /// The `gitlab.getReleaseLinks` data source allows get details of release links. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetReleaseLinks.Invoke(new() + /// { + /// Project = "foo/bar", + /// TagName = "v1.0.1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetReleaseLinksArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getReleaseLinks:getReleaseLinks", args ?? new GetReleaseLinksArgs(), options.WithDefaults()); @@ -23,6 +46,29 @@ public static Task InvokeAsync(GetReleaseLinksArgs args, /// The `gitlab.getReleaseLinks` data source allows get details of release links. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetReleaseLinks.Invoke(new() + /// { + /// Project = "foo/bar", + /// TagName = "v1.0.1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetReleaseLinksInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getReleaseLinks:getReleaseLinks", args ?? new GetReleaseLinksInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetRepositoryFile.cs b/sdk/dotnet/GetRepositoryFile.cs index ac9565d37..83871872c 100644 --- a/sdk/dotnet/GetRepositoryFile.cs +++ b/sdk/dotnet/GetRepositoryFile.cs @@ -15,6 +15,30 @@ public static class GetRepositoryFile /// The `gitlab.RepositoryFile` data source allows details of a file in a repository to be retrieved. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetRepositoryFile.Invoke(new() + /// { + /// FilePath = "README.md", + /// Project = "example", + /// Ref = "main", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetRepositoryFileArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getRepositoryFile:getRepositoryFile", args ?? new GetRepositoryFileArgs(), options.WithDefaults()); @@ -23,6 +47,30 @@ public static Task InvokeAsync(GetRepositoryFileArgs ar /// The `gitlab.RepositoryFile` data source allows details of a file in a repository to be retrieved. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetRepositoryFile.Invoke(new() + /// { + /// FilePath = "README.md", + /// Project = "example", + /// Ref = "main", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetRepositoryFileInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getRepositoryFile:getRepositoryFile", args ?? new GetRepositoryFileInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetRepositoryTree.cs b/sdk/dotnet/GetRepositoryTree.cs index a08cfc05a..cc587ed0e 100644 --- a/sdk/dotnet/GetRepositoryTree.cs +++ b/sdk/dotnet/GetRepositoryTree.cs @@ -15,6 +15,31 @@ public static class GetRepositoryTree /// The `gitlab.getRepositoryTree` data source allows details of directories and files in a repository to be retrieved. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var @this = GitLab.GetRepositoryTree.Invoke(new() + /// { + /// Path = "ExampleSubFolder", + /// Project = "example", + /// Recursive = true, + /// Ref = "main", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetRepositoryTreeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getRepositoryTree:getRepositoryTree", args ?? new GetRepositoryTreeArgs(), options.WithDefaults()); @@ -23,6 +48,31 @@ public static Task InvokeAsync(GetRepositoryTreeArgs ar /// The `gitlab.getRepositoryTree` data source allows details of directories and files in a repository to be retrieved. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var @this = GitLab.GetRepositoryTree.Invoke(new() + /// { + /// Path = "ExampleSubFolder", + /// Project = "example", + /// Recursive = true, + /// Ref = "main", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetRepositoryTreeInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getRepositoryTree:getRepositoryTree", args ?? new GetRepositoryTreeInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetUsers.cs b/sdk/dotnet/GetUsers.cs index 89f90948c..642f5c18f 100644 --- a/sdk/dotnet/GetUsers.cs +++ b/sdk/dotnet/GetUsers.cs @@ -19,6 +19,35 @@ public static class GetUsers /// > Some available options require administrator privileges. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetUsers.Invoke(new() + /// { + /// CreatedBefore = "2019-01-01", + /// OrderBy = "name", + /// Sort = "desc", + /// }); + /// + /// var example_two = GitLab.GetUsers.Invoke(new() + /// { + /// Search = "username", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetUsersArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getUsers:getUsers", args ?? new GetUsersArgs(), options.WithDefaults()); @@ -31,6 +60,35 @@ public static Task InvokeAsync(GetUsersArgs? args = null, Invoke /// > Some available options require administrator privileges. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = GitLab.GetUsers.Invoke(new() + /// { + /// CreatedBefore = "2019-01-01", + /// OrderBy = "name", + /// Sort = "desc", + /// }); + /// + /// var example_two = GitLab.GetUsers.Invoke(new() + /// { + /// Search = "username", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetUsersInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getUsers:getUsers", args ?? new GetUsersInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/Group.cs b/sdk/dotnet/Group.cs index 61c5051c0..f478d8bdb 100644 --- a/sdk/dotnet/Group.cs +++ b/sdk/dotnet/Group.cs @@ -16,6 +16,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleGroup = new GitLab.Group("exampleGroup", new() + /// { + /// Path = "example", + /// Description = "An example group", + /// }); + /// + /// // Create a project in the example group + /// var exampleProject = new GitLab.Project("exampleProject", new() + /// { + /// Description = "An example project", + /// NamespaceId = exampleGroup.Id, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// ```sh diff --git a/sdk/dotnet/GroupAccessToken.cs b/sdk/dotnet/GroupAccessToken.cs index dbad74329..73c452fd8 100644 --- a/sdk/dotnet/GroupAccessToken.cs +++ b/sdk/dotnet/GroupAccessToken.cs @@ -16,6 +16,37 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleGroupAccessToken = new GitLab.GroupAccessToken("exampleGroupAccessToken", new() + /// { + /// Group = "25", + /// ExpiresAt = "2020-03-14", + /// AccessLevel = "developer", + /// Scopes = new[] + /// { + /// "api", + /// }, + /// }); + /// + /// var exampleGroupVariable = new GitLab.GroupVariable("exampleGroupVariable", new() + /// { + /// Group = "25", + /// Key = "gat", + /// Value = exampleGroupAccessToken.Token, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A GitLab Group Access Token can be imported using a key composed of `<group-id>:<token-id>`, e.g. diff --git a/sdk/dotnet/GroupBadge.cs b/sdk/dotnet/GroupBadge.cs index 1c94d3ae6..8563ab9a9 100644 --- a/sdk/dotnet/GroupBadge.cs +++ b/sdk/dotnet/GroupBadge.cs @@ -14,6 +14,52 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.Group("foo"); + /// + /// var example = new GitLab.GroupBadge("example", new() + /// { + /// Group = foo.Id, + /// LinkUrl = "https://example.com/badge-123", + /// ImageUrl = "https://example.com/badge-123.svg", + /// }); + /// + /// // Pipeline status badges with placeholders will be enabled for each project + /// var gitlabPipeline = new GitLab.GroupBadge("gitlabPipeline", new() + /// { + /// Group = foo.Id, + /// LinkUrl = "https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + /// ImageUrl = "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg", + /// }); + /// + /// // Test coverage report badges with placeholders will be enabled for each project + /// var gitlabCoverage = new GitLab.GroupBadge("gitlabCoverage", new() + /// { + /// Group = foo.Id, + /// LinkUrl = "https://gitlab.example.com/%{project_path}/-/jobs", + /// ImageUrl = "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg", + /// }); + /// + /// // Latest release badges with placeholders will be enabled for each project + /// var gitlabRelease = new GitLab.GroupBadge("gitlabRelease", new() + /// { + /// Group = foo.Id, + /// LinkUrl = "https://gitlab.example.com/%{project_path}/-/releases", + /// ImageUrl = "https://gitlab.example.com/%{project_path}/-/badges/release.svg", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab group badges can be imported using an id made up of `{group_id}:{badge_id}`, e.g. diff --git a/sdk/dotnet/GroupCluster.cs b/sdk/dotnet/GroupCluster.cs index 73908a21b..637f38333 100644 --- a/sdk/dotnet/GroupCluster.cs +++ b/sdk/dotnet/GroupCluster.cs @@ -16,6 +16,37 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_clusters.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.Group("foo", new() + /// { + /// Path = "foo-path", + /// }); + /// + /// var bar = new GitLab.GroupCluster("bar", new() + /// { + /// Group = foo.Id, + /// Domain = "example.com", + /// Enabled = true, + /// KubernetesApiUrl = "https://124.124.124", + /// KubernetesToken = "some-token", + /// KubernetesCaCert = "some-cert", + /// KubernetesAuthorizationType = "rbac", + /// EnvironmentScope = "*", + /// ManagementProjectId = "123456", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab group clusters can be imported using an id made up of `groupid:clusterid`, e.g. diff --git a/sdk/dotnet/GroupCustomAttribute.cs b/sdk/dotnet/GroupCustomAttribute.cs index ff979de1f..bf8eb2d8e 100644 --- a/sdk/dotnet/GroupCustomAttribute.cs +++ b/sdk/dotnet/GroupCustomAttribute.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var attr = new GitLab.GroupCustomAttribute("attr", new() + /// { + /// Group = 42, + /// Key = "location", + /// Value = "Greenland", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a group custom attribute using the an id made up of `{group-id}:{key}`, e.g. diff --git a/sdk/dotnet/GroupEpicBoard.cs b/sdk/dotnet/GroupEpicBoard.cs index 8c638f466..ce01f147b 100644 --- a/sdk/dotnet/GroupEpicBoard.cs +++ b/sdk/dotnet/GroupEpicBoard.cs @@ -16,6 +16,49 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_boards.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.Group("example", new() + /// { + /// Path = "test_group", + /// Description = "An example group", + /// }); + /// + /// var label1 = new GitLab.GroupLabel("label1", new() + /// { + /// Group = example.Id, + /// Color = "#FF0000", + /// }); + /// + /// var label3 = new GitLab.GroupLabel("label3", new() + /// { + /// Group = example.Id, + /// Color = "#003000", + /// }); + /// + /// var epicBoard = new GitLab.GroupEpicBoard("epicBoard", new() + /// { + /// Group = example.Path, + /// Lists = new[] + /// { + /// new GitLab.Inputs.GroupEpicBoardListArgs + /// { + /// LabelId = label1.LabelId, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import this resource with an id made up of `{group-id}:{epic-board-id}`, e.g. diff --git a/sdk/dotnet/GroupHook.cs b/sdk/dotnet/GroupHook.cs index 8daaa2210..425b62449 100644 --- a/sdk/dotnet/GroupHook.cs +++ b/sdk/dotnet/GroupHook.cs @@ -14,6 +14,49 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.GroupHook("example", new() + /// { + /// Group = "example/hooked", + /// MergeRequestsEvents = true, + /// Url = "https://example.com/hook/example", + /// }); + /// + /// // Setting all attributes + /// var allAttributes = new GitLab.GroupHook("allAttributes", new() + /// { + /// ConfidentialIssuesEvents = false, + /// ConfidentialNoteEvents = true, + /// DeploymentEvents = true, + /// EnableSslVerification = false, + /// Group = "1", + /// IssuesEvents = false, + /// JobEvents = true, + /// MergeRequestsEvents = true, + /// NoteEvents = true, + /// PipelineEvents = true, + /// PushEvents = true, + /// PushEventsBranchFilter = "devel", + /// ReleasesEvents = true, + /// SubgroupEvents = true, + /// TagPushEvents = true, + /// Token = "supersecret", + /// Url = "http://example.com", + /// WikiPageEvents = true, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A GitLab Group Hook can be imported using a key composed of `<group-id>:<hook-id>`, e.g. diff --git a/sdk/dotnet/GroupLabel.cs b/sdk/dotnet/GroupLabel.cs index b182b3776..29cf2821b 100644 --- a/sdk/dotnet/GroupLabel.cs +++ b/sdk/dotnet/GroupLabel.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/labels.html#group-labels) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var fixme = new GitLab.GroupLabel("fixme", new() + /// { + /// Color = "#ffcc00", + /// Description = "issue with failing tests", + /// Group = "example", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab group labels can be imported using an id made up of `{group_id}:{group_label_id}`, e.g. diff --git a/sdk/dotnet/GroupMembership.cs b/sdk/dotnet/GroupMembership.cs index 4af474418..d9b5a1096 100644 --- a/sdk/dotnet/GroupMembership.cs +++ b/sdk/dotnet/GroupMembership.cs @@ -16,6 +16,27 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new GitLab.GroupMembership("test", new() + /// { + /// AccessLevel = "guest", + /// ExpiresAt = "2020-12-31", + /// GroupId = "12345", + /// UserId = 1337, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab group membership can be imported using an id made up of `group_id:user_id`, e.g. diff --git a/sdk/dotnet/GroupProjectFileTemplate.cs b/sdk/dotnet/GroupProjectFileTemplate.cs index 81d1ce152..9377b9929 100644 --- a/sdk/dotnet/GroupProjectFileTemplate.cs +++ b/sdk/dotnet/GroupProjectFileTemplate.cs @@ -19,6 +19,38 @@ namespace Pulumi.GitLab /// > This resource requires a GitLab Enterprise instance with a Premium license. /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#update-group) + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.Group("foo", new() + /// { + /// Path = "group", + /// Description = "An example group", + /// }); + /// + /// var bar = new GitLab.Project("bar", new() + /// { + /// Description = "contains file templates", + /// VisibilityLevel = "public", + /// NamespaceId = foo.Id, + /// }); + /// + /// var templateLink = new GitLab.GroupProjectFileTemplate("templateLink", new() + /// { + /// GroupId = foo.Id, + /// FileTemplateProjectId = bar.Id, + /// }); + /// + /// }); + /// ``` /// [GitLabResourceType("gitlab:index/groupProjectFileTemplate:GroupProjectFileTemplate")] public partial class GroupProjectFileTemplate : global::Pulumi.CustomResource diff --git a/sdk/dotnet/GroupSamlLink.cs b/sdk/dotnet/GroupSamlLink.cs index 86824cb7e..50fc176b3 100644 --- a/sdk/dotnet/GroupSamlLink.cs +++ b/sdk/dotnet/GroupSamlLink.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#saml-group-links) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new GitLab.GroupSamlLink("test", new() + /// { + /// AccessLevel = "developer", + /// Group = "12345", + /// SamlGroupName = "samlgroupname1", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab group saml links can be imported using an id made up of `group_id:saml_group_name`, e.g. diff --git a/sdk/dotnet/GroupShareGroup.cs b/sdk/dotnet/GroupShareGroup.cs index c0d91d92f..953ef09d4 100644 --- a/sdk/dotnet/GroupShareGroup.cs +++ b/sdk/dotnet/GroupShareGroup.cs @@ -14,6 +14,27 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#share-groups-with-groups) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new GitLab.GroupShareGroup("test", new() + /// { + /// GroupId = gitlab_group.Foo.Id, + /// ShareGroupId = gitlab_group.Bar.Id, + /// GroupAccess = "guest", + /// ExpiresAt = "2099-01-01", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab group shares can be imported using an id made up of `mainGroupId:shareGroupId`, e.g. diff --git a/sdk/dotnet/GroupVariable.cs b/sdk/dotnet/GroupVariable.cs index 83ebc1e42..f1a0ede51 100644 --- a/sdk/dotnet/GroupVariable.cs +++ b/sdk/dotnet/GroupVariable.cs @@ -14,6 +14,29 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.GroupVariable("example", new() + /// { + /// EnvironmentScope = "*", + /// Group = "12345", + /// Key = "group_variable_key", + /// Masked = false, + /// Protected = false, + /// Value = "group_variable_value", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab group variables can be imported using an id made up of `groupid:variablename:scope`, e.g. diff --git a/sdk/dotnet/InstanceCluster.cs b/sdk/dotnet/InstanceCluster.cs index 017234b86..ef412c081 100644 --- a/sdk/dotnet/InstanceCluster.cs +++ b/sdk/dotnet/InstanceCluster.cs @@ -16,6 +16,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_clusters.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var bar = new GitLab.InstanceCluster("bar", new() + /// { + /// Domain = "example.com", + /// Enabled = true, + /// EnvironmentScope = "*", + /// KubernetesApiUrl = "https://124.124.124", + /// KubernetesAuthorizationType = "rbac", + /// KubernetesCaCert = "some-cert", + /// KubernetesNamespace = "namespace", + /// KubernetesToken = "some-token", + /// ManagementProjectId = "123456", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab instance clusters can be imported using a `clusterid`, e.g. diff --git a/sdk/dotnet/InstanceVariable.cs b/sdk/dotnet/InstanceVariable.cs index 981e899e5..2786ce79c 100644 --- a/sdk/dotnet/InstanceVariable.cs +++ b/sdk/dotnet/InstanceVariable.cs @@ -14,6 +14,27 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.InstanceVariable("example", new() + /// { + /// Key = "instance_variable_key", + /// Masked = false, + /// Protected = false, + /// Value = "instance_variable_value", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab instance variables can be imported using an id made up of `variablename`, e.g. diff --git a/sdk/dotnet/IntegrationCustomIssueTracker.cs b/sdk/dotnet/IntegrationCustomIssueTracker.cs index a19d5bbf6..9550c420a 100644 --- a/sdk/dotnet/IntegrationCustomIssueTracker.cs +++ b/sdk/dotnet/IntegrationCustomIssueTracker.cs @@ -14,6 +14,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var tracker = new GitLab.IntegrationCustomIssueTracker("tracker", new() + /// { + /// Project = awesomeProject.Id, + /// ProjectUrl = "https://customtracker.com/issues", + /// IssuesUrl = "https://customtracker.com/TEST-:id", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationEmailsOnPush.cs b/sdk/dotnet/IntegrationEmailsOnPush.cs index 9b3dfccbb..5c4414577 100644 --- a/sdk/dotnet/IntegrationEmailsOnPush.cs +++ b/sdk/dotnet/IntegrationEmailsOnPush.cs @@ -14,6 +14,31 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var emails = new GitLab.IntegrationEmailsOnPush("emails", new() + /// { + /// Project = awesomeProject.Id, + /// Recipients = "myrecipient@example.com myotherrecipient@example.com", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_emails_on_push state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationExternalWiki.cs b/sdk/dotnet/IntegrationExternalWiki.cs index ee40feed6..65f186a12 100644 --- a/sdk/dotnet/IntegrationExternalWiki.cs +++ b/sdk/dotnet/IntegrationExternalWiki.cs @@ -14,6 +14,31 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var wiki = new GitLab.IntegrationExternalWiki("wiki", new() + /// { + /// Project = awesomeProject.Id, + /// ExternalWikiUrl = "https://MyAwesomeExternalWikiURL.com", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_external_wiki state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationGithub.cs b/sdk/dotnet/IntegrationGithub.cs index d42702f50..3f6f83365 100644 --- a/sdk/dotnet/IntegrationGithub.cs +++ b/sdk/dotnet/IntegrationGithub.cs @@ -16,6 +16,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var github = new GitLab.IntegrationGithub("github", new() + /// { + /// Project = awesomeProject.Id, + /// Token = "REDACTED", + /// RepositoryUrl = "https://github.com/gitlabhq/terraform-provider-gitlab", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// ```sh diff --git a/sdk/dotnet/IntegrationJira.cs b/sdk/dotnet/IntegrationJira.cs index ae16b0fb4..0ece8b3ac 100644 --- a/sdk/dotnet/IntegrationJira.cs +++ b/sdk/dotnet/IntegrationJira.cs @@ -14,6 +14,33 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var jira = new GitLab.IntegrationJira("jira", new() + /// { + /// Project = awesomeProject.Id, + /// Url = "https://jira.example.com", + /// Username = "user", + /// Password = "mypass", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_jira state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationMattermost.cs b/sdk/dotnet/IntegrationMattermost.cs index 9efe59fdb..05d96e4d9 100644 --- a/sdk/dotnet/IntegrationMattermost.cs +++ b/sdk/dotnet/IntegrationMattermost.cs @@ -14,6 +14,34 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#mattermost-notifications) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var mattermost = new GitLab.IntegrationMattermost("mattermost", new() + /// { + /// Project = awesomeProject.Id, + /// Webhook = "https://webhook.com", + /// Username = "myuser", + /// PushEvents = true, + /// PushChannel = "push_chan", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_mattermost.mattermost state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationMicrosoftTeams.cs b/sdk/dotnet/IntegrationMicrosoftTeams.cs index 427db0ae7..6702c761a 100644 --- a/sdk/dotnet/IntegrationMicrosoftTeams.cs +++ b/sdk/dotnet/IntegrationMicrosoftTeams.cs @@ -14,6 +14,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var teams = new GitLab.IntegrationMicrosoftTeams("teams", new() + /// { + /// Project = awesomeProject.Id, + /// Webhook = "https://testurl.com/?token=XYZ", + /// PushEvents = true, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_microsoft_teams state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationPipelinesEmail.cs b/sdk/dotnet/IntegrationPipelinesEmail.cs index 5cd540a97..37fa1bc5d 100644 --- a/sdk/dotnet/IntegrationPipelinesEmail.cs +++ b/sdk/dotnet/IntegrationPipelinesEmail.cs @@ -14,6 +14,36 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var email = new GitLab.IntegrationPipelinesEmail("email", new() + /// { + /// Project = awesomeProject.Id, + /// Recipients = new[] + /// { + /// "gitlab@user.create", + /// }, + /// NotifyOnlyBrokenPipelines = true, + /// BranchesToBeNotified = "all", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_pipelines_email state using the project ID, e.g. diff --git a/sdk/dotnet/IntegrationSlack.cs b/sdk/dotnet/IntegrationSlack.cs index 883efa013..beb65f339 100644 --- a/sdk/dotnet/IntegrationSlack.cs +++ b/sdk/dotnet/IntegrationSlack.cs @@ -14,6 +14,34 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var slack = new GitLab.IntegrationSlack("slack", new() + /// { + /// Project = awesomeProject.Id, + /// Webhook = "https://webhook.com", + /// Username = "myuser", + /// PushEvents = true, + /// PushChannel = "push_chan", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_integration_slack.slack state using the project ID, e.g. diff --git a/sdk/dotnet/PagesDomain.cs b/sdk/dotnet/PagesDomain.cs index 461af0aab..6e6d06409 100644 --- a/sdk/dotnet/PagesDomain.cs +++ b/sdk/dotnet/PagesDomain.cs @@ -14,6 +14,37 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pages_domains.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.IO; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Example using auto_ssl_enabled, which uses lets encrypt to generate a certificate + /// var thisPagesDomain = new GitLab.PagesDomain("thisPagesDomain", new() + /// { + /// Project = "123", + /// Domain = "example.com", + /// AutoSslEnabled = true, + /// }); + /// + /// // Example using a manually generated certificate and key + /// var thisIndex_pagesDomainPagesDomain = new GitLab.PagesDomain("thisIndex/pagesDomainPagesDomain", new() + /// { + /// Project = "123", + /// Domain = "example.com", + /// Key = File.ReadAllText($"{path.Module}/key.pem"), + /// Certificate = File.ReadAllText($"{path.Module}/cert.pem"), + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab pages domain can be imported using an id made up of `projectId:domain` _without_ the http protocol, e.g. diff --git a/sdk/dotnet/PersonalAccessToken.cs b/sdk/dotnet/PersonalAccessToken.cs index a3dcf9d65..1a321cd82 100644 --- a/sdk/dotnet/PersonalAccessToken.cs +++ b/sdk/dotnet/PersonalAccessToken.cs @@ -16,6 +16,36 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/personal_access_tokens.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var examplePersonalAccessToken = new GitLab.PersonalAccessToken("examplePersonalAccessToken", new() + /// { + /// UserId = 25, + /// ExpiresAt = "2020-03-14", + /// Scopes = new[] + /// { + /// "api", + /// }, + /// }); + /// + /// var exampleProjectVariable = new GitLab.ProjectVariable("exampleProjectVariable", new() + /// { + /// Project = gitlab_project.Example.Id, + /// Key = "pat", + /// Value = examplePersonalAccessToken.Token, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A GitLab Personal Access Token can be imported using a key composed of `<user-id>:<token-id>`, e.g. diff --git a/sdk/dotnet/PipelineSchedule.cs b/sdk/dotnet/PipelineSchedule.cs index 563acc860..216e5fe23 100644 --- a/sdk/dotnet/PipelineSchedule.cs +++ b/sdk/dotnet/PipelineSchedule.cs @@ -14,6 +14,27 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.PipelineSchedule("example", new() + /// { + /// Cron = "0 1 * * *", + /// Description = "Used to schedule builds", + /// Project = "12345", + /// Ref = "master", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab pipeline schedules can be imported using an id made up of `{project_id}:{pipeline_schedule_id}`, e.g. diff --git a/sdk/dotnet/PipelineScheduleVariable.cs b/sdk/dotnet/PipelineScheduleVariable.cs index 22c22a53f..c27fb9005 100644 --- a/sdk/dotnet/PipelineScheduleVariable.cs +++ b/sdk/dotnet/PipelineScheduleVariable.cs @@ -14,6 +14,35 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html#pipeline-schedule-variables) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var examplePipelineSchedule = new GitLab.PipelineSchedule("examplePipelineSchedule", new() + /// { + /// Project = "12345", + /// Description = "Used to schedule builds", + /// Ref = "master", + /// Cron = "0 1 * * *", + /// }); + /// + /// var examplePipelineScheduleVariable = new GitLab.PipelineScheduleVariable("examplePipelineScheduleVariable", new() + /// { + /// Project = examplePipelineSchedule.Project, + /// PipelineScheduleId = examplePipelineSchedule.PipelineScheduleId, + /// Key = "EXAMPLE_KEY", + /// Value = "example", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Pipeline schedule variables can be imported using an id made up of `project_id:pipeline_schedule_id:key`, e.g. diff --git a/sdk/dotnet/PipelineTrigger.cs b/sdk/dotnet/PipelineTrigger.cs index 85c2447e5..68f952eb7 100644 --- a/sdk/dotnet/PipelineTrigger.cs +++ b/sdk/dotnet/PipelineTrigger.cs @@ -14,6 +14,25 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_triggers.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.PipelineTrigger("example", new() + /// { + /// Description = "Used to trigger builds", + /// Project = "12345", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab pipeline triggers can be imported using an id made up of `{project_id}:{pipeline_trigger_id}`, e.g. diff --git a/sdk/dotnet/Project.cs b/sdk/dotnet/Project.cs index eea4d41d7..3000ab3d7 100644 --- a/sdk/dotnet/Project.cs +++ b/sdk/dotnet/Project.cs @@ -10,6 +10,102 @@ namespace Pulumi.GitLab { /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.Project("example", new() + /// { + /// Description = "My awesome codebase", + /// VisibilityLevel = "public", + /// }); + /// + /// // Project with custom push rules + /// var example_two = new GitLab.Project("example-two", new() + /// { + /// PushRules = new GitLab.Inputs.ProjectPushRulesArgs + /// { + /// AuthorEmailRegex = "@example\\.com$", + /// CommitCommitterCheck = true, + /// MemberCheck = true, + /// PreventSecrets = true, + /// }, + /// }); + /// + /// var peterParker = GitLab.GetUser.Invoke(new() + /// { + /// Username = "peter_parker", + /// }); + /// + /// var petersRepo = new GitLab.Project("petersRepo", new() + /// { + /// Description = "This is a description", + /// NamespaceId = peterParker.Apply(getUserResult => getUserResult.NamespaceId), + /// }); + /// + /// // Fork a project + /// var forkProject = new GitLab.Project("forkProject", new() + /// { + /// Description = "This is a fork", + /// ForkedFromProjectId = example.Id, + /// }); + /// + /// // Fork a project and setup a pull mirror + /// var forkIndex_projectProject = new GitLab.Project("forkIndex/projectProject", new() + /// { + /// Description = "This is a fork", + /// ForkedFromProjectId = example.Id, + /// ImportUrl = example.HttpUrlToRepo, + /// Mirror = true, + /// }); + /// + /// // Create a project by importing it from a public project + /// var importPublic = new GitLab.Project("importPublic", new() + /// { + /// ImportUrl = "https://gitlab.example.com/repo.git", + /// }); + /// + /// // Create a project by importing it from a public project and setup the pull mirror + /// var importPublicWithMirror = new GitLab.Project("importPublicWithMirror", new() + /// { + /// ImportUrl = "https://gitlab.example.com/repo.git", + /// Mirror = true, + /// }); + /// + /// // Create a project by importing it from a private project + /// var importPrivateProject = new GitLab.Project("importPrivateProject", new() + /// { + /// ImportUrl = "https://gitlab.example.com/repo.git", + /// ImportUrlUsername = "user", + /// ImportUrlPassword = "pass", + /// }); + /// + /// // Create a project by importing it from a private project and setup the pull mirror + /// var importPrivateWithMirror = new GitLab.Project("importPrivateWithMirror", new() + /// { + /// ImportUrl = "https://gitlab.example.com/repo.git", + /// ImportUrlUsername = "user", + /// ImportUrlPassword = "pass", + /// Mirror = true, + /// }); + /// + /// // Create a project by importing it from a private project and provide credentials in `import_url` + /// // NOTE: only use this if you really must, use `import_url_username` and `import_url_password` whenever possible + /// // GitLab API will always return the `import_url` without credentials, therefore you must ignore the `import_url` for changes: + /// var importPrivateIndex_projectProject = new GitLab.Project("importPrivateIndex/projectProject", new() + /// { + /// ImportUrl = "https://user:pass@gitlab.example.com/repo.git", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// ```sh diff --git a/sdk/dotnet/ProjectAccessToken.cs b/sdk/dotnet/ProjectAccessToken.cs index 79c296e68..95051a500 100644 --- a/sdk/dotnet/ProjectAccessToken.cs +++ b/sdk/dotnet/ProjectAccessToken.cs @@ -14,6 +14,37 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/project_access_tokens.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleProjectAccessToken = new GitLab.ProjectAccessToken("exampleProjectAccessToken", new() + /// { + /// Project = "25", + /// ExpiresAt = "2020-03-14", + /// AccessLevel = "reporter", + /// Scopes = new[] + /// { + /// "api", + /// }, + /// }); + /// + /// var exampleProjectVariable = new GitLab.ProjectVariable("exampleProjectVariable", new() + /// { + /// Project = gitlab_project.Example.Id, + /// Key = "pat", + /// Value = exampleProjectAccessToken.Token, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A GitLab Project Access Token can be imported using a key composed of `<project-id>:<token-id>`, e.g. diff --git a/sdk/dotnet/ProjectBadge.cs b/sdk/dotnet/ProjectBadge.cs index 676bc8455..25c680bf7 100644 --- a/sdk/dotnet/ProjectBadge.cs +++ b/sdk/dotnet/ProjectBadge.cs @@ -14,6 +14,52 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#project-badges) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.Project("foo"); + /// + /// var example = new GitLab.ProjectBadge("example", new() + /// { + /// Project = foo.Id, + /// LinkUrl = "https://example.com/badge-123", + /// ImageUrl = "https://example.com/badge-123.svg", + /// }); + /// + /// // Pipeline status badges with placeholders will be enabled + /// var gitlabPipeline = new GitLab.ProjectBadge("gitlabPipeline", new() + /// { + /// Project = foo.Id, + /// LinkUrl = "https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + /// ImageUrl = "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg", + /// }); + /// + /// // Test coverage report badges with placeholders will be enabled + /// var gitlabCoverage = new GitLab.ProjectBadge("gitlabCoverage", new() + /// { + /// Project = foo.Id, + /// LinkUrl = "https://gitlab.example.com/%{project_path}/-/jobs", + /// ImageUrl = "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg", + /// }); + /// + /// // Latest release badges with placeholders will be enabled + /// var gitlabRelease = new GitLab.ProjectBadge("gitlabRelease", new() + /// { + /// Project = foo.Id, + /// LinkUrl = "https://gitlab.example.com/%{project_path}/-/releases", + /// ImageUrl = "https://gitlab.example.com/%{project_path}/-/badges/release.svg", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project badges can be imported using an id made up of `{project_id}:{badge_id}`, e.g. diff --git a/sdk/dotnet/ProjectCluster.cs b/sdk/dotnet/ProjectCluster.cs index d856cb512..b19a6035e 100644 --- a/sdk/dotnet/ProjectCluster.cs +++ b/sdk/dotnet/ProjectCluster.cs @@ -16,6 +16,35 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_clusters.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.Project("foo"); + /// + /// var bar = new GitLab.ProjectCluster("bar", new() + /// { + /// Project = foo.Id, + /// Domain = "example.com", + /// Enabled = true, + /// KubernetesApiUrl = "https://124.124.124", + /// KubernetesToken = "some-token", + /// KubernetesCaCert = "some-cert", + /// KubernetesNamespace = "namespace", + /// KubernetesAuthorizationType = "rbac", + /// EnvironmentScope = "*", + /// ManagementProjectId = "123456", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g. diff --git a/sdk/dotnet/ProjectComplianceFramework.cs b/sdk/dotnet/ProjectComplianceFramework.cs index 551e77c15..68dcad8ac 100644 --- a/sdk/dotnet/ProjectComplianceFramework.cs +++ b/sdk/dotnet/ProjectComplianceFramework.cs @@ -16,6 +16,34 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sampleComplianceFramework = new GitLab.ComplianceFramework("sampleComplianceFramework", new() + /// { + /// NamespacePath = "top-level-group", + /// Description = "A HIPAA Compliance Framework", + /// Color = "#87BEEF", + /// Default = false, + /// PipelineConfigurationFullPath = ".hipaa.yml@top-level-group/compliance-frameworks", + /// }); + /// + /// var sampleProjectComplianceFramework = new GitLab.ProjectComplianceFramework("sampleProjectComplianceFramework", new() + /// { + /// ComplianceFrameworkId = sampleComplianceFramework.FrameworkId, + /// Project = "12345678", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab project compliance frameworks can be imported with a key composed of `<project_id>`, e.g. diff --git a/sdk/dotnet/ProjectCustomAttribute.cs b/sdk/dotnet/ProjectCustomAttribute.cs index ce5c49a39..2ab8686a4 100644 --- a/sdk/dotnet/ProjectCustomAttribute.cs +++ b/sdk/dotnet/ProjectCustomAttribute.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var attr = new GitLab.ProjectCustomAttribute("attr", new() + /// { + /// Key = "location", + /// Project = 42, + /// Value = "Greenland", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a project custom attribute using an id made up of `{project-id}:{key}`, e.g. diff --git a/sdk/dotnet/ProjectEnvironment.cs b/sdk/dotnet/ProjectEnvironment.cs index a023a3e2d..c80b814b6 100644 --- a/sdk/dotnet/ProjectEnvironment.cs +++ b/sdk/dotnet/ProjectEnvironment.cs @@ -10,6 +10,37 @@ namespace Pulumi.GitLab { /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var thisGroup = new GitLab.Group("thisGroup", new() + /// { + /// Path = "example", + /// Description = "An example group", + /// }); + /// + /// var thisProject = new GitLab.Project("thisProject", new() + /// { + /// NamespaceId = thisGroup.Id, + /// InitializeWithReadme = true, + /// }); + /// + /// var thisProjectEnvironment = new GitLab.ProjectEnvironment("thisProjectEnvironment", new() + /// { + /// Project = thisProject.Id, + /// ExternalUrl = "www.example.com", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project environments can be imported using an id made up of `projectId:environmenId`, e.g. diff --git a/sdk/dotnet/ProjectFreezePeriod.cs b/sdk/dotnet/ProjectFreezePeriod.cs index 64e1332a1..9fbe60376 100644 --- a/sdk/dotnet/ProjectFreezePeriod.cs +++ b/sdk/dotnet/ProjectFreezePeriod.cs @@ -14,6 +14,27 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/freeze_periods.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var schedule = new GitLab.ProjectFreezePeriod("schedule", new() + /// { + /// Project = gitlab_project.Foo.Id, + /// FreezeStart = "0 23 * * 5", + /// FreezeEnd = "0 7 * * 1", + /// CronTimezone = "UTC", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project freeze periods can be imported using an id made up of `project_id:freeze_period_id`, e.g. diff --git a/sdk/dotnet/ProjectHook.cs b/sdk/dotnet/ProjectHook.cs index 12ba7ae9d..08a6de3b9 100644 --- a/sdk/dotnet/ProjectHook.cs +++ b/sdk/dotnet/ProjectHook.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#hooks) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.ProjectHook("example", new() + /// { + /// MergeRequestsEvents = true, + /// Project = "example/hooked", + /// Url = "https://example.com/hook/example", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A GitLab Project Hook can be imported using a key composed of `<project-id>:<hook-id>`, e.g. diff --git a/sdk/dotnet/ProjectIssue.cs b/sdk/dotnet/ProjectIssue.cs index ef9af7e00..25b468965 100644 --- a/sdk/dotnet/ProjectIssue.cs +++ b/sdk/dotnet/ProjectIssue.cs @@ -10,6 +10,39 @@ namespace Pulumi.GitLab { /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.Project("foo", new() + /// { + /// Description = "Lorem Ipsum", + /// VisibilityLevel = "public", + /// }); + /// + /// var welcomeIssue = new GitLab.ProjectIssue("welcomeIssue", new() + /// { + /// Project = foo.Id, + /// Title = "Welcome!", + /// Description = foo.Name.Apply(name => @$" Welcome to the {name} project! + /// + /// "), + /// DiscussionLocked = true, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["welcomeIssueWebUrl"] = data.Gitlab_project_issue.Web_url, + /// }; + /// }); + /// ``` + /// /// ## Import /// /// You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g. diff --git a/sdk/dotnet/ProjectLabel.cs b/sdk/dotnet/ProjectLabel.cs index b47aab252..e333be6fd 100644 --- a/sdk/dotnet/ProjectLabel.cs +++ b/sdk/dotnet/ProjectLabel.cs @@ -14,6 +14,34 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/labels.html#project-labels) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var fixme = new GitLab.ProjectLabel("fixme", new() + /// { + /// Project = "example", + /// Description = "issue with failing tests", + /// Color = "#ffcc00", + /// }); + /// + /// // Scoped label + /// var devopsCreate = new GitLab.ProjectLabel("devopsCreate", new() + /// { + /// Project = gitlab_project.Example.Id, + /// Description = "issue for creating infrastructure resources", + /// Color = "#ffa500", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab Project labels can be imported using an id made up of `{project_id}:{group_label_id}`, e.g. diff --git a/sdk/dotnet/ProjectLevelMrApprovals.cs b/sdk/dotnet/ProjectLevelMrApprovals.cs index 131ffe3a4..997733b52 100644 --- a/sdk/dotnet/ProjectLevelMrApprovals.cs +++ b/sdk/dotnet/ProjectLevelMrApprovals.cs @@ -16,6 +16,33 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var fooProject = new GitLab.Project("fooProject", new() + /// { + /// Description = "My example project", + /// }); + /// + /// var fooProjectLevelMrApprovals = new GitLab.ProjectLevelMrApprovals("fooProjectLevelMrApprovals", new() + /// { + /// Project = fooProject.Id, + /// ResetApprovalsOnPush = true, + /// DisableOverridingApproversPerMergeRequest = false, + /// MergeRequestsAuthorApproval = false, + /// MergeRequestsDisableCommittersApproval = true, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// ```sh diff --git a/sdk/dotnet/ProjectMembership.cs b/sdk/dotnet/ProjectMembership.cs index 87e681e09..6c26b6f37 100644 --- a/sdk/dotnet/ProjectMembership.cs +++ b/sdk/dotnet/ProjectMembership.cs @@ -16,6 +16,34 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new GitLab.ProjectMembership("test", new() + /// { + /// AccessLevel = "guest", + /// Project = "12345", + /// UserId = 1337, + /// }); + /// + /// var example = new GitLab.ProjectMembership("example", new() + /// { + /// AccessLevel = "guest", + /// ExpiresAt = "2022-12-31", + /// Project = "67890", + /// UserId = 1234, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project membership can be imported using an id made up of `project_id:user_id`, e.g. diff --git a/sdk/dotnet/ProjectMilestone.cs b/sdk/dotnet/ProjectMilestone.cs index 60ff93285..b91facbd2 100644 --- a/sdk/dotnet/ProjectMilestone.cs +++ b/sdk/dotnet/ProjectMilestone.cs @@ -14,6 +14,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create a project for the milestone to use + /// var exampleProject = new GitLab.Project("exampleProject", new() + /// { + /// Description = "An example project", + /// NamespaceId = gitlab_group.Example.Id, + /// }); + /// + /// var exampleProjectMilestone = new GitLab.ProjectMilestone("exampleProjectMilestone", new() + /// { + /// Project = exampleProject.Id, + /// Title = "example", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab project milestone can be imported with a key composed of `<project>:<milestone_id>`, e.g. diff --git a/sdk/dotnet/ProjectMirror.cs b/sdk/dotnet/ProjectMirror.cs index 26b808ab5..059d7d574 100644 --- a/sdk/dotnet/ProjectMirror.cs +++ b/sdk/dotnet/ProjectMirror.cs @@ -25,6 +25,25 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/remote_mirrors.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.ProjectMirror("foo", new() + /// { + /// Project = "1", + /// Url = "https://username:password@github.com/org/repository.git", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project mirror can be imported using an id made up of `project_id:mirror_id`, e.g. diff --git a/sdk/dotnet/ProjectRunnerEnablement.cs b/sdk/dotnet/ProjectRunnerEnablement.cs index b0827b071..24f32f41f 100644 --- a/sdk/dotnet/ProjectRunnerEnablement.cs +++ b/sdk/dotnet/ProjectRunnerEnablement.cs @@ -14,6 +14,25 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#enable-a-runner-in-project) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var foo = new GitLab.ProjectRunnerEnablement("foo", new() + /// { + /// Project = "5", + /// RunnerId = 7, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project runners can be imported using an id made up of `project:runner_id`, e.g. diff --git a/sdk/dotnet/ProjectShareGroup.cs b/sdk/dotnet/ProjectShareGroup.cs index 883481f6a..6fd575f4e 100644 --- a/sdk/dotnet/ProjectShareGroup.cs +++ b/sdk/dotnet/ProjectShareGroup.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#share-project-with-group) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new GitLab.ProjectShareGroup("test", new() + /// { + /// GroupAccess = "guest", + /// GroupId = 1337, + /// Project = "12345", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project group shares can be imported using an id made up of `projectid:groupid`, e.g. diff --git a/sdk/dotnet/ProjectTag.cs b/sdk/dotnet/ProjectTag.cs index eb60b06cd..b355b4aeb 100644 --- a/sdk/dotnet/ProjectTag.cs +++ b/sdk/dotnet/ProjectTag.cs @@ -14,6 +14,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create a project for the tag to use + /// var exampleProject = new GitLab.Project("exampleProject", new() + /// { + /// Description = "An example project", + /// NamespaceId = gitlab_group.Example.Id, + /// }); + /// + /// var exampleProjectTag = new GitLab.ProjectTag("exampleProjectTag", new() + /// { + /// Ref = "main", + /// Project = exampleProject.Id, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab project tags can be imported with a key composed of `<project_id>:<tag_name>`, e.g. diff --git a/sdk/dotnet/ProjectVariable.cs b/sdk/dotnet/ProjectVariable.cs index 2f6023f17..cba70fbfb 100644 --- a/sdk/dotnet/ProjectVariable.cs +++ b/sdk/dotnet/ProjectVariable.cs @@ -16,6 +16,27 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.ProjectVariable("example", new() + /// { + /// Key = "project_variable_key", + /// Project = "12345", + /// Protected = false, + /// Value = "project_variable_value", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// GitLab project variables can be imported using an id made up of `project:key:environment_scope`, e.g. diff --git a/sdk/dotnet/ReleaseLink.cs b/sdk/dotnet/ReleaseLink.cs index 1639c2ef7..6311ecb60 100644 --- a/sdk/dotnet/ReleaseLink.cs +++ b/sdk/dotnet/ReleaseLink.cs @@ -14,6 +14,33 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create a project + /// var exampleProject = new GitLab.Project("exampleProject", new() + /// { + /// Description = "An example project", + /// }); + /// + /// // Can create release link only to a tag associated with a release + /// var exampleReleaseLink = new GitLab.ReleaseLink("exampleReleaseLink", new() + /// { + /// Project = exampleProject.Id, + /// TagName = "tag_name_associated_with_release", + /// Url = "https://test/", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Gitlab release link can be imported with a key composed of `<project>:<tag_name>:<link_id>`, e.g. diff --git a/sdk/dotnet/Runner.cs b/sdk/dotnet/Runner.cs index fc3d92617..7431dc70a 100644 --- a/sdk/dotnet/Runner.cs +++ b/sdk/dotnet/Runner.cs @@ -20,6 +20,82 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// using Local = Pulumi.Local; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Basic GitLab Group Runner + /// var myGroup = new GitLab.Group("myGroup", new() + /// { + /// Description = "group that holds the runners", + /// }); + /// + /// var basicRunner = new GitLab.Runner("basicRunner", new() + /// { + /// RegistrationToken = myGroup.RunnersToken, + /// }); + /// + /// // GitLab Runner that runs only tagged jobs + /// var taggedOnly = new GitLab.Runner("taggedOnly", new() + /// { + /// RegistrationToken = myGroup.RunnersToken, + /// Description = "I only run tagged jobs", + /// RunUntagged = false, + /// TagLists = new[] + /// { + /// "tag_one", + /// "tag_two", + /// }, + /// }); + /// + /// // GitLab Runner that only runs on protected branches + /// var @protected = new GitLab.Runner("protected", new() + /// { + /// RegistrationToken = myGroup.RunnersToken, + /// Description = "I only run protected jobs", + /// AccessLevel = "ref_protected", + /// }); + /// + /// // Generate a `config.toml` file that you can use to create a runner + /// // This is the typical workflow for this resource, using it to create an authentication_token which can then be used + /// // to generate the `config.toml` file to prevent re-registering the runner every time new hardware is created. + /// var myCustomGroup = new GitLab.Group("myCustomGroup", new() + /// { + /// Description = "group that holds the custom runners", + /// }); + /// + /// var myRunner = new GitLab.Runner("myRunner", new() + /// { + /// RegistrationToken = myCustomGroup.RunnersToken, + /// }); + /// + /// // This creates a configuration for a local "shell" runner, but can be changed to generate whatever is needed. + /// // Place this configuration file on a server at `/etc/gitlab-runner/config.toml`, then run `gitlab-runner start`. + /// // See https://docs.gitlab.com/runner/configuration/advanced-configuration.html for more information. + /// var config = new Local.File("config", new() + /// { + /// Filename = $"{path.Module}/config.toml", + /// Content = myRunner.AuthenticationToken.Apply(authenticationToken => @$" concurrent = 1 + /// + /// [[runners]] + /// name = ""Hello Terraform"" + /// url = ""https://example.gitlab.com/"" + /// token = ""{authenticationToken}"" + /// executor = ""shell"" + /// + /// "), + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// A GitLab Runner can be imported using the runner's ID, eg diff --git a/sdk/dotnet/ServiceCustomIssueTracker.cs b/sdk/dotnet/ServiceCustomIssueTracker.cs index e168d674b..304545848 100644 --- a/sdk/dotnet/ServiceCustomIssueTracker.cs +++ b/sdk/dotnet/ServiceCustomIssueTracker.cs @@ -16,6 +16,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var tracker = new GitLab.ServiceCustomIssueTracker("tracker", new() + /// { + /// Project = awesomeProject.Id, + /// ProjectUrl = "https://customtracker.com/issues", + /// IssuesUrl = "https://customtracker.com/TEST-:id", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/dotnet/ServiceEmailsOnPush.cs b/sdk/dotnet/ServiceEmailsOnPush.cs index 33fc752d7..f808aa996 100644 --- a/sdk/dotnet/ServiceEmailsOnPush.cs +++ b/sdk/dotnet/ServiceEmailsOnPush.cs @@ -16,6 +16,31 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var emails = new GitLab.ServiceEmailsOnPush("emails", new() + /// { + /// Project = awesomeProject.Id, + /// Recipients = "myrecipient@example.com myotherrecipient@example.com", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_emails_on_push state using the project ID, e.g. diff --git a/sdk/dotnet/ServiceExternalWiki.cs b/sdk/dotnet/ServiceExternalWiki.cs index 2b50a6ea9..712031212 100644 --- a/sdk/dotnet/ServiceExternalWiki.cs +++ b/sdk/dotnet/ServiceExternalWiki.cs @@ -16,6 +16,31 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var wiki = new GitLab.ServiceExternalWiki("wiki", new() + /// { + /// Project = awesomeProject.Id, + /// ExternalWikiUrl = "https://MyAwesomeExternalWikiURL.com", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_external_wiki state using the project ID, e.g. diff --git a/sdk/dotnet/ServiceGithub.cs b/sdk/dotnet/ServiceGithub.cs index 0299e64a7..8e28117d6 100644 --- a/sdk/dotnet/ServiceGithub.cs +++ b/sdk/dotnet/ServiceGithub.cs @@ -18,6 +18,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var github = new GitLab.ServiceGithub("github", new() + /// { + /// Project = awesomeProject.Id, + /// Token = "REDACTED", + /// RepositoryUrl = "https://github.com/gitlabhq/terraform-provider-gitlab", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// ```sh diff --git a/sdk/dotnet/ServiceJira.cs b/sdk/dotnet/ServiceJira.cs index 89306da43..a9a9669c3 100644 --- a/sdk/dotnet/ServiceJira.cs +++ b/sdk/dotnet/ServiceJira.cs @@ -16,6 +16,33 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var jira = new GitLab.ServiceJira("jira", new() + /// { + /// Project = awesomeProject.Id, + /// Url = "https://jira.example.com", + /// Username = "user", + /// Password = "mypass", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_jira state using the project ID, e.g. diff --git a/sdk/dotnet/ServiceMicrosoftTeams.cs b/sdk/dotnet/ServiceMicrosoftTeams.cs index 40454287e..97a75c298 100644 --- a/sdk/dotnet/ServiceMicrosoftTeams.cs +++ b/sdk/dotnet/ServiceMicrosoftTeams.cs @@ -16,6 +16,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var teams = new GitLab.ServiceMicrosoftTeams("teams", new() + /// { + /// Project = awesomeProject.Id, + /// Webhook = "https://testurl.com/?token=XYZ", + /// PushEvents = true, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_microsoft_teams state using the project ID, e.g. diff --git a/sdk/dotnet/ServicePipelinesEmail.cs b/sdk/dotnet/ServicePipelinesEmail.cs index 17dc597fa..76d3df8ea 100644 --- a/sdk/dotnet/ServicePipelinesEmail.cs +++ b/sdk/dotnet/ServicePipelinesEmail.cs @@ -16,6 +16,36 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var email = new GitLab.ServicePipelinesEmail("email", new() + /// { + /// Project = awesomeProject.Id, + /// Recipients = new[] + /// { + /// "gitlab@user.create", + /// }, + /// NotifyOnlyBrokenPipelines = true, + /// BranchesToBeNotified = "all", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_pipelines_email state using the project ID, e.g. diff --git a/sdk/dotnet/ServiceSlack.cs b/sdk/dotnet/ServiceSlack.cs index 7239ed1cd..d2ea2075a 100644 --- a/sdk/dotnet/ServiceSlack.cs +++ b/sdk/dotnet/ServiceSlack.cs @@ -16,6 +16,34 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var awesomeProject = new GitLab.Project("awesomeProject", new() + /// { + /// Description = "My awesome project.", + /// VisibilityLevel = "public", + /// }); + /// + /// var slack = new GitLab.ServiceSlack("slack", new() + /// { + /// Project = awesomeProject.Id, + /// Webhook = "https://webhook.com", + /// Username = "myuser", + /// PushEvents = true, + /// PushChannel = "push_chan", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a gitlab_service_slack.slack state using the project ID, e.g. diff --git a/sdk/dotnet/SystemHook.cs b/sdk/dotnet/SystemHook.cs index f06d9d99a..1d59037d5 100644 --- a/sdk/dotnet/SystemHook.cs +++ b/sdk/dotnet/SystemHook.cs @@ -16,6 +16,30 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/system_hooks.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.SystemHook("example", new() + /// { + /// EnableSslVerification = true, + /// MergeRequestsEvents = true, + /// PushEvents = true, + /// RepositoryUpdateEvents = true, + /// TagPushEvents = true, + /// Token = "secret-token", + /// Url = "https://example.com/hook-%d", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a system hook using the hook id `{hook-id}`, e.g. diff --git a/sdk/dotnet/TagProtection.cs b/sdk/dotnet/TagProtection.cs index 5ca915d6a..69f195031 100644 --- a/sdk/dotnet/TagProtection.cs +++ b/sdk/dotnet/TagProtection.cs @@ -10,6 +10,37 @@ namespace Pulumi.GitLab { /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var tagProtect = new GitLab.TagProtection("tagProtect", new() + /// { + /// AllowedToCreates = new[] + /// { + /// new GitLab.Inputs.TagProtectionAllowedToCreateArgs + /// { + /// UserId = 42, + /// }, + /// new GitLab.Inputs.TagProtectionAllowedToCreateArgs + /// { + /// GroupId = 43, + /// }, + /// }, + /// CreateAccessLevel = "developer", + /// Project = "12345", + /// Tag = "TagProtected", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// Tag protections can be imported using an id made up of `project_id:tag_name`, e.g. diff --git a/sdk/dotnet/User.cs b/sdk/dotnet/User.cs index b3a68ad79..8d46ba08d 100644 --- a/sdk/dotnet/User.cs +++ b/sdk/dotnet/User.cs @@ -18,6 +18,31 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new GitLab.User("example", new() + /// { + /// CanCreateGroup = false, + /// Email = "gitlab@user.create", + /// IsAdmin = true, + /// IsExternal = true, + /// Password = "superPassword", + /// ProjectsLimit = 4, + /// ResetPassword = false, + /// Username = "example", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// ```sh diff --git a/sdk/dotnet/UserCustomAttribute.cs b/sdk/dotnet/UserCustomAttribute.cs index 2e4be085a..d0e8a748f 100644 --- a/sdk/dotnet/UserCustomAttribute.cs +++ b/sdk/dotnet/UserCustomAttribute.cs @@ -14,6 +14,26 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var attr = new GitLab.UserCustomAttribute("attr", new() + /// { + /// Key = "location", + /// User = 42, + /// Value = "Greenland", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a user custom attribute using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/dotnet/UserGpgKey.cs b/sdk/dotnet/UserGpgKey.cs index 0cd0cdb96..c1e28fffd 100644 --- a/sdk/dotnet/UserGpgKey.cs +++ b/sdk/dotnet/UserGpgKey.cs @@ -16,6 +16,41 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html#get-a-specific-gpg-key) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleUser = GitLab.GetUser.Invoke(new() + /// { + /// Username = "example-user", + /// }); + /// + /// // Manages a GPG key for the specified user. An admin token is required if `user_id` is specified. + /// var exampleUserGpgKey = new GitLab.UserGpgKey("exampleUserGpgKey", new() + /// { + /// UserId = exampleUser.Apply(getUserResult => getUserResult.Id), + /// Key = @"-----BEGIN PGP PUBLIC KEY BLOCK----- + /// ... + /// -----END PGP PUBLIC KEY BLOCK-----", + /// }); + /// + /// // Manages a GPG key for the current user + /// var exampleUserUserGpgKey = new GitLab.UserGpgKey("exampleUserUserGpgKey", new() + /// { + /// Key = @"-----BEGIN PGP PUBLIC KEY BLOCK----- + /// ... + /// -----END PGP PUBLIC KEY BLOCK-----", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a GPG key for a specific user using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/dotnet/UserSshKey.cs b/sdk/dotnet/UserSshKey.cs index b14ef4091..301f614be 100644 --- a/sdk/dotnet/UserSshKey.cs +++ b/sdk/dotnet/UserSshKey.cs @@ -14,6 +14,32 @@ namespace Pulumi.GitLab /// /// **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/users.html#single-ssh-key) /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleUser = GitLab.GetUser.Invoke(new() + /// { + /// Username = "example-user", + /// }); + /// + /// var exampleUserSshKey = new GitLab.UserSshKey("exampleUserSshKey", new() + /// { + /// UserId = exampleUser.Apply(getUserResult => getUserResult.Id), + /// Title = "example-key", + /// Key = "ssh-ed25519 AAAA...", + /// ExpiresAt = "2016-01-21T00:00:00.000Z", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// You can import a user ssh key using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/go/gitlab/application.go b/sdk/go/gitlab/application.go index 6df00953a..8d9d29870 100644 --- a/sdk/go/gitlab/application.go +++ b/sdk/go/gitlab/application.go @@ -20,6 +20,36 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/applications.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewApplication(ctx, "oidc", &gitlab.ApplicationArgs{ +// Confidential: pulumi.Bool(true), +// RedirectUrl: pulumi.String("https://mycompany.com"), +// Scopes: pulumi.StringArray{ +// pulumi.String("openid"), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab applications can be imported with their id, e.g. diff --git a/sdk/go/gitlab/applicationSettings.go b/sdk/go/gitlab/applicationSettings.go index a2bbee5ee..83291f34e 100644 --- a/sdk/go/gitlab/applicationSettings.go +++ b/sdk/go/gitlab/applicationSettings.go @@ -12,6 +12,32 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewApplicationSettings(ctx, "this", &gitlab.ApplicationSettingsArgs{ +// RequireTwoFactorAuthentication: pulumi.Bool(true), +// TwoFactorGracePeriod: pulumi.Int(24), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type ApplicationSettings struct { pulumi.CustomResourceState diff --git a/sdk/go/gitlab/branch.go b/sdk/go/gitlab/branch.go index 5599a105c..45a7111be 100644 --- a/sdk/go/gitlab/branch.go +++ b/sdk/go/gitlab/branch.go @@ -17,6 +17,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleProject, err := gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("An example project"), +// NamespaceId: pulumi.Any(gitlab_group.Example.Id), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewBranch(ctx, "exampleBranch", &gitlab.BranchArgs{ +// Ref: pulumi.String("main"), +// Project: exampleProject.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab branches can be imported with a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/clusterAgent.go b/sdk/go/gitlab/clusterAgent.go index a02e257d9..d417ea163 100644 --- a/sdk/go/gitlab/clusterAgent.go +++ b/sdk/go/gitlab/clusterAgent.go @@ -27,6 +27,50 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := gitlab.NewClusterAgent(ctx, "example", &gitlab.ClusterAgentArgs{ +// Project: pulumi.String("12345"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewRepositoryFile(ctx, "exampleAgentConfig", &gitlab.RepositoryFileArgs{ +// Project: example.Project, +// Branch: pulumi.String("main"), +// FilePath: example.Name.ApplyT(func(name string) (string, error) { +// return fmt.Sprintf(".gitlab/agents/%v", name), nil +// }).(pulumi.StringOutput), +// Content: pulumi.String(" gitops:\n ...\n"), +// AuthorEmail: pulumi.String("terraform@example.com"), +// AuthorName: pulumi.String("Terraform"), +// CommitMessage: example.Name.ApplyT(func(name string) (string, error) { +// return fmt.Sprintf("feature: add agent config for %v", name), nil +// }).(pulumi.StringOutput), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab Agent for Kubernetes can be imported with the following command and the id pattern `:` diff --git a/sdk/go/gitlab/clusterAgentToken.go b/sdk/go/gitlab/clusterAgentToken.go index 79175f1c1..7b78d54b8 100644 --- a/sdk/go/gitlab/clusterAgentToken.go +++ b/sdk/go/gitlab/clusterAgentToken.go @@ -21,6 +21,72 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html#create-an-agent-token) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi-helm/sdk/v1/go/helm" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewClusterAgentToken(ctx, "example", &gitlab.ClusterAgentTokenArgs{ +// Project: pulumi.String("12345"), +// AgentId: pulumi.Int(42), +// Description: pulumi.String("some token"), +// }) +// if err != nil { +// return err +// } +// thisProject, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{ +// PathWithNamespace: pulumi.StringRef("my-org/example"), +// }, nil) +// if err != nil { +// return err +// } +// thisClusterAgent, err := gitlab.NewClusterAgent(ctx, "thisClusterAgent", &gitlab.ClusterAgentArgs{ +// Project: *pulumi.String(thisProject.Id), +// }) +// if err != nil { +// return err +// } +// thisClusterAgentToken, err := gitlab.NewClusterAgentToken(ctx, "thisClusterAgentToken", &gitlab.ClusterAgentTokenArgs{ +// Project: *pulumi.String(thisProject.Id), +// AgentId: thisClusterAgent.AgentId, +// Description: pulumi.String("Token for the my-agent used with `gitlab-agent` Helm Chart"), +// }) +// if err != nil { +// return err +// } +// _, err = index.NewHelm_release(ctx, "gitlabAgent", &index.Helm_releaseArgs{ +// Name: "gitlab-agent", +// Namespace: "gitlab-agent", +// CreateNamespace: true, +// Repository: "https://charts.gitlab.io", +// Chart: "gitlab-agent", +// Version: "1.2.0", +// Set: []map[string]interface{}{ +// map[string]interface{}{ +// "name": "config.token", +// "value": thisClusterAgentToken.Token, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // A token for a GitLab Agent for Kubernetes can be imported with the following command and the id pattern `::` diff --git a/sdk/go/gitlab/complianceFramework.go b/sdk/go/gitlab/complianceFramework.go index be9a91594..4236f2087 100644 --- a/sdk/go/gitlab/complianceFramework.go +++ b/sdk/go/gitlab/complianceFramework.go @@ -23,6 +23,36 @@ import ( // // **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewComplianceFramework(ctx, "sample", &gitlab.ComplianceFrameworkArgs{ +// Color: pulumi.String("#87BEEF"), +// Default: pulumi.Bool(false), +// Description: pulumi.String("A HIPAA Compliance Framework"), +// NamespacePath: pulumi.String("top-level-group"), +// PipelineConfigurationFullPath: pulumi.String(".hipaa.yml@top-level-group/compliance-frameworks"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab compliance frameworks can be imported with a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/deployKey.go b/sdk/go/gitlab/deployKey.go index 4f5bf00f5..9c37ecd9d 100644 --- a/sdk/go/gitlab/deployKey.go +++ b/sdk/go/gitlab/deployKey.go @@ -19,6 +19,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewDeployKey(ctx, "example", &gitlab.DeployKeyArgs{ +// Key: pulumi.String("ssh-ed25519 AAAA..."), +// Project: pulumi.String("example/deploying"), +// Title: pulumi.String("Example deploy key"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/go/gitlab/deployKeyEnable.go b/sdk/go/gitlab/deployKeyEnable.go index 4d41647be..26305783f 100644 --- a/sdk/go/gitlab/deployKeyEnable.go +++ b/sdk/go/gitlab/deployKeyEnable.go @@ -17,6 +17,49 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#enable-a-deploy-key) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// parentProject, err := gitlab.NewProject(ctx, "parentProject", nil) +// if err != nil { +// return err +// } +// fooProject, err := gitlab.NewProject(ctx, "fooProject", nil) +// if err != nil { +// return err +// } +// parentDeployKey, err := gitlab.NewDeployKey(ctx, "parentDeployKey", &gitlab.DeployKeyArgs{ +// Project: parentProject.ID(), +// Title: pulumi.String("Example deploy key"), +// Key: pulumi.String("ssh-ed25519 AAAA..."), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewDeployKeyEnable(ctx, "fooDeployKeyEnable", &gitlab.DeployKeyEnableArgs{ +// Project: fooProject.ID(), +// KeyId: parentDeployKey.DeployKeyId, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab enabled deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/go/gitlab/getBranch.go b/sdk/go/gitlab/getBranch.go index 6bf0af9aa..43372df87 100644 --- a/sdk/go/gitlab/getBranch.go +++ b/sdk/go/gitlab/getBranch.go @@ -15,6 +15,33 @@ import ( // The `Branch` data source allows details of a repository branch to be retrieved by its name and project. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupBranch(ctx, &gitlab.LookupBranchArgs{ +// Name: "example", +// Project: "foo/bar", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupBranch(ctx *pulumi.Context, args *LookupBranchArgs, opts ...pulumi.InvokeOption) (*LookupBranchResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupBranchResult diff --git a/sdk/go/gitlab/getClusterAgent.go b/sdk/go/gitlab/getClusterAgent.go index 44cc4986c..63ced83fb 100644 --- a/sdk/go/gitlab/getClusterAgent.go +++ b/sdk/go/gitlab/getClusterAgent.go @@ -17,6 +17,33 @@ import ( // > Requires at least GitLab 14.10 // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupClusterAgent(ctx, &gitlab.LookupClusterAgentArgs{ +// AgentId: 1, +// Project: "12345", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupClusterAgent(ctx *pulumi.Context, args *LookupClusterAgentArgs, opts ...pulumi.InvokeOption) (*LookupClusterAgentResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupClusterAgentResult diff --git a/sdk/go/gitlab/getClusterAgents.go b/sdk/go/gitlab/getClusterAgents.go index d43f214d8..324ed7c66 100644 --- a/sdk/go/gitlab/getClusterAgents.go +++ b/sdk/go/gitlab/getClusterAgents.go @@ -17,6 +17,32 @@ import ( // > Requires at least GitLab 14.10 // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetClusterAgents(ctx, &gitlab.GetClusterAgentsArgs{ +// Project: "12345", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetClusterAgents(ctx *pulumi.Context, args *GetClusterAgentsArgs, opts ...pulumi.InvokeOption) (*GetClusterAgentsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetClusterAgentsResult diff --git a/sdk/go/gitlab/getCurrentUser.go b/sdk/go/gitlab/getCurrentUser.go index a48598ce4..3f3496a25 100644 --- a/sdk/go/gitlab/getCurrentUser.go +++ b/sdk/go/gitlab/getCurrentUser.go @@ -15,6 +15,30 @@ import ( // The `getCurrentUser` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. // // **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetCurrentUser(ctx, nil, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetCurrentUser(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetCurrentUserResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCurrentUserResult diff --git a/sdk/go/gitlab/getGroup.go b/sdk/go/gitlab/getGroup.go index c5dc4b4a8..8be0aff14 100644 --- a/sdk/go/gitlab/getGroup.go +++ b/sdk/go/gitlab/getGroup.go @@ -15,6 +15,32 @@ import ( // The `Group` data source allows details of a group to be retrieved by its id or full path. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupGroup(ctx, &gitlab.LookupGroupArgs{ +// FullPath: pulumi.StringRef("foo/bar"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupGroup(ctx *pulumi.Context, args *LookupGroupArgs, opts ...pulumi.InvokeOption) (*LookupGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupGroupResult diff --git a/sdk/go/gitlab/getGroupMembership.go b/sdk/go/gitlab/getGroupMembership.go index 31762287f..a4912cd11 100644 --- a/sdk/go/gitlab/getGroupMembership.go +++ b/sdk/go/gitlab/getGroupMembership.go @@ -15,6 +15,32 @@ import ( // The `GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupGroupMembership(ctx, &gitlab.LookupGroupMembershipArgs{ +// FullPath: pulumi.StringRef("foo/bar"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupGroupMembership(ctx *pulumi.Context, args *LookupGroupMembershipArgs, opts ...pulumi.InvokeOption) (*LookupGroupMembershipResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupGroupMembershipResult diff --git a/sdk/go/gitlab/getGroupSubgroups.go b/sdk/go/gitlab/getGroupSubgroups.go index 1ad9d4c7a..dccc5e666 100644 --- a/sdk/go/gitlab/getGroupSubgroups.go +++ b/sdk/go/gitlab/getGroupSubgroups.go @@ -15,6 +15,33 @@ import ( // The `getGroupSubgroups` data source allows to get subgroups of a group. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// subgroupsGroupSubgroups, err := gitlab.GetGroupSubgroups(ctx, &gitlab.GetGroupSubgroupsArgs{ +// GroupId: 123456, +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("subgroups", subgroupsGroupSubgroups) +// return nil +// }) +// } +// +// ``` func GetGroupSubgroups(ctx *pulumi.Context, args *GetGroupSubgroupsArgs, opts ...pulumi.InvokeOption) (*GetGroupSubgroupsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGroupSubgroupsResult diff --git a/sdk/go/gitlab/getGroupVariable.go b/sdk/go/gitlab/getGroupVariable.go index 16537ff51..b5b84eae9 100644 --- a/sdk/go/gitlab/getGroupVariable.go +++ b/sdk/go/gitlab/getGroupVariable.go @@ -15,6 +15,41 @@ import ( // The `GroupVariable` data source allows to retrieve details about a group-level CI/CD variable. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupGroupVariable(ctx, &gitlab.LookupGroupVariableArgs{ +// Group: "my/example/group", +// Key: "foo", +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.LookupGroupVariable(ctx, &gitlab.LookupGroupVariableArgs{ +// EnvironmentScope: pulumi.StringRef("staging/*"), +// Group: "my/example/group", +// Key: "bar", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupGroupVariable(ctx *pulumi.Context, args *LookupGroupVariableArgs, opts ...pulumi.InvokeOption) (*LookupGroupVariableResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupGroupVariableResult diff --git a/sdk/go/gitlab/getGroupVariables.go b/sdk/go/gitlab/getGroupVariables.go index 14d2e5548..63a0a77d9 100644 --- a/sdk/go/gitlab/getGroupVariables.go +++ b/sdk/go/gitlab/getGroupVariables.go @@ -15,6 +15,39 @@ import ( // The `getGroupVariables` data source allows to retrieve all group-level CI/CD variables. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetGroupVariables(ctx, &gitlab.GetGroupVariablesArgs{ +// Group: "my/example/group", +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetGroupVariables(ctx, &gitlab.GetGroupVariablesArgs{ +// EnvironmentScope: pulumi.StringRef("staging/*"), +// Group: "my/example/group", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetGroupVariables(ctx *pulumi.Context, args *GetGroupVariablesArgs, opts ...pulumi.InvokeOption) (*GetGroupVariablesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGroupVariablesResult diff --git a/sdk/go/gitlab/getGroups.go b/sdk/go/gitlab/getGroups.go index d35a210b4..8e9cd163b 100644 --- a/sdk/go/gitlab/getGroups.go +++ b/sdk/go/gitlab/getGroups.go @@ -19,6 +19,39 @@ import ( // > Some available options require administrator privileges. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetGroups(ctx, &gitlab.GetGroupsArgs{ +// OrderBy: pulumi.StringRef("name"), +// Sort: pulumi.StringRef("desc"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetGroups(ctx, &gitlab.GetGroupsArgs{ +// Search: pulumi.StringRef("GitLab"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetGroups(ctx *pulumi.Context, args *GetGroupsArgs, opts ...pulumi.InvokeOption) (*GetGroupsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGroupsResult diff --git a/sdk/go/gitlab/getInstanceDeployKeys.go b/sdk/go/gitlab/getInstanceDeployKeys.go index 13d2ac7bf..48ba4cea2 100644 --- a/sdk/go/gitlab/getInstanceDeployKeys.go +++ b/sdk/go/gitlab/getInstanceDeployKeys.go @@ -17,6 +17,32 @@ import ( // > This data source requires administration privileges. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetInstanceDeployKeys(ctx, &gitlab.GetInstanceDeployKeysArgs{ +// Public: pulumi.BoolRef(true), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetInstanceDeployKeys(ctx *pulumi.Context, args *GetInstanceDeployKeysArgs, opts ...pulumi.InvokeOption) (*GetInstanceDeployKeysResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetInstanceDeployKeysResult diff --git a/sdk/go/gitlab/getInstanceVariable.go b/sdk/go/gitlab/getInstanceVariable.go index 8d42311ef..c1867df50 100644 --- a/sdk/go/gitlab/getInstanceVariable.go +++ b/sdk/go/gitlab/getInstanceVariable.go @@ -15,6 +15,32 @@ import ( // The `InstanceVariable` data source allows to retrieve details about an instance-level CI/CD variable. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupInstanceVariable(ctx, &gitlab.LookupInstanceVariableArgs{ +// Key: "foo", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupInstanceVariable(ctx *pulumi.Context, args *LookupInstanceVariableArgs, opts ...pulumi.InvokeOption) (*LookupInstanceVariableResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupInstanceVariableResult diff --git a/sdk/go/gitlab/getInstanceVariables.go b/sdk/go/gitlab/getInstanceVariables.go index 71b62e6a4..ed2aafd23 100644 --- a/sdk/go/gitlab/getInstanceVariables.go +++ b/sdk/go/gitlab/getInstanceVariables.go @@ -15,6 +15,30 @@ import ( // The `getInstanceVariables` data source allows to retrieve all instance-level CI/CD variables. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetInstanceVariables(ctx, nil, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetInstanceVariables(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetInstanceVariablesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetInstanceVariablesResult diff --git a/sdk/go/gitlab/getMetadata.go b/sdk/go/gitlab/getMetadata.go index 813ce353b..7af7b8254 100644 --- a/sdk/go/gitlab/getMetadata.go +++ b/sdk/go/gitlab/getMetadata.go @@ -15,6 +15,30 @@ import ( // The `getMetadata` data source retrieves the metadata of the GitLab instance. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetMetadata(ctx, nil, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetMetadata(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetMetadataResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetMetadataResult diff --git a/sdk/go/gitlab/getProject.go b/sdk/go/gitlab/getProject.go index ca17e8f6e..c7b50562c 100644 --- a/sdk/go/gitlab/getProject.go +++ b/sdk/go/gitlab/getProject.go @@ -15,6 +15,32 @@ import ( // The `Project` data source allows details of a project to be retrieved by either its ID or its path with namespace. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{ +// PathWithNamespace: pulumi.StringRef("foo/bar/baz"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupProject(ctx *pulumi.Context, args *LookupProjectArgs, opts ...pulumi.InvokeOption) (*LookupProjectResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectResult diff --git a/sdk/go/gitlab/getProjectBranches.go b/sdk/go/gitlab/getProjectBranches.go index 9a5356ef5..996880d7d 100644 --- a/sdk/go/gitlab/getProjectBranches.go +++ b/sdk/go/gitlab/getProjectBranches.go @@ -15,6 +15,32 @@ import ( // The `getProjectBranches` data source allows details of the branches of a given project to be retrieved. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetProjectBranches(ctx, &gitlab.GetProjectBranchesArgs{ +// Project: "foo/bar/baz", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectBranches(ctx *pulumi.Context, args *GetProjectBranchesArgs, opts ...pulumi.InvokeOption) (*GetProjectBranchesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectBranchesResult diff --git a/sdk/go/gitlab/getProjectHook.go b/sdk/go/gitlab/getProjectHook.go index 3cf4efb9c..57f9fcaac 100644 --- a/sdk/go/gitlab/getProjectHook.go +++ b/sdk/go/gitlab/getProjectHook.go @@ -15,6 +15,39 @@ import ( // The `ProjectHook` data source allows to retrieve details about a hook in a project. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleProject, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{ +// Id: pulumi.StringRef("foo/bar/baz"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.LookupProjectHook(ctx, &gitlab.LookupProjectHookArgs{ +// Project: exampleProject.Id, +// HookId: 1, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupProjectHook(ctx *pulumi.Context, args *LookupProjectHookArgs, opts ...pulumi.InvokeOption) (*LookupProjectHookResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectHookResult diff --git a/sdk/go/gitlab/getProjectHooks.go b/sdk/go/gitlab/getProjectHooks.go index 41e84b0f3..e91ea042a 100644 --- a/sdk/go/gitlab/getProjectHooks.go +++ b/sdk/go/gitlab/getProjectHooks.go @@ -15,6 +15,38 @@ import ( // The `getProjectHooks` data source allows to retrieve details about hooks in a project. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{ +// Id: pulumi.StringRef("foo/bar/baz"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetProjectHooks(ctx, &gitlab.GetProjectHooksArgs{ +// Project: example.Id, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectHooks(ctx *pulumi.Context, args *GetProjectHooksArgs, opts ...pulumi.InvokeOption) (*GetProjectHooksResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectHooksResult diff --git a/sdk/go/gitlab/getProjectIssue.go b/sdk/go/gitlab/getProjectIssue.go index 8e5935d61..fcdc69025 100644 --- a/sdk/go/gitlab/getProjectIssue.go +++ b/sdk/go/gitlab/getProjectIssue.go @@ -15,6 +15,40 @@ import ( // The `ProjectIssue` data source allows to retrieve details about an issue in a project. // // **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{ +// PathWithNamespace: pulumi.StringRef("foo/bar/baz"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.LookupProjectIssue(ctx, &gitlab.LookupProjectIssueArgs{ +// Project: foo.Id, +// Iid: 1, +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("welcomeIssueWebUrl", data.Gitlab_project_issue.Web_url) +// return nil +// }) +// } +// +// ``` func LookupProjectIssue(ctx *pulumi.Context, args *LookupProjectIssueArgs, opts ...pulumi.InvokeOption) (*LookupProjectIssueResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectIssueResult diff --git a/sdk/go/gitlab/getProjectIssues.go b/sdk/go/gitlab/getProjectIssues.go index 2283f5078..668076710 100644 --- a/sdk/go/gitlab/getProjectIssues.go +++ b/sdk/go/gitlab/getProjectIssues.go @@ -15,6 +15,39 @@ import ( // The `getProjectIssues` data source allows to retrieve details about issues in a project. // // **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{ +// Id: pulumi.StringRef("foo/bar/baz"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetProjectIssues(ctx, &gitlab.GetProjectIssuesArgs{ +// Project: foo.Id, +// Search: pulumi.StringRef("foo"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectIssues(ctx *pulumi.Context, args *GetProjectIssuesArgs, opts ...pulumi.InvokeOption) (*GetProjectIssuesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectIssuesResult diff --git a/sdk/go/gitlab/getProjectMembership.go b/sdk/go/gitlab/getProjectMembership.go index 3a85ff9ec..20e1fb0c0 100644 --- a/sdk/go/gitlab/getProjectMembership.go +++ b/sdk/go/gitlab/getProjectMembership.go @@ -17,6 +17,33 @@ import ( // > **Note** exactly one of projectId or fullPath must be provided. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupProjectMembership(ctx, &gitlab.LookupProjectMembershipArgs{ +// Inherited: pulumi.BoolRef(true), +// ProjectId: pulumi.IntRef(123), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupProjectMembership(ctx *pulumi.Context, args *LookupProjectMembershipArgs, opts ...pulumi.InvokeOption) (*LookupProjectMembershipResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectMembershipResult diff --git a/sdk/go/gitlab/getProjectMilestone.go b/sdk/go/gitlab/getProjectMilestone.go index 32a4d326c..d8c232f01 100644 --- a/sdk/go/gitlab/getProjectMilestone.go +++ b/sdk/go/gitlab/getProjectMilestone.go @@ -15,6 +15,33 @@ import ( // The `ProjectMilestone` data source allows get details of a project milestone. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupProjectMilestone(ctx, &gitlab.LookupProjectMilestoneArgs{ +// MilestoneId: 10, +// Project: "foo/bar", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupProjectMilestone(ctx *pulumi.Context, args *LookupProjectMilestoneArgs, opts ...pulumi.InvokeOption) (*LookupProjectMilestoneResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectMilestoneResult diff --git a/sdk/go/gitlab/getProjectMilestones.go b/sdk/go/gitlab/getProjectMilestones.go index b6c1a5229..d9d6092b2 100644 --- a/sdk/go/gitlab/getProjectMilestones.go +++ b/sdk/go/gitlab/getProjectMilestones.go @@ -15,6 +15,32 @@ import ( // The `getProjectMilestones` data source allows get details of a project milestones. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetProjectMilestones(ctx, &gitlab.GetProjectMilestonesArgs{ +// Project: "foo/bar", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectMilestones(ctx *pulumi.Context, args *GetProjectMilestonesArgs, opts ...pulumi.InvokeOption) (*GetProjectMilestonesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectMilestonesResult diff --git a/sdk/go/gitlab/getProjectProtectedBranch.go b/sdk/go/gitlab/getProjectProtectedBranch.go index c68deef8b..94bde601f 100644 --- a/sdk/go/gitlab/getProjectProtectedBranch.go +++ b/sdk/go/gitlab/getProjectProtectedBranch.go @@ -15,6 +15,33 @@ import ( // The `gitlabProtectedBranch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetProjectProtectedBranch(ctx, &gitlab.GetProjectProtectedBranchArgs{ +// Name: "main", +// ProjectId: "foo/bar/baz", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectProtectedBranch(ctx *pulumi.Context, args *GetProjectProtectedBranchArgs, opts ...pulumi.InvokeOption) (*GetProjectProtectedBranchResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectProtectedBranchResult diff --git a/sdk/go/gitlab/getProjectProtectedBranches.go b/sdk/go/gitlab/getProjectProtectedBranches.go index 56b38d653..cbfcccd71 100644 --- a/sdk/go/gitlab/getProjectProtectedBranches.go +++ b/sdk/go/gitlab/getProjectProtectedBranches.go @@ -15,6 +15,32 @@ import ( // The `getProjectProtectedBranches` data source allows details of the protected branches of a given project. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetProjectProtectedBranches(ctx, &gitlab.GetProjectProtectedBranchesArgs{ +// ProjectId: "foo/bar/baz", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectProtectedBranches(ctx *pulumi.Context, args *GetProjectProtectedBranchesArgs, opts ...pulumi.InvokeOption) (*GetProjectProtectedBranchesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectProtectedBranchesResult diff --git a/sdk/go/gitlab/getProjectTag.go b/sdk/go/gitlab/getProjectTag.go index 891bccc21..c22bb57b5 100644 --- a/sdk/go/gitlab/getProjectTag.go +++ b/sdk/go/gitlab/getProjectTag.go @@ -15,6 +15,33 @@ import ( // The `ProjectTag` data source allows details of a project tag to be retrieved by its name. // // **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupProjectTag(ctx, &gitlab.LookupProjectTagArgs{ +// Name: "example", +// Project: "foo/bar", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupProjectTag(ctx *pulumi.Context, args *LookupProjectTagArgs, opts ...pulumi.InvokeOption) (*LookupProjectTagResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectTagResult diff --git a/sdk/go/gitlab/getProjectTags.go b/sdk/go/gitlab/getProjectTags.go index dd8d853b6..e5a8ef74d 100644 --- a/sdk/go/gitlab/getProjectTags.go +++ b/sdk/go/gitlab/getProjectTags.go @@ -15,6 +15,32 @@ import ( // The `getProjectTags` data source allows details of project tags to be retrieved by some search criteria. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetProjectTags(ctx, &gitlab.GetProjectTagsArgs{ +// Project: "foo/bar", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectTags(ctx *pulumi.Context, args *GetProjectTagsArgs, opts ...pulumi.InvokeOption) (*GetProjectTagsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectTagsResult diff --git a/sdk/go/gitlab/getProjectVariable.go b/sdk/go/gitlab/getProjectVariable.go index eb97af925..b318d97e1 100644 --- a/sdk/go/gitlab/getProjectVariable.go +++ b/sdk/go/gitlab/getProjectVariable.go @@ -15,6 +15,41 @@ import ( // The `ProjectVariable` data source allows to retrieve details about a project-level CI/CD variable. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupProjectVariable(ctx, &gitlab.LookupProjectVariableArgs{ +// Key: "foo", +// Project: "my/example/project", +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.LookupProjectVariable(ctx, &gitlab.LookupProjectVariableArgs{ +// EnvironmentScope: pulumi.StringRef("staging/*"), +// Key: "bar", +// Project: "my/example/project", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupProjectVariable(ctx *pulumi.Context, args *LookupProjectVariableArgs, opts ...pulumi.InvokeOption) (*LookupProjectVariableResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectVariableResult diff --git a/sdk/go/gitlab/getProjectVariables.go b/sdk/go/gitlab/getProjectVariables.go index 2cca5edfa..708ad9d6d 100644 --- a/sdk/go/gitlab/getProjectVariables.go +++ b/sdk/go/gitlab/getProjectVariables.go @@ -15,6 +15,39 @@ import ( // The `getProjectVariables` data source allows to retrieve all project-level CI/CD variables. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetProjectVariables(ctx, &gitlab.GetProjectVariablesArgs{ +// Project: "my/example/project", +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetProjectVariables(ctx, &gitlab.GetProjectVariablesArgs{ +// EnvironmentScope: pulumi.StringRef("staging/*"), +// Project: "my/example/project", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjectVariables(ctx *pulumi.Context, args *GetProjectVariablesArgs, opts ...pulumi.InvokeOption) (*GetProjectVariablesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectVariablesResult diff --git a/sdk/go/gitlab/getProjects.go b/sdk/go/gitlab/getProjects.go index f692d67de..66b52896f 100644 --- a/sdk/go/gitlab/getProjects.go +++ b/sdk/go/gitlab/getProjects.go @@ -19,6 +19,48 @@ import ( // > The owner sub-attributes are only populated if the Gitlab token used has an administrator scope. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// mygroup, err := gitlab.LookupGroup(ctx, &gitlab.LookupGroupArgs{ +// FullPath: pulumi.StringRef("mygroup"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetProjects(ctx, &gitlab.GetProjectsArgs{ +// GroupId: pulumi.IntRef(mygroup.Id), +// OrderBy: pulumi.StringRef("name"), +// IncludeSubgroups: pulumi.BoolRef(true), +// WithShared: pulumi.BoolRef(false), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetProjects(ctx, &gitlab.GetProjectsArgs{ +// Search: pulumi.StringRef("postgresql"), +// Visibility: pulumi.StringRef("private"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetProjects(ctx *pulumi.Context, args *GetProjectsArgs, opts ...pulumi.InvokeOption) (*GetProjectsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetProjectsResult diff --git a/sdk/go/gitlab/getReleaseLink.go b/sdk/go/gitlab/getReleaseLink.go index f6dc89c8b..672b262c4 100644 --- a/sdk/go/gitlab/getReleaseLink.go +++ b/sdk/go/gitlab/getReleaseLink.go @@ -15,6 +15,34 @@ import ( // The `ReleaseLink` data source allows get details of a release link. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupReleaseLink(ctx, &gitlab.LookupReleaseLinkArgs{ +// LinkId: 11, +// Project: "foo/bar", +// TagName: "v1.0.1", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupReleaseLink(ctx *pulumi.Context, args *LookupReleaseLinkArgs, opts ...pulumi.InvokeOption) (*LookupReleaseLinkResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupReleaseLinkResult diff --git a/sdk/go/gitlab/getReleaseLinks.go b/sdk/go/gitlab/getReleaseLinks.go index 597861a75..de5844661 100644 --- a/sdk/go/gitlab/getReleaseLinks.go +++ b/sdk/go/gitlab/getReleaseLinks.go @@ -15,6 +15,33 @@ import ( // The `getReleaseLinks` data source allows get details of release links. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetReleaseLinks(ctx, &gitlab.GetReleaseLinksArgs{ +// Project: "foo/bar", +// TagName: "v1.0.1", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetReleaseLinks(ctx *pulumi.Context, args *GetReleaseLinksArgs, opts ...pulumi.InvokeOption) (*GetReleaseLinksResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetReleaseLinksResult diff --git a/sdk/go/gitlab/getRepositoryFile.go b/sdk/go/gitlab/getRepositoryFile.go index fe2882788..6f8dd41a3 100644 --- a/sdk/go/gitlab/getRepositoryFile.go +++ b/sdk/go/gitlab/getRepositoryFile.go @@ -15,6 +15,34 @@ import ( // The `RepositoryFile` data source allows details of a file in a repository to be retrieved. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.LookupRepositoryFile(ctx, &gitlab.LookupRepositoryFileArgs{ +// FilePath: "README.md", +// Project: "example", +// Ref: "main", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupRepositoryFile(ctx *pulumi.Context, args *LookupRepositoryFileArgs, opts ...pulumi.InvokeOption) (*LookupRepositoryFileResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupRepositoryFileResult diff --git a/sdk/go/gitlab/getRepositoryTree.go b/sdk/go/gitlab/getRepositoryTree.go index fe40df41b..988095868 100644 --- a/sdk/go/gitlab/getRepositoryTree.go +++ b/sdk/go/gitlab/getRepositoryTree.go @@ -15,6 +15,35 @@ import ( // The `getRepositoryTree` data source allows details of directories and files in a repository to be retrieved. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetRepositoryTree(ctx, &gitlab.GetRepositoryTreeArgs{ +// Path: pulumi.StringRef("ExampleSubFolder"), +// Project: "example", +// Recursive: pulumi.BoolRef(true), +// Ref: "main", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetRepositoryTree(ctx *pulumi.Context, args *GetRepositoryTreeArgs, opts ...pulumi.InvokeOption) (*GetRepositoryTreeResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetRepositoryTreeResult diff --git a/sdk/go/gitlab/getUsers.go b/sdk/go/gitlab/getUsers.go index 1f952f174..4f2d8d874 100644 --- a/sdk/go/gitlab/getUsers.go +++ b/sdk/go/gitlab/getUsers.go @@ -19,6 +19,40 @@ import ( // > Some available options require administrator privileges. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.GetUsers(ctx, &gitlab.GetUsersArgs{ +// CreatedBefore: pulumi.StringRef("2019-01-01"), +// OrderBy: pulumi.StringRef("name"), +// Sort: pulumi.StringRef("desc"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.GetUsers(ctx, &gitlab.GetUsersArgs{ +// Search: pulumi.StringRef("username"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetUsers(ctx *pulumi.Context, args *GetUsersArgs, opts ...pulumi.InvokeOption) (*GetUsersResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetUsersResult diff --git a/sdk/go/gitlab/group.go b/sdk/go/gitlab/group.go index bb6d15a08..c0776c07d 100644 --- a/sdk/go/gitlab/group.go +++ b/sdk/go/gitlab/group.go @@ -19,6 +19,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleGroup, err := gitlab.NewGroup(ctx, "exampleGroup", &gitlab.GroupArgs{ +// Path: pulumi.String("example"), +// Description: pulumi.String("An example group"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("An example project"), +// NamespaceId: exampleGroup.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // ```sh diff --git a/sdk/go/gitlab/groupAccessToken.go b/sdk/go/gitlab/groupAccessToken.go index d712f5a91..aa280caf8 100644 --- a/sdk/go/gitlab/groupAccessToken.go +++ b/sdk/go/gitlab/groupAccessToken.go @@ -19,6 +19,45 @@ import ( // // **Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleGroupAccessToken, err := gitlab.NewGroupAccessToken(ctx, "exampleGroupAccessToken", &gitlab.GroupAccessTokenArgs{ +// Group: pulumi.String("25"), +// ExpiresAt: pulumi.String("2020-03-14"), +// AccessLevel: pulumi.String("developer"), +// Scopes: pulumi.StringArray{ +// pulumi.String("api"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupVariable(ctx, "exampleGroupVariable", &gitlab.GroupVariableArgs{ +// Group: pulumi.String("25"), +// Key: pulumi.String("gat"), +// Value: exampleGroupAccessToken.Token, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // A GitLab Group Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/groupBadge.go b/sdk/go/gitlab/groupBadge.go index 6464ba72b..999be4bb0 100644 --- a/sdk/go/gitlab/groupBadge.go +++ b/sdk/go/gitlab/groupBadge.go @@ -17,6 +17,62 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.NewGroup(ctx, "foo", nil) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupBadge(ctx, "example", &gitlab.GroupBadgeArgs{ +// Group: foo.ID(), +// LinkUrl: pulumi.String("https://example.com/badge-123"), +// ImageUrl: pulumi.String("https://example.com/badge-123.svg"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupBadge(ctx, "gitlabPipeline", &gitlab.GroupBadgeArgs{ +// Group: foo.ID(), +// LinkUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}"), +// ImageUrl: pulumi.String("https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupBadge(ctx, "gitlabCoverage", &gitlab.GroupBadgeArgs{ +// Group: foo.ID(), +// LinkUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/jobs"), +// ImageUrl: pulumi.String("https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupBadge(ctx, "gitlabRelease", &gitlab.GroupBadgeArgs{ +// Group: foo.ID(), +// LinkUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/releases"), +// ImageUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/badges/release.svg"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab group badges can be imported using an id made up of `{group_id}:{badge_id}`, e.g. diff --git a/sdk/go/gitlab/groupCluster.go b/sdk/go/gitlab/groupCluster.go index 4f7fd6c3d..a794bf99f 100644 --- a/sdk/go/gitlab/groupCluster.go +++ b/sdk/go/gitlab/groupCluster.go @@ -19,6 +19,46 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_clusters.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.NewGroup(ctx, "foo", &gitlab.GroupArgs{ +// Path: pulumi.String("foo-path"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupCluster(ctx, "bar", &gitlab.GroupClusterArgs{ +// Group: foo.ID(), +// Domain: pulumi.String("example.com"), +// Enabled: pulumi.Bool(true), +// KubernetesApiUrl: pulumi.String("https://124.124.124"), +// KubernetesToken: pulumi.String("some-token"), +// KubernetesCaCert: pulumi.String("some-cert"), +// KubernetesAuthorizationType: pulumi.String("rbac"), +// EnvironmentScope: pulumi.String("*"), +// ManagementProjectId: pulumi.String("123456"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab group clusters can be imported using an id made up of `groupid:clusterid`, e.g. diff --git a/sdk/go/gitlab/groupCustomAttribute.go b/sdk/go/gitlab/groupCustomAttribute.go index c4395b025..67fde74c6 100644 --- a/sdk/go/gitlab/groupCustomAttribute.go +++ b/sdk/go/gitlab/groupCustomAttribute.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupCustomAttribute(ctx, "attr", &gitlab.GroupCustomAttributeArgs{ +// Group: pulumi.Int(42), +// Key: pulumi.String("location"), +// Value: pulumi.String("Greenland"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a group custom attribute using the an id made up of `{group-id}:{key}`, e.g. diff --git a/sdk/go/gitlab/groupEpicBoard.go b/sdk/go/gitlab/groupEpicBoard.go index ecfe4ab78..875632b48 100644 --- a/sdk/go/gitlab/groupEpicBoard.go +++ b/sdk/go/gitlab/groupEpicBoard.go @@ -19,6 +19,58 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_boards.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := gitlab.NewGroup(ctx, "example", &gitlab.GroupArgs{ +// Path: pulumi.String("test_group"), +// Description: pulumi.String("An example group"), +// }) +// if err != nil { +// return err +// } +// label1, err := gitlab.NewGroupLabel(ctx, "label1", &gitlab.GroupLabelArgs{ +// Group: example.ID(), +// Color: pulumi.String("#FF0000"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupLabel(ctx, "label3", &gitlab.GroupLabelArgs{ +// Group: example.ID(), +// Color: pulumi.String("#003000"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupEpicBoard(ctx, "epicBoard", &gitlab.GroupEpicBoardArgs{ +// Group: example.Path, +// Lists: gitlab.GroupEpicBoardListArray{ +// &gitlab.GroupEpicBoardListArgs{ +// LabelId: label1.LabelId, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import this resource with an id made up of `{group-id}:{epic-board-id}`, e.g. diff --git a/sdk/go/gitlab/groupHook.go b/sdk/go/gitlab/groupHook.go index 8bdcd5e4d..24c346da7 100644 --- a/sdk/go/gitlab/groupHook.go +++ b/sdk/go/gitlab/groupHook.go @@ -17,6 +17,57 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupHook(ctx, "example", &gitlab.GroupHookArgs{ +// Group: pulumi.String("example/hooked"), +// MergeRequestsEvents: pulumi.Bool(true), +// Url: pulumi.String("https://example.com/hook/example"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupHook(ctx, "allAttributes", &gitlab.GroupHookArgs{ +// ConfidentialIssuesEvents: pulumi.Bool(false), +// ConfidentialNoteEvents: pulumi.Bool(true), +// DeploymentEvents: pulumi.Bool(true), +// EnableSslVerification: pulumi.Bool(false), +// Group: pulumi.String("1"), +// IssuesEvents: pulumi.Bool(false), +// JobEvents: pulumi.Bool(true), +// MergeRequestsEvents: pulumi.Bool(true), +// NoteEvents: pulumi.Bool(true), +// PipelineEvents: pulumi.Bool(true), +// PushEvents: pulumi.Bool(true), +// PushEventsBranchFilter: pulumi.String("devel"), +// ReleasesEvents: pulumi.Bool(true), +// SubgroupEvents: pulumi.Bool(true), +// TagPushEvents: pulumi.Bool(true), +// Token: pulumi.String("supersecret"), +// Url: pulumi.String("http://example.com"), +// WikiPageEvents: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // A GitLab Group Hook can be imported using a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/groupLabel.go b/sdk/go/gitlab/groupLabel.go index 4c3d73a06..56ef7f3be 100644 --- a/sdk/go/gitlab/groupLabel.go +++ b/sdk/go/gitlab/groupLabel.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/labels.html#group-labels) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupLabel(ctx, "fixme", &gitlab.GroupLabelArgs{ +// Color: pulumi.String("#ffcc00"), +// Description: pulumi.String("issue with failing tests"), +// Group: pulumi.String("example"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab group labels can be imported using an id made up of `{group_id}:{group_label_id}`, e.g. diff --git a/sdk/go/gitlab/groupMembership.go b/sdk/go/gitlab/groupMembership.go index 81d638067..aca2f80c7 100644 --- a/sdk/go/gitlab/groupMembership.go +++ b/sdk/go/gitlab/groupMembership.go @@ -19,6 +19,35 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupMembership(ctx, "test", &gitlab.GroupMembershipArgs{ +// AccessLevel: pulumi.String("guest"), +// ExpiresAt: pulumi.String("2020-12-31"), +// GroupId: pulumi.String("12345"), +// UserId: pulumi.Int(1337), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab group membership can be imported using an id made up of `group_id:user_id`, e.g. diff --git a/sdk/go/gitlab/groupProjectFileTemplate.go b/sdk/go/gitlab/groupProjectFileTemplate.go index 032a6ad3a..1a5405be6 100644 --- a/sdk/go/gitlab/groupProjectFileTemplate.go +++ b/sdk/go/gitlab/groupProjectFileTemplate.go @@ -22,6 +22,48 @@ import ( // > This resource requires a GitLab Enterprise instance with a Premium license. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#update-group) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.NewGroup(ctx, "foo", &gitlab.GroupArgs{ +// Path: pulumi.String("group"), +// Description: pulumi.String("An example group"), +// }) +// if err != nil { +// return err +// } +// bar, err := gitlab.NewProject(ctx, "bar", &gitlab.ProjectArgs{ +// Description: pulumi.String("contains file templates"), +// VisibilityLevel: pulumi.String("public"), +// NamespaceId: foo.ID(), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupProjectFileTemplate(ctx, "templateLink", &gitlab.GroupProjectFileTemplateArgs{ +// GroupId: foo.ID(), +// FileTemplateProjectId: bar.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type GroupProjectFileTemplate struct { pulumi.CustomResourceState diff --git a/sdk/go/gitlab/groupSamlLink.go b/sdk/go/gitlab/groupSamlLink.go index af136d68c..5ff3ee444 100644 --- a/sdk/go/gitlab/groupSamlLink.go +++ b/sdk/go/gitlab/groupSamlLink.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#saml-group-links) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupSamlLink(ctx, "test", &gitlab.GroupSamlLinkArgs{ +// AccessLevel: pulumi.String("developer"), +// Group: pulumi.String("12345"), +// SamlGroupName: pulumi.String("samlgroupname1"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab group saml links can be imported using an id made up of `group_id:saml_group_name`, e.g. diff --git a/sdk/go/gitlab/groupShareGroup.go b/sdk/go/gitlab/groupShareGroup.go index c7a464380..caa996d1c 100644 --- a/sdk/go/gitlab/groupShareGroup.go +++ b/sdk/go/gitlab/groupShareGroup.go @@ -17,6 +17,35 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#share-groups-with-groups) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupShareGroup(ctx, "test", &gitlab.GroupShareGroupArgs{ +// GroupId: pulumi.Any(gitlab_group.Foo.Id), +// ShareGroupId: pulumi.Any(gitlab_group.Bar.Id), +// GroupAccess: pulumi.String("guest"), +// ExpiresAt: pulumi.String("2099-01-01"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab group shares can be imported using an id made up of `mainGroupId:shareGroupId`, e.g. diff --git a/sdk/go/gitlab/groupVariable.go b/sdk/go/gitlab/groupVariable.go index a08020c29..72f49a2e6 100644 --- a/sdk/go/gitlab/groupVariable.go +++ b/sdk/go/gitlab/groupVariable.go @@ -17,6 +17,37 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroupVariable(ctx, "example", &gitlab.GroupVariableArgs{ +// EnvironmentScope: pulumi.String("*"), +// Group: pulumi.String("12345"), +// Key: pulumi.String("group_variable_key"), +// Masked: pulumi.Bool(false), +// Protected: pulumi.Bool(false), +// Value: pulumi.String("group_variable_value"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab group variables can be imported using an id made up of `groupid:variablename:scope`, e.g. diff --git a/sdk/go/gitlab/instanceCluster.go b/sdk/go/gitlab/instanceCluster.go index b32517fb1..0a158132b 100644 --- a/sdk/go/gitlab/instanceCluster.go +++ b/sdk/go/gitlab/instanceCluster.go @@ -19,6 +19,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_clusters.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewInstanceCluster(ctx, "bar", &gitlab.InstanceClusterArgs{ +// Domain: pulumi.String("example.com"), +// Enabled: pulumi.Bool(true), +// EnvironmentScope: pulumi.String("*"), +// KubernetesApiUrl: pulumi.String("https://124.124.124"), +// KubernetesAuthorizationType: pulumi.String("rbac"), +// KubernetesCaCert: pulumi.String("some-cert"), +// KubernetesNamespace: pulumi.String("namespace"), +// KubernetesToken: pulumi.String("some-token"), +// ManagementProjectId: pulumi.String("123456"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab instance clusters can be imported using a `clusterid`, e.g. diff --git a/sdk/go/gitlab/instanceVariable.go b/sdk/go/gitlab/instanceVariable.go index 7913932d9..7d61df0b4 100644 --- a/sdk/go/gitlab/instanceVariable.go +++ b/sdk/go/gitlab/instanceVariable.go @@ -17,6 +17,35 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewInstanceVariable(ctx, "example", &gitlab.InstanceVariableArgs{ +// Key: pulumi.String("instance_variable_key"), +// Masked: pulumi.Bool(false), +// Protected: pulumi.Bool(false), +// Value: pulumi.String("instance_variable_value"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab instance variables can be imported using an id made up of `variablename`, e.g. diff --git a/sdk/go/gitlab/integrationCustomIssueTracker.go b/sdk/go/gitlab/integrationCustomIssueTracker.go index 491acf373..a1c15a900 100644 --- a/sdk/go/gitlab/integrationCustomIssueTracker.go +++ b/sdk/go/gitlab/integrationCustomIssueTracker.go @@ -17,6 +17,41 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationCustomIssueTracker(ctx, "tracker", &gitlab.IntegrationCustomIssueTrackerArgs{ +// Project: awesomeProject.ID(), +// ProjectUrl: pulumi.String("https://customtracker.com/issues"), +// IssuesUrl: pulumi.String("https://customtracker.com/TEST-:id"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationEmailsOnPush.go b/sdk/go/gitlab/integrationEmailsOnPush.go index 63e7cf455..b15805dd3 100644 --- a/sdk/go/gitlab/integrationEmailsOnPush.go +++ b/sdk/go/gitlab/integrationEmailsOnPush.go @@ -17,6 +17,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationEmailsOnPush(ctx, "emails", &gitlab.IntegrationEmailsOnPushArgs{ +// Project: awesomeProject.ID(), +// Recipients: pulumi.String("myrecipient@example.com myotherrecipient@example.com"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_emails_on_push state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationExternalWiki.go b/sdk/go/gitlab/integrationExternalWiki.go index 30168ccdc..4bed946dc 100644 --- a/sdk/go/gitlab/integrationExternalWiki.go +++ b/sdk/go/gitlab/integrationExternalWiki.go @@ -17,6 +17,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationExternalWiki(ctx, "wiki", &gitlab.IntegrationExternalWikiArgs{ +// Project: awesomeProject.ID(), +// ExternalWikiUrl: pulumi.String("https://MyAwesomeExternalWikiURL.com"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_external_wiki state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationGithub.go b/sdk/go/gitlab/integrationGithub.go index ddc5044a3..34ae7f46a 100644 --- a/sdk/go/gitlab/integrationGithub.go +++ b/sdk/go/gitlab/integrationGithub.go @@ -19,6 +19,41 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationGithub(ctx, "github", &gitlab.IntegrationGithubArgs{ +// Project: awesomeProject.ID(), +// Token: pulumi.String("REDACTED"), +// RepositoryUrl: pulumi.String("https://github.com/gitlabhq/terraform-provider-gitlab"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // ```sh diff --git a/sdk/go/gitlab/integrationJira.go b/sdk/go/gitlab/integrationJira.go index 54da914e3..5f5a935c9 100644 --- a/sdk/go/gitlab/integrationJira.go +++ b/sdk/go/gitlab/integrationJira.go @@ -17,6 +17,42 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationJira(ctx, "jira", &gitlab.IntegrationJiraArgs{ +// Project: awesomeProject.ID(), +// Url: pulumi.String("https://jira.example.com"), +// Username: pulumi.String("user"), +// Password: pulumi.String("mypass"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_jira state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationMattermost.go b/sdk/go/gitlab/integrationMattermost.go index e34578c4c..b14f608b3 100644 --- a/sdk/go/gitlab/integrationMattermost.go +++ b/sdk/go/gitlab/integrationMattermost.go @@ -17,6 +17,43 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#mattermost-notifications) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationMattermost(ctx, "mattermost", &gitlab.IntegrationMattermostArgs{ +// Project: awesomeProject.ID(), +// Webhook: pulumi.String("https://webhook.com"), +// Username: pulumi.String("myuser"), +// PushEvents: pulumi.Bool(true), +// PushChannel: pulumi.String("push_chan"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_mattermost.mattermost state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationMicrosoftTeams.go b/sdk/go/gitlab/integrationMicrosoftTeams.go index 61d19c91f..9d0325b45 100644 --- a/sdk/go/gitlab/integrationMicrosoftTeams.go +++ b/sdk/go/gitlab/integrationMicrosoftTeams.go @@ -17,6 +17,41 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationMicrosoftTeams(ctx, "teams", &gitlab.IntegrationMicrosoftTeamsArgs{ +// Project: awesomeProject.ID(), +// Webhook: pulumi.String("https://testurl.com/?token=XYZ"), +// PushEvents: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_microsoft_teams state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationPipelinesEmail.go b/sdk/go/gitlab/integrationPipelinesEmail.go index d0e26e904..fba8ec832 100644 --- a/sdk/go/gitlab/integrationPipelinesEmail.go +++ b/sdk/go/gitlab/integrationPipelinesEmail.go @@ -17,6 +17,44 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationPipelinesEmail(ctx, "email", &gitlab.IntegrationPipelinesEmailArgs{ +// Project: awesomeProject.ID(), +// Recipients: pulumi.StringArray{ +// pulumi.String("gitlab@user.create"), +// }, +// NotifyOnlyBrokenPipelines: pulumi.Bool(true), +// BranchesToBeNotified: pulumi.String("all"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_pipelines_email state using the project ID, e.g. diff --git a/sdk/go/gitlab/integrationSlack.go b/sdk/go/gitlab/integrationSlack.go index c0db99a07..dfbbedd45 100644 --- a/sdk/go/gitlab/integrationSlack.go +++ b/sdk/go/gitlab/integrationSlack.go @@ -17,6 +17,43 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewIntegrationSlack(ctx, "slack", &gitlab.IntegrationSlackArgs{ +// Project: awesomeProject.ID(), +// Webhook: pulumi.String("https://webhook.com"), +// Username: pulumi.String("myuser"), +// PushEvents: pulumi.Bool(true), +// PushChannel: pulumi.String("push_chan"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_integration_slack.slack state using the project ID, e.g. diff --git a/sdk/go/gitlab/pagesDomain.go b/sdk/go/gitlab/pagesDomain.go index 0ad0753e0..bb83c5ecc 100644 --- a/sdk/go/gitlab/pagesDomain.go +++ b/sdk/go/gitlab/pagesDomain.go @@ -17,6 +17,54 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pages_domains.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// "os" +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func readFileOrPanic(path string) pulumi.StringPtrInput { +// data, err := os.ReadFile(path) +// if err != nil { +// panic(err.Error()) +// } +// return pulumi.String(string(data)) +// } +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewPagesDomain(ctx, "thisPagesDomain", &gitlab.PagesDomainArgs{ +// Project: pulumi.String("123"), +// Domain: pulumi.String("example.com"), +// AutoSslEnabled: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewPagesDomain(ctx, "thisIndex/pagesDomainPagesDomain", &gitlab.PagesDomainArgs{ +// Project: pulumi.String("123"), +// Domain: pulumi.String("example.com"), +// Key: readFileOrPanic(fmt.Sprintf("%v/key.pem", path.Module)), +// Certificate: readFileOrPanic(fmt.Sprintf("%v/cert.pem", path.Module)), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab pages domain can be imported using an id made up of `projectId:domain` _without_ the http protocol, e.g. diff --git a/sdk/go/gitlab/personalAccessToken.go b/sdk/go/gitlab/personalAccessToken.go index 81a6db395..cfb0c3db4 100644 --- a/sdk/go/gitlab/personalAccessToken.go +++ b/sdk/go/gitlab/personalAccessToken.go @@ -19,6 +19,44 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/personal_access_tokens.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// examplePersonalAccessToken, err := gitlab.NewPersonalAccessToken(ctx, "examplePersonalAccessToken", &gitlab.PersonalAccessTokenArgs{ +// UserId: pulumi.Int(25), +// ExpiresAt: pulumi.String("2020-03-14"), +// Scopes: pulumi.StringArray{ +// pulumi.String("api"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectVariable(ctx, "exampleProjectVariable", &gitlab.ProjectVariableArgs{ +// Project: pulumi.Any(gitlab_project.Example.Id), +// Key: pulumi.String("pat"), +// Value: examplePersonalAccessToken.Token, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // A GitLab Personal Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/pipelineSchedule.go b/sdk/go/gitlab/pipelineSchedule.go index f81d6b1ad..efebc3cc3 100644 --- a/sdk/go/gitlab/pipelineSchedule.go +++ b/sdk/go/gitlab/pipelineSchedule.go @@ -17,6 +17,35 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewPipelineSchedule(ctx, "example", &gitlab.PipelineScheduleArgs{ +// Cron: pulumi.String("0 1 * * *"), +// Description: pulumi.String("Used to schedule builds"), +// Project: pulumi.String("12345"), +// Ref: pulumi.String("master"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab pipeline schedules can be imported using an id made up of `{project_id}:{pipeline_schedule_id}`, e.g. diff --git a/sdk/go/gitlab/pipelineScheduleVariable.go b/sdk/go/gitlab/pipelineScheduleVariable.go index 4e6883868..40625f0c4 100644 --- a/sdk/go/gitlab/pipelineScheduleVariable.go +++ b/sdk/go/gitlab/pipelineScheduleVariable.go @@ -17,6 +17,44 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html#pipeline-schedule-variables) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// examplePipelineSchedule, err := gitlab.NewPipelineSchedule(ctx, "examplePipelineSchedule", &gitlab.PipelineScheduleArgs{ +// Project: pulumi.String("12345"), +// Description: pulumi.String("Used to schedule builds"), +// Ref: pulumi.String("master"), +// Cron: pulumi.String("0 1 * * *"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewPipelineScheduleVariable(ctx, "examplePipelineScheduleVariable", &gitlab.PipelineScheduleVariableArgs{ +// Project: examplePipelineSchedule.Project, +// PipelineScheduleId: examplePipelineSchedule.PipelineScheduleId, +// Key: pulumi.String("EXAMPLE_KEY"), +// Value: pulumi.String("example"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Pipeline schedule variables can be imported using an id made up of `project_id:pipeline_schedule_id:key`, e.g. diff --git a/sdk/go/gitlab/pipelineTrigger.go b/sdk/go/gitlab/pipelineTrigger.go index fe20d5e38..82415bddd 100644 --- a/sdk/go/gitlab/pipelineTrigger.go +++ b/sdk/go/gitlab/pipelineTrigger.go @@ -17,6 +17,33 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_triggers.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewPipelineTrigger(ctx, "example", &gitlab.PipelineTriggerArgs{ +// Description: pulumi.String("Used to trigger builds"), +// Project: pulumi.String("12345"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab pipeline triggers can be imported using an id made up of `{project_id}:{pipeline_trigger_id}`, e.g. diff --git a/sdk/go/gitlab/project.go b/sdk/go/gitlab/project.go index 9780ac76f..621e2f175 100644 --- a/sdk/go/gitlab/project.go +++ b/sdk/go/gitlab/project.go @@ -12,6 +12,109 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := gitlab.NewProject(ctx, "example", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome codebase"), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "example-two", &gitlab.ProjectArgs{ +// PushRules: &gitlab.ProjectPushRulesArgs{ +// AuthorEmailRegex: pulumi.String("@example\\.com$"), +// CommitCommitterCheck: pulumi.Bool(true), +// MemberCheck: pulumi.Bool(true), +// PreventSecrets: pulumi.Bool(true), +// }, +// }) +// if err != nil { +// return err +// } +// peterParker, err := gitlab.LookupUser(ctx, &gitlab.LookupUserArgs{ +// Username: pulumi.StringRef("peter_parker"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "petersRepo", &gitlab.ProjectArgs{ +// Description: pulumi.String("This is a description"), +// NamespaceId: *pulumi.Int(peterParker.NamespaceId), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "forkProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("This is a fork"), +// ForkedFromProjectId: example.ID(), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "forkIndex/projectProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("This is a fork"), +// ForkedFromProjectId: example.ID(), +// ImportUrl: example.HttpUrlToRepo, +// Mirror: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "importPublic", &gitlab.ProjectArgs{ +// ImportUrl: pulumi.String("https://gitlab.example.com/repo.git"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "importPublicWithMirror", &gitlab.ProjectArgs{ +// ImportUrl: pulumi.String("https://gitlab.example.com/repo.git"), +// Mirror: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "importPrivateProject", &gitlab.ProjectArgs{ +// ImportUrl: pulumi.String("https://gitlab.example.com/repo.git"), +// ImportUrlUsername: pulumi.String("user"), +// ImportUrlPassword: pulumi.String("pass"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "importPrivateWithMirror", &gitlab.ProjectArgs{ +// ImportUrl: pulumi.String("https://gitlab.example.com/repo.git"), +// ImportUrlUsername: pulumi.String("user"), +// ImportUrlPassword: pulumi.String("pass"), +// Mirror: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProject(ctx, "importPrivateIndex/projectProject", &gitlab.ProjectArgs{ +// ImportUrl: pulumi.String("https://user:pass@gitlab.example.com/repo.git"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // ```sh diff --git a/sdk/go/gitlab/projectAccessToken.go b/sdk/go/gitlab/projectAccessToken.go index 1369a7453..da4859377 100644 --- a/sdk/go/gitlab/projectAccessToken.go +++ b/sdk/go/gitlab/projectAccessToken.go @@ -17,6 +17,45 @@ import ( // // **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/project_access_tokens.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleProjectAccessToken, err := gitlab.NewProjectAccessToken(ctx, "exampleProjectAccessToken", &gitlab.ProjectAccessTokenArgs{ +// Project: pulumi.String("25"), +// ExpiresAt: pulumi.String("2020-03-14"), +// AccessLevel: pulumi.String("reporter"), +// Scopes: pulumi.StringArray{ +// pulumi.String("api"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectVariable(ctx, "exampleProjectVariable", &gitlab.ProjectVariableArgs{ +// Project: pulumi.Any(gitlab_project.Example.Id), +// Key: pulumi.String("pat"), +// Value: exampleProjectAccessToken.Token, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // A GitLab Project Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/projectBadge.go b/sdk/go/gitlab/projectBadge.go index fdde067c7..154f9239a 100644 --- a/sdk/go/gitlab/projectBadge.go +++ b/sdk/go/gitlab/projectBadge.go @@ -17,6 +17,62 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#project-badges) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.NewProject(ctx, "foo", nil) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectBadge(ctx, "example", &gitlab.ProjectBadgeArgs{ +// Project: foo.ID(), +// LinkUrl: pulumi.String("https://example.com/badge-123"), +// ImageUrl: pulumi.String("https://example.com/badge-123.svg"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectBadge(ctx, "gitlabPipeline", &gitlab.ProjectBadgeArgs{ +// Project: foo.ID(), +// LinkUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}"), +// ImageUrl: pulumi.String("https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectBadge(ctx, "gitlabCoverage", &gitlab.ProjectBadgeArgs{ +// Project: foo.ID(), +// LinkUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/jobs"), +// ImageUrl: pulumi.String("https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectBadge(ctx, "gitlabRelease", &gitlab.ProjectBadgeArgs{ +// Project: foo.ID(), +// LinkUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/releases"), +// ImageUrl: pulumi.String("https://gitlab.example.com/%{project_path}/-/badges/release.svg"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project badges can be imported using an id made up of `{project_id}:{badge_id}`, e.g. diff --git a/sdk/go/gitlab/projectCluster.go b/sdk/go/gitlab/projectCluster.go index 801c12c46..e8c6c66a4 100644 --- a/sdk/go/gitlab/projectCluster.go +++ b/sdk/go/gitlab/projectCluster.go @@ -19,6 +19,45 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_clusters.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.NewProject(ctx, "foo", nil) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectCluster(ctx, "bar", &gitlab.ProjectClusterArgs{ +// Project: foo.ID(), +// Domain: pulumi.String("example.com"), +// Enabled: pulumi.Bool(true), +// KubernetesApiUrl: pulumi.String("https://124.124.124"), +// KubernetesToken: pulumi.String("some-token"), +// KubernetesCaCert: pulumi.String("some-cert"), +// KubernetesNamespace: pulumi.String("namespace"), +// KubernetesAuthorizationType: pulumi.String("rbac"), +// EnvironmentScope: pulumi.String("*"), +// ManagementProjectId: pulumi.String("123456"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g. diff --git a/sdk/go/gitlab/projectComplianceFramework.go b/sdk/go/gitlab/projectComplianceFramework.go index 7387fc9b4..8e8c4a63d 100644 --- a/sdk/go/gitlab/projectComplianceFramework.go +++ b/sdk/go/gitlab/projectComplianceFramework.go @@ -19,6 +19,43 @@ import ( // // **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// sampleComplianceFramework, err := gitlab.NewComplianceFramework(ctx, "sampleComplianceFramework", &gitlab.ComplianceFrameworkArgs{ +// NamespacePath: pulumi.String("top-level-group"), +// Description: pulumi.String("A HIPAA Compliance Framework"), +// Color: pulumi.String("#87BEEF"), +// Default: pulumi.Bool(false), +// PipelineConfigurationFullPath: pulumi.String(".hipaa.yml@top-level-group/compliance-frameworks"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectComplianceFramework(ctx, "sampleProjectComplianceFramework", &gitlab.ProjectComplianceFrameworkArgs{ +// ComplianceFrameworkId: sampleComplianceFramework.FrameworkId, +// Project: pulumi.String("12345678"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab project compliance frameworks can be imported with a key composed of ``, e.g. diff --git a/sdk/go/gitlab/projectCustomAttribute.go b/sdk/go/gitlab/projectCustomAttribute.go index 188fb9363..c9e614917 100644 --- a/sdk/go/gitlab/projectCustomAttribute.go +++ b/sdk/go/gitlab/projectCustomAttribute.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectCustomAttribute(ctx, "attr", &gitlab.ProjectCustomAttributeArgs{ +// Key: pulumi.String("location"), +// Project: pulumi.Int(42), +// Value: pulumi.String("Greenland"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a project custom attribute using an id made up of `{project-id}:{key}`, e.g. diff --git a/sdk/go/gitlab/projectEnvironment.go b/sdk/go/gitlab/projectEnvironment.go index 5989e2fcb..dad6b7b54 100644 --- a/sdk/go/gitlab/projectEnvironment.go +++ b/sdk/go/gitlab/projectEnvironment.go @@ -13,6 +13,47 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// thisGroup, err := gitlab.NewGroup(ctx, "thisGroup", &gitlab.GroupArgs{ +// Path: pulumi.String("example"), +// Description: pulumi.String("An example group"), +// }) +// if err != nil { +// return err +// } +// thisProject, err := gitlab.NewProject(ctx, "thisProject", &gitlab.ProjectArgs{ +// NamespaceId: thisGroup.ID(), +// InitializeWithReadme: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectEnvironment(ctx, "thisProjectEnvironment", &gitlab.ProjectEnvironmentArgs{ +// Project: thisProject.ID(), +// ExternalUrl: pulumi.String("www.example.com"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project environments can be imported using an id made up of `projectId:environmenId`, e.g. diff --git a/sdk/go/gitlab/projectFreezePeriod.go b/sdk/go/gitlab/projectFreezePeriod.go index 7ab62be1b..cd7a9323b 100644 --- a/sdk/go/gitlab/projectFreezePeriod.go +++ b/sdk/go/gitlab/projectFreezePeriod.go @@ -17,6 +17,35 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/freeze_periods.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectFreezePeriod(ctx, "schedule", &gitlab.ProjectFreezePeriodArgs{ +// Project: pulumi.Any(gitlab_project.Foo.Id), +// FreezeStart: pulumi.String("0 23 * * 5"), +// FreezeEnd: pulumi.String("0 7 * * 1"), +// CronTimezone: pulumi.String("UTC"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project freeze periods can be imported using an id made up of `project_id:freeze_period_id`, e.g. diff --git a/sdk/go/gitlab/projectHook.go b/sdk/go/gitlab/projectHook.go index 4d03759be..1cd7dde66 100644 --- a/sdk/go/gitlab/projectHook.go +++ b/sdk/go/gitlab/projectHook.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#hooks) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectHook(ctx, "example", &gitlab.ProjectHookArgs{ +// MergeRequestsEvents: pulumi.Bool(true), +// Project: pulumi.String("example/hooked"), +// Url: pulumi.String("https://example.com/hook/example"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // A GitLab Project Hook can be imported using a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/projectIssue.go b/sdk/go/gitlab/projectIssue.go index efa59b6a5..1c82a2381 100644 --- a/sdk/go/gitlab/projectIssue.go +++ b/sdk/go/gitlab/projectIssue.go @@ -13,6 +13,47 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// foo, err := gitlab.NewProject(ctx, "foo", &gitlab.ProjectArgs{ +// Description: pulumi.String("Lorem Ipsum"), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectIssue(ctx, "welcomeIssue", &gitlab.ProjectIssueArgs{ +// Project: foo.ID(), +// Title: pulumi.String("Welcome!"), +// Description: foo.Name.ApplyT(func(name string) (string, error) { +// return fmt.Sprintf(" Welcome to the %v project!\n\n", name), nil +// }).(pulumi.StringOutput), +// DiscussionLocked: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// ctx.Export("welcomeIssueWebUrl", data.Gitlab_project_issue.Web_url) +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g. diff --git a/sdk/go/gitlab/projectLabel.go b/sdk/go/gitlab/projectLabel.go index d8cc2ee57..b3fc64a31 100644 --- a/sdk/go/gitlab/projectLabel.go +++ b/sdk/go/gitlab/projectLabel.go @@ -17,6 +17,42 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/labels.html#project-labels) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectLabel(ctx, "fixme", &gitlab.ProjectLabelArgs{ +// Project: pulumi.String("example"), +// Description: pulumi.String("issue with failing tests"), +// Color: pulumi.String("#ffcc00"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectLabel(ctx, "devopsCreate", &gitlab.ProjectLabelArgs{ +// Project: pulumi.Any(gitlab_project.Example.Id), +// Description: pulumi.String("issue for creating infrastructure resources"), +// Color: pulumi.String("#ffa500"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab Project labels can be imported using an id made up of `{project_id}:{group_label_id}`, e.g. diff --git a/sdk/go/gitlab/projectLevelMrApprovals.go b/sdk/go/gitlab/projectLevelMrApprovals.go index 9916c5187..c793c8f55 100644 --- a/sdk/go/gitlab/projectLevelMrApprovals.go +++ b/sdk/go/gitlab/projectLevelMrApprovals.go @@ -19,6 +19,42 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// fooProject, err := gitlab.NewProject(ctx, "fooProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My example project"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectLevelMrApprovals(ctx, "fooProjectLevelMrApprovals", &gitlab.ProjectLevelMrApprovalsArgs{ +// Project: fooProject.ID(), +// ResetApprovalsOnPush: pulumi.Bool(true), +// DisableOverridingApproversPerMergeRequest: pulumi.Bool(false), +// MergeRequestsAuthorApproval: pulumi.Bool(false), +// MergeRequestsDisableCommittersApproval: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // ```sh diff --git a/sdk/go/gitlab/projectMembership.go b/sdk/go/gitlab/projectMembership.go index 765efab02..7da8f8dd5 100644 --- a/sdk/go/gitlab/projectMembership.go +++ b/sdk/go/gitlab/projectMembership.go @@ -19,6 +19,43 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectMembership(ctx, "test", &gitlab.ProjectMembershipArgs{ +// AccessLevel: pulumi.String("guest"), +// Project: pulumi.String("12345"), +// UserId: pulumi.Int(1337), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectMembership(ctx, "example", &gitlab.ProjectMembershipArgs{ +// AccessLevel: pulumi.String("guest"), +// ExpiresAt: pulumi.String("2022-12-31"), +// Project: pulumi.String("67890"), +// UserId: pulumi.Int(1234), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project membership can be imported using an id made up of `project_id:user_id`, e.g. diff --git a/sdk/go/gitlab/projectMilestone.go b/sdk/go/gitlab/projectMilestone.go index ba99e02e0..90379fae2 100644 --- a/sdk/go/gitlab/projectMilestone.go +++ b/sdk/go/gitlab/projectMilestone.go @@ -17,6 +17,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleProject, err := gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("An example project"), +// NamespaceId: pulumi.Any(gitlab_group.Example.Id), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectMilestone(ctx, "exampleProjectMilestone", &gitlab.ProjectMilestoneArgs{ +// Project: exampleProject.ID(), +// Title: pulumi.String("example"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab project milestone can be imported with a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/projectMirror.go b/sdk/go/gitlab/projectMirror.go index 222243526..a2920e840 100644 --- a/sdk/go/gitlab/projectMirror.go +++ b/sdk/go/gitlab/projectMirror.go @@ -30,6 +30,33 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/remote_mirrors.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectMirror(ctx, "foo", &gitlab.ProjectMirrorArgs{ +// Project: pulumi.String("1"), +// Url: pulumi.String("https://username:password@github.com/org/repository.git"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project mirror can be imported using an id made up of `project_id:mirror_id`, e.g. diff --git a/sdk/go/gitlab/projectRunnerEnablement.go b/sdk/go/gitlab/projectRunnerEnablement.go index 371981714..a6dbc83b5 100644 --- a/sdk/go/gitlab/projectRunnerEnablement.go +++ b/sdk/go/gitlab/projectRunnerEnablement.go @@ -17,6 +17,33 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#enable-a-runner-in-project) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectRunnerEnablement(ctx, "foo", &gitlab.ProjectRunnerEnablementArgs{ +// Project: pulumi.String("5"), +// RunnerId: pulumi.Int(7), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project runners can be imported using an id made up of `project:runner_id`, e.g. diff --git a/sdk/go/gitlab/projectShareGroup.go b/sdk/go/gitlab/projectShareGroup.go index 2631e99e7..25874eb71 100644 --- a/sdk/go/gitlab/projectShareGroup.go +++ b/sdk/go/gitlab/projectShareGroup.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#share-project-with-group) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectShareGroup(ctx, "test", &gitlab.ProjectShareGroupArgs{ +// GroupAccess: pulumi.String("guest"), +// GroupId: pulumi.Int(1337), +// Project: pulumi.String("12345"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project group shares can be imported using an id made up of `projectid:groupid`, e.g. diff --git a/sdk/go/gitlab/projectTag.go b/sdk/go/gitlab/projectTag.go index ab82330ef..068324c54 100644 --- a/sdk/go/gitlab/projectTag.go +++ b/sdk/go/gitlab/projectTag.go @@ -17,6 +17,40 @@ import ( // // **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleProject, err := gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("An example project"), +// NamespaceId: pulumi.Any(gitlab_group.Example.Id), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewProjectTag(ctx, "exampleProjectTag", &gitlab.ProjectTagArgs{ +// Ref: pulumi.String("main"), +// Project: exampleProject.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab project tags can be imported with a key composed of `:`, e.g. diff --git a/sdk/go/gitlab/projectVariable.go b/sdk/go/gitlab/projectVariable.go index 14fe37682..983e396b2 100644 --- a/sdk/go/gitlab/projectVariable.go +++ b/sdk/go/gitlab/projectVariable.go @@ -19,6 +19,35 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProjectVariable(ctx, "example", &gitlab.ProjectVariableArgs{ +// Key: pulumi.String("project_variable_key"), +// Project: pulumi.String("12345"), +// Protected: pulumi.Bool(false), +// Value: pulumi.String("project_variable_value"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // GitLab project variables can be imported using an id made up of `project:key:environment_scope`, e.g. diff --git a/sdk/go/gitlab/releaseLink.go b/sdk/go/gitlab/releaseLink.go index bf1351d1f..a6a4d5e8d 100644 --- a/sdk/go/gitlab/releaseLink.go +++ b/sdk/go/gitlab/releaseLink.go @@ -17,6 +17,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleProject, err := gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("An example project"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewReleaseLink(ctx, "exampleReleaseLink", &gitlab.ReleaseLinkArgs{ +// Project: exampleProject.ID(), +// TagName: pulumi.String("tag_name_associated_with_release"), +// Url: pulumi.String("https://test/"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Gitlab release link can be imported with a key composed of `::`, e.g. diff --git a/sdk/go/gitlab/runner.go b/sdk/go/gitlab/runner.go index 257c7fb32..104ac8d3e 100644 --- a/sdk/go/gitlab/runner.go +++ b/sdk/go/gitlab/runner.go @@ -23,6 +23,91 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi-local/sdk/go/local" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// myGroup, err := gitlab.NewGroup(ctx, "myGroup", &gitlab.GroupArgs{ +// Description: pulumi.String("group that holds the runners"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewRunner(ctx, "basicRunner", &gitlab.RunnerArgs{ +// RegistrationToken: myGroup.RunnersToken, +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewRunner(ctx, "taggedOnly", &gitlab.RunnerArgs{ +// RegistrationToken: myGroup.RunnersToken, +// Description: pulumi.String("I only run tagged jobs"), +// RunUntagged: pulumi.Bool(false), +// TagLists: pulumi.StringArray{ +// pulumi.String("tag_one"), +// pulumi.String("tag_two"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewRunner(ctx, "protected", &gitlab.RunnerArgs{ +// RegistrationToken: myGroup.RunnersToken, +// Description: pulumi.String("I only run protected jobs"), +// AccessLevel: pulumi.String("ref_protected"), +// }) +// if err != nil { +// return err +// } +// myCustomGroup, err := gitlab.NewGroup(ctx, "myCustomGroup", &gitlab.GroupArgs{ +// Description: pulumi.String("group that holds the custom runners"), +// }) +// if err != nil { +// return err +// } +// myRunner, err := gitlab.NewRunner(ctx, "myRunner", &gitlab.RunnerArgs{ +// RegistrationToken: myCustomGroup.RunnersToken, +// }) +// if err != nil { +// return err +// } +// _, err = local.NewFile(ctx, "config", &local.FileArgs{ +// Filename: pulumi.String(fmt.Sprintf("%v/config.toml", path.Module)), +// Content: myRunner.AuthenticationToken.ApplyT(func(authenticationToken string) (string, error) { +// return fmt.Sprintf(` concurrent = 1 +// +// [[runners]] +// name = "Hello Terraform" +// url = "https://example.gitlab.com/" +// token = "%v" +// executor = "shell" +// +// `, authenticationToken), nil +// +// }).(pulumi.StringOutput), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // # A GitLab Runner can be imported using the runner's ID, eg diff --git a/sdk/go/gitlab/serviceCustomIssueTracker.go b/sdk/go/gitlab/serviceCustomIssueTracker.go index f64e62a14..3c916f0fe 100644 --- a/sdk/go/gitlab/serviceCustomIssueTracker.go +++ b/sdk/go/gitlab/serviceCustomIssueTracker.go @@ -19,6 +19,41 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceCustomIssueTracker(ctx, "tracker", &gitlab.ServiceCustomIssueTrackerArgs{ +// Project: awesomeProject.ID(), +// ProjectUrl: pulumi.String("https://customtracker.com/issues"), +// IssuesUrl: pulumi.String("https://customtracker.com/TEST-:id"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/go/gitlab/serviceEmailsOnPush.go b/sdk/go/gitlab/serviceEmailsOnPush.go index 1c94eb4f9..3ec0d74ba 100644 --- a/sdk/go/gitlab/serviceEmailsOnPush.go +++ b/sdk/go/gitlab/serviceEmailsOnPush.go @@ -19,6 +19,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceEmailsOnPush(ctx, "emails", &gitlab.ServiceEmailsOnPushArgs{ +// Project: awesomeProject.ID(), +// Recipients: pulumi.String("myrecipient@example.com myotherrecipient@example.com"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_emails_on_push state using the project ID, e.g. diff --git a/sdk/go/gitlab/serviceExternalWiki.go b/sdk/go/gitlab/serviceExternalWiki.go index 01f206aff..f52ecf93b 100644 --- a/sdk/go/gitlab/serviceExternalWiki.go +++ b/sdk/go/gitlab/serviceExternalWiki.go @@ -19,6 +19,40 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceExternalWiki(ctx, "wiki", &gitlab.ServiceExternalWikiArgs{ +// Project: awesomeProject.ID(), +// ExternalWikiUrl: pulumi.String("https://MyAwesomeExternalWikiURL.com"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_external_wiki state using the project ID, e.g. diff --git a/sdk/go/gitlab/serviceGithub.go b/sdk/go/gitlab/serviceGithub.go index ab20327bc..57f0466bb 100644 --- a/sdk/go/gitlab/serviceGithub.go +++ b/sdk/go/gitlab/serviceGithub.go @@ -21,6 +21,41 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceGithub(ctx, "github", &gitlab.ServiceGithubArgs{ +// Project: awesomeProject.ID(), +// Token: pulumi.String("REDACTED"), +// RepositoryUrl: pulumi.String("https://github.com/gitlabhq/terraform-provider-gitlab"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // ```sh diff --git a/sdk/go/gitlab/serviceJira.go b/sdk/go/gitlab/serviceJira.go index 2e67e30a6..c7a0e1f83 100644 --- a/sdk/go/gitlab/serviceJira.go +++ b/sdk/go/gitlab/serviceJira.go @@ -19,6 +19,42 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceJira(ctx, "jira", &gitlab.ServiceJiraArgs{ +// Project: awesomeProject.ID(), +// Url: pulumi.String("https://jira.example.com"), +// Username: pulumi.String("user"), +// Password: pulumi.String("mypass"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_jira state using the project ID, e.g. diff --git a/sdk/go/gitlab/serviceMicrosoftTeams.go b/sdk/go/gitlab/serviceMicrosoftTeams.go index 3ce4dd6be..b7753987a 100644 --- a/sdk/go/gitlab/serviceMicrosoftTeams.go +++ b/sdk/go/gitlab/serviceMicrosoftTeams.go @@ -19,6 +19,41 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceMicrosoftTeams(ctx, "teams", &gitlab.ServiceMicrosoftTeamsArgs{ +// Project: awesomeProject.ID(), +// Webhook: pulumi.String("https://testurl.com/?token=XYZ"), +// PushEvents: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_microsoft_teams state using the project ID, e.g. diff --git a/sdk/go/gitlab/servicePipelinesEmail.go b/sdk/go/gitlab/servicePipelinesEmail.go index 80217c782..8c3f38711 100644 --- a/sdk/go/gitlab/servicePipelinesEmail.go +++ b/sdk/go/gitlab/servicePipelinesEmail.go @@ -19,6 +19,44 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServicePipelinesEmail(ctx, "email", &gitlab.ServicePipelinesEmailArgs{ +// Project: awesomeProject.ID(), +// Recipients: pulumi.StringArray{ +// pulumi.String("gitlab@user.create"), +// }, +// NotifyOnlyBrokenPipelines: pulumi.Bool(true), +// BranchesToBeNotified: pulumi.String("all"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_pipelines_email state using the project ID, e.g. diff --git a/sdk/go/gitlab/serviceSlack.go b/sdk/go/gitlab/serviceSlack.go index 7ef2c121b..b8efd4891 100644 --- a/sdk/go/gitlab/serviceSlack.go +++ b/sdk/go/gitlab/serviceSlack.go @@ -19,6 +19,43 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{ +// Description: pulumi.String("My awesome project."), +// VisibilityLevel: pulumi.String("public"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewServiceSlack(ctx, "slack", &gitlab.ServiceSlackArgs{ +// Project: awesomeProject.ID(), +// Webhook: pulumi.String("https://webhook.com"), +// Username: pulumi.String("myuser"), +// PushEvents: pulumi.Bool(true), +// PushChannel: pulumi.String("push_chan"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a gitlab_service_slack.slack state using the project ID, e.g. diff --git a/sdk/go/gitlab/systemHook.go b/sdk/go/gitlab/systemHook.go index e6db8e0f4..15028a062 100644 --- a/sdk/go/gitlab/systemHook.go +++ b/sdk/go/gitlab/systemHook.go @@ -19,6 +19,38 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/system_hooks.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewSystemHook(ctx, "example", &gitlab.SystemHookArgs{ +// EnableSslVerification: pulumi.Bool(true), +// MergeRequestsEvents: pulumi.Bool(true), +// PushEvents: pulumi.Bool(true), +// RepositoryUpdateEvents: pulumi.Bool(true), +// TagPushEvents: pulumi.Bool(true), +// Token: pulumi.String("secret-token"), +// Url: pulumi.String("https://example.com/hook-%d"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a system hook using the hook id `{hook-id}`, e.g. diff --git a/sdk/go/gitlab/tagProtection.go b/sdk/go/gitlab/tagProtection.go index 1c693c131..17348a3bf 100644 --- a/sdk/go/gitlab/tagProtection.go +++ b/sdk/go/gitlab/tagProtection.go @@ -13,6 +13,42 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewTagProtection(ctx, "tagProtect", &gitlab.TagProtectionArgs{ +// AllowedToCreates: gitlab.TagProtectionAllowedToCreateArray{ +// &gitlab.TagProtectionAllowedToCreateArgs{ +// UserId: pulumi.Int(42), +// }, +// &gitlab.TagProtectionAllowedToCreateArgs{ +// GroupId: pulumi.Int(43), +// }, +// }, +// CreateAccessLevel: pulumi.String("developer"), +// Project: pulumi.String("12345"), +// Tag: pulumi.String("TagProtected"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // Tag protections can be imported using an id made up of `project_id:tag_name`, e.g. diff --git a/sdk/go/gitlab/user.go b/sdk/go/gitlab/user.go index 514e587da..831e257a3 100644 --- a/sdk/go/gitlab/user.go +++ b/sdk/go/gitlab/user.go @@ -21,6 +21,39 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewUser(ctx, "example", &gitlab.UserArgs{ +// CanCreateGroup: pulumi.Bool(false), +// Email: pulumi.String("gitlab@user.create"), +// IsAdmin: pulumi.Bool(true), +// IsExternal: pulumi.Bool(true), +// Password: pulumi.String("superPassword"), +// ProjectsLimit: pulumi.Int(4), +// ResetPassword: pulumi.Bool(false), +// Username: pulumi.String("example"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // ```sh diff --git a/sdk/go/gitlab/userCustomAttribute.go b/sdk/go/gitlab/userCustomAttribute.go index 215cb4fe1..9ac70ee4e 100644 --- a/sdk/go/gitlab/userCustomAttribute.go +++ b/sdk/go/gitlab/userCustomAttribute.go @@ -17,6 +17,34 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewUserCustomAttribute(ctx, "attr", &gitlab.UserCustomAttributeArgs{ +// Key: pulumi.String("location"), +// User: pulumi.Int(42), +// Value: pulumi.String("Greenland"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a user custom attribute using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/go/gitlab/userGpgKey.go b/sdk/go/gitlab/userGpgKey.go index 9e504d8e0..678681b44 100644 --- a/sdk/go/gitlab/userGpgKey.go +++ b/sdk/go/gitlab/userGpgKey.go @@ -19,6 +19,45 @@ import ( // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html#get-a-specific-gpg-key) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleUser, err := gitlab.LookupUser(ctx, &gitlab.LookupUserArgs{ +// Username: pulumi.StringRef("example-user"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.NewUserGpgKey(ctx, "exampleUserGpgKey", &gitlab.UserGpgKeyArgs{ +// UserId: *pulumi.String(exampleUser.Id), +// Key: pulumi.String("-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewUserGpgKey(ctx, "exampleUserUserGpgKey", &gitlab.UserGpgKeyArgs{ +// Key: pulumi.String("-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a GPG key for a specific user using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/go/gitlab/userSshKey.go b/sdk/go/gitlab/userSshKey.go index 2cc1b5d78..2104382ef 100644 --- a/sdk/go/gitlab/userSshKey.go +++ b/sdk/go/gitlab/userSshKey.go @@ -17,6 +17,41 @@ import ( // // **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/users.html#single-ssh-key) // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleUser, err := gitlab.LookupUser(ctx, &gitlab.LookupUserArgs{ +// Username: pulumi.StringRef("example-user"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = gitlab.NewUserSshKey(ctx, "exampleUserSshKey", &gitlab.UserSshKeyArgs{ +// UserId: *pulumi.String(exampleUser.Id), +// Title: pulumi.String("example-key"), +// Key: pulumi.String("ssh-ed25519 AAAA..."), +// ExpiresAt: pulumi.String("2016-01-21T00:00:00.000Z"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You can import a user ssh key using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/nodejs/application.ts b/sdk/nodejs/application.ts index c03b6d71f..198734150 100644 --- a/sdk/nodejs/application.ts +++ b/sdk/nodejs/application.ts @@ -12,6 +12,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/applications.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const oidc = new gitlab.Application("oidc", { + * confidential: true, + * redirectUrl: "https://mycompany.com", + * scopes: ["openid"], + * }); + * ``` + * * ## Import * * Gitlab applications can be imported with their id, e.g. diff --git a/sdk/nodejs/applicationSettings.ts b/sdk/nodejs/applicationSettings.ts index 3b66fb53e..1372ed301 100644 --- a/sdk/nodejs/applicationSettings.ts +++ b/sdk/nodejs/applicationSettings.ts @@ -4,6 +4,20 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; +/** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // Set the 2FA settings + * const _this = new gitlab.ApplicationSettings("this", { + * requireTwoFactorAuthentication: true, + * twoFactorGracePeriod: 24, + * }); + * ``` + */ export class ApplicationSettings extends pulumi.CustomResource { /** * Get an existing ApplicationSettings resource's state with the given name, ID, and optional extra diff --git a/sdk/nodejs/branch.ts b/sdk/nodejs/branch.ts index 655c437d7..18703ba78 100644 --- a/sdk/nodejs/branch.ts +++ b/sdk/nodejs/branch.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // Create a project for the branch to use + * const exampleProject = new gitlab.Project("exampleProject", { + * description: "An example project", + * namespaceId: gitlab_group.example.id, + * }); + * const exampleBranch = new gitlab.Branch("exampleBranch", { + * ref: "main", + * project: exampleProject.id, + * }); + * ``` + * * ## Import * * Gitlab branches can be imported with a key composed of `:`, e.g. diff --git a/sdk/nodejs/clusterAgent.ts b/sdk/nodejs/clusterAgent.ts index 88f19c7bd..0e93d1d08 100644 --- a/sdk/nodejs/clusterAgent.ts +++ b/sdk/nodejs/clusterAgent.ts @@ -18,6 +18,28 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.ClusterAgent("example", {project: "12345"}); + * // Optionally, configure the agent as described in + * // https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#create-an-agent-configuration-file + * const exampleAgentConfig = new gitlab.RepositoryFile("exampleAgentConfig", { + * project: example.project, + * branch: "main", + * filePath: pulumi.interpolate`.gitlab/agents/${example.name}`, + * content: ` gitops: + * ... + * `, + * authorEmail: "terraform@example.com", + * authorName: "Terraform", + * commitMessage: pulumi.interpolate`feature: add agent config for ${example.name}`, + * }); + * ``` + * * ## Import * * GitLab Agent for Kubernetes can be imported with the following command and the id pattern `:` diff --git a/sdk/nodejs/clusterAgentToken.ts b/sdk/nodejs/clusterAgentToken.ts index 233a6a311..9d1bcc5f4 100644 --- a/sdk/nodejs/clusterAgentToken.ts +++ b/sdk/nodejs/clusterAgentToken.ts @@ -13,6 +13,42 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html#create-an-agent-token) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * import * as helm from "@pulumi/helm"; + * + * // Create token for an agent + * const example = new gitlab.ClusterAgentToken("example", { + * project: "12345", + * agentId: 42, + * description: "some token", + * }); + * const thisProject = gitlab.getProject({ + * pathWithNamespace: "my-org/example", + * }); + * const thisClusterAgent = new gitlab.ClusterAgent("thisClusterAgent", {project: thisProject.then(thisProject => thisProject.id)}); + * const thisClusterAgentToken = new gitlab.ClusterAgentToken("thisClusterAgentToken", { + * project: thisProject.then(thisProject => thisProject.id), + * agentId: thisClusterAgent.agentId, + * description: "Token for the my-agent used with `gitlab-agent` Helm Chart", + * }); + * const gitlabAgent = new helm.index.Helm_release("gitlabAgent", { + * name: "gitlab-agent", + * namespace: "gitlab-agent", + * createNamespace: true, + * repository: "https://charts.gitlab.io", + * chart: "gitlab-agent", + * version: "1.2.0", + * set: [{ + * name: "config.token", + * value: thisClusterAgentToken.token, + * }], + * }); + * ``` + * * ## Import * * A token for a GitLab Agent for Kubernetes can be imported with the following command and the id pattern `::` diff --git a/sdk/nodejs/complianceFramework.ts b/sdk/nodejs/complianceFramework.ts index bd271d61d..1d1d27d19 100644 --- a/sdk/nodejs/complianceFramework.ts +++ b/sdk/nodejs/complianceFramework.ts @@ -15,6 +15,21 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const sample = new gitlab.ComplianceFramework("sample", { + * color: "#87BEEF", + * "default": false, + * description: "A HIPAA Compliance Framework", + * namespacePath: "top-level-group", + * pipelineConfigurationFullPath: ".hipaa.yml@top-level-group/compliance-frameworks", + * }); + * ``` + * * ## Import * * Gitlab compliance frameworks can be imported with a key composed of `:`, e.g. diff --git a/sdk/nodejs/deployKey.ts b/sdk/nodejs/deployKey.ts index 550ab922c..604824b69 100644 --- a/sdk/nodejs/deployKey.ts +++ b/sdk/nodejs/deployKey.ts @@ -11,6 +11,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.DeployKey("example", { + * key: "ssh-ed25519 AAAA...", + * project: "example/deploying", + * title: "Example deploy key", + * }); + * ``` + * * ## Import * * GitLab deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/nodejs/deployKeyEnable.ts b/sdk/nodejs/deployKeyEnable.ts index 9d6747120..3fe75af1b 100644 --- a/sdk/nodejs/deployKeyEnable.ts +++ b/sdk/nodejs/deployKeyEnable.ts @@ -9,6 +9,29 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#enable-a-deploy-key) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // A repo to host the deployment key + * const parentProject = new gitlab.Project("parentProject", {}); + * // A second repo to use the deployment key from the parent project + * const fooProject = new gitlab.Project("fooProject", {}); + * // Upload a deployment key for the parent repo + * const parentDeployKey = new gitlab.DeployKey("parentDeployKey", { + * project: parentProject.id, + * title: "Example deploy key", + * key: "ssh-ed25519 AAAA...", + * }); + * // Enable the deployment key on the second repo + * const fooDeployKeyEnable = new gitlab.DeployKeyEnable("fooDeployKeyEnable", { + * project: fooProject.id, + * keyId: parentDeployKey.deployKeyId, + * }); + * ``` + * * ## Import * * GitLab enabled deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/nodejs/getBranch.ts b/sdk/nodejs/getBranch.ts index 37ca8d136..d3f09177c 100644 --- a/sdk/nodejs/getBranch.ts +++ b/sdk/nodejs/getBranch.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * The `gitlab.Branch` data source allows details of a repository branch to be retrieved by its name and project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getBranch({ + * name: "example", + * project: "foo/bar", + * }); + * ``` */ export function getBranch(args: GetBranchArgs, opts?: pulumi.InvokeOptions): Promise { @@ -87,6 +99,18 @@ export interface GetBranchResult { * The `gitlab.Branch` data source allows details of a repository branch to be retrieved by its name and project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getBranch({ + * name: "example", + * project: "foo/bar", + * }); + * ``` */ export function getBranchOutput(args: GetBranchOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getBranch(a, opts)) diff --git a/sdk/nodejs/getClusterAgent.ts b/sdk/nodejs/getClusterAgent.ts index 4b8cf71d6..731a4c686 100644 --- a/sdk/nodejs/getClusterAgent.ts +++ b/sdk/nodejs/getClusterAgent.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * > Requires at least GitLab 14.10 * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getClusterAgent({ + * agentId: 1, + * project: "12345", + * }); + * ``` */ export function getClusterAgent(args: GetClusterAgentArgs, opts?: pulumi.InvokeOptions): Promise { @@ -69,6 +81,18 @@ export interface GetClusterAgentResult { * > Requires at least GitLab 14.10 * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getClusterAgent({ + * agentId: 1, + * project: "12345", + * }); + * ``` */ export function getClusterAgentOutput(args: GetClusterAgentOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getClusterAgent(a, opts)) diff --git a/sdk/nodejs/getClusterAgents.ts b/sdk/nodejs/getClusterAgents.ts index 089c009d1..e613955b9 100644 --- a/sdk/nodejs/getClusterAgents.ts +++ b/sdk/nodejs/getClusterAgents.ts @@ -12,6 +12,17 @@ import * as utilities from "./utilities"; * > Requires at least GitLab 14.10 * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const agents = gitlab.getClusterAgents({ + * project: "12345", + * }); + * ``` */ export function getClusterAgents(args: GetClusterAgentsArgs, opts?: pulumi.InvokeOptions): Promise { @@ -51,6 +62,17 @@ export interface GetClusterAgentsResult { * > Requires at least GitLab 14.10 * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const agents = gitlab.getClusterAgents({ + * project: "12345", + * }); + * ``` */ export function getClusterAgentsOutput(args: GetClusterAgentsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getClusterAgents(a, opts)) diff --git a/sdk/nodejs/getCurrentUser.ts b/sdk/nodejs/getCurrentUser.ts index f41a04569..723616ff8 100644 --- a/sdk/nodejs/getCurrentUser.ts +++ b/sdk/nodejs/getCurrentUser.ts @@ -8,6 +8,15 @@ import * as utilities from "./utilities"; * The `gitlab.getCurrentUser` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. * * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getCurrentUser({}); + * ``` */ export function getCurrentUser(opts?: pulumi.InvokeOptions): Promise { @@ -61,6 +70,15 @@ export interface GetCurrentUserResult { * The `gitlab.getCurrentUser` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. * * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getCurrentUser({}); + * ``` */ export function getCurrentUserOutput(opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(getCurrentUser(opts)) diff --git a/sdk/nodejs/getGroup.ts b/sdk/nodejs/getGroup.ts index 8a7f69efc..e67bb7f48 100644 --- a/sdk/nodejs/getGroup.ts +++ b/sdk/nodejs/getGroup.ts @@ -8,6 +8,17 @@ import * as utilities from "./utilities"; * The `gitlab.Group` data source allows details of a group to be retrieved by its id or full path. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getGroup({ + * fullPath: "foo/bar", + * }); + * ``` */ export function getGroup(args?: GetGroupArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -118,6 +129,17 @@ export interface GetGroupResult { * The `gitlab.Group` data source allows details of a group to be retrieved by its id or full path. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getGroup({ + * fullPath: "foo/bar", + * }); + * ``` */ export function getGroupOutput(args?: GetGroupOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getGroup(a, opts)) diff --git a/sdk/nodejs/getGroupMembership.ts b/sdk/nodejs/getGroupMembership.ts index 92349add5..13a67aee4 100644 --- a/sdk/nodejs/getGroupMembership.ts +++ b/sdk/nodejs/getGroupMembership.ts @@ -10,6 +10,17 @@ import * as utilities from "./utilities"; * The `gitlab.GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getGroupMembership({ + * fullPath: "foo/bar", + * }); + * ``` */ export function getGroupMembership(args?: GetGroupMembershipArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -75,6 +86,17 @@ export interface GetGroupMembershipResult { * The `gitlab.GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getGroupMembership({ + * fullPath: "foo/bar", + * }); + * ``` */ export function getGroupMembershipOutput(args?: GetGroupMembershipOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getGroupMembership(a, opts)) diff --git a/sdk/nodejs/getGroupSubgroups.ts b/sdk/nodejs/getGroupSubgroups.ts index 798260fa1..fbc02e802 100644 --- a/sdk/nodejs/getGroupSubgroups.ts +++ b/sdk/nodejs/getGroupSubgroups.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * The `gitlab.getGroupSubgroups` data source allows to get subgroups of a group. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const subgroupsGroupSubgroups = gitlab.getGroupSubgroups({ + * groupId: 123456, + * }); + * export const subgroups = subgroupsGroupSubgroups; + * ``` */ export function getGroupSubgroups(args: GetGroupSubgroupsArgs, opts?: pulumi.InvokeOptions): Promise { @@ -125,6 +137,18 @@ export interface GetGroupSubgroupsResult { * The `gitlab.getGroupSubgroups` data source allows to get subgroups of a group. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const subgroupsGroupSubgroups = gitlab.getGroupSubgroups({ + * groupId: 123456, + * }); + * export const subgroups = subgroupsGroupSubgroups; + * ``` */ export function getGroupSubgroupsOutput(args: GetGroupSubgroupsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getGroupSubgroups(a, opts)) diff --git a/sdk/nodejs/getGroupVariable.ts b/sdk/nodejs/getGroupVariable.ts index e9b09a0b4..70c7e9675 100644 --- a/sdk/nodejs/getGroupVariable.ts +++ b/sdk/nodejs/getGroupVariable.ts @@ -8,6 +8,23 @@ import * as utilities from "./utilities"; * The `gitlab.GroupVariable` data source allows to retrieve details about a group-level CI/CD variable. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getGroupVariable({ + * group: "my/example/group", + * key: "foo", + * }); + * const bar = gitlab.getGroupVariable({ + * environmentScope: "staging/*", + * group: "my/example/group", + * key: "bar", + * }); + * ``` */ export function getGroupVariable(args: GetGroupVariableArgs, opts?: pulumi.InvokeOptions): Promise { @@ -82,6 +99,23 @@ export interface GetGroupVariableResult { * The `gitlab.GroupVariable` data source allows to retrieve details about a group-level CI/CD variable. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getGroupVariable({ + * group: "my/example/group", + * key: "foo", + * }); + * const bar = gitlab.getGroupVariable({ + * environmentScope: "staging/*", + * group: "my/example/group", + * key: "bar", + * }); + * ``` */ export function getGroupVariableOutput(args: GetGroupVariableOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getGroupVariable(a, opts)) diff --git a/sdk/nodejs/getGroupVariables.ts b/sdk/nodejs/getGroupVariables.ts index a93562559..c3b0589f7 100644 --- a/sdk/nodejs/getGroupVariables.ts +++ b/sdk/nodejs/getGroupVariables.ts @@ -10,6 +10,21 @@ import * as utilities from "./utilities"; * The `gitlab.getGroupVariables` data source allows to retrieve all group-level CI/CD variables. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const vars = gitlab.getGroupVariables({ + * group: "my/example/group", + * }); + * const stagingVars = gitlab.getGroupVariables({ + * environmentScope: "staging/*", + * group: "my/example/group", + * }); + * ``` */ export function getGroupVariables(args: GetGroupVariablesArgs, opts?: pulumi.InvokeOptions): Promise { @@ -53,6 +68,21 @@ export interface GetGroupVariablesResult { * The `gitlab.getGroupVariables` data source allows to retrieve all group-level CI/CD variables. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const vars = gitlab.getGroupVariables({ + * group: "my/example/group", + * }); + * const stagingVars = gitlab.getGroupVariables({ + * environmentScope: "staging/*", + * group: "my/example/group", + * }); + * ``` */ export function getGroupVariablesOutput(args: GetGroupVariablesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getGroupVariables(a, opts)) diff --git a/sdk/nodejs/getGroups.ts b/sdk/nodejs/getGroups.ts index 22051b2b6..6d40d3fdb 100644 --- a/sdk/nodejs/getGroups.ts +++ b/sdk/nodejs/getGroups.ts @@ -14,6 +14,21 @@ import * as utilities from "./utilities"; * > Some available options require administrator privileges. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getGroups({ + * orderBy: "name", + * sort: "desc", + * }); + * const example-two = gitlab.getGroups({ + * search: "GitLab", + * }); + * ``` */ export function getGroups(args?: GetGroupsArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -86,6 +101,21 @@ export interface GetGroupsResult { * > Some available options require administrator privileges. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getGroups({ + * orderBy: "name", + * sort: "desc", + * }); + * const example-two = gitlab.getGroups({ + * search: "GitLab", + * }); + * ``` */ export function getGroupsOutput(args?: GetGroupsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getGroups(a, opts)) diff --git a/sdk/nodejs/getInstanceDeployKeys.ts b/sdk/nodejs/getInstanceDeployKeys.ts index c869c7251..366168f49 100644 --- a/sdk/nodejs/getInstanceDeployKeys.ts +++ b/sdk/nodejs/getInstanceDeployKeys.ts @@ -12,6 +12,17 @@ import * as utilities from "./utilities"; * > This data source requires administration privileges. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getInstanceDeployKeys({ + * "public": true, + * }); + * ``` */ export function getInstanceDeployKeys(args?: GetInstanceDeployKeysArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -55,6 +66,17 @@ export interface GetInstanceDeployKeysResult { * > This data source requires administration privileges. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getInstanceDeployKeys({ + * "public": true, + * }); + * ``` */ export function getInstanceDeployKeysOutput(args?: GetInstanceDeployKeysOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getInstanceDeployKeys(a, opts)) diff --git a/sdk/nodejs/getInstanceVariable.ts b/sdk/nodejs/getInstanceVariable.ts index 671d42e74..34b80a55a 100644 --- a/sdk/nodejs/getInstanceVariable.ts +++ b/sdk/nodejs/getInstanceVariable.ts @@ -8,6 +8,17 @@ import * as utilities from "./utilities"; * The `gitlab.InstanceVariable` data source allows to retrieve details about an instance-level CI/CD variable. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getInstanceVariable({ + * key: "foo", + * }); + * ``` */ export function getInstanceVariable(args: GetInstanceVariableArgs, opts?: pulumi.InvokeOptions): Promise { @@ -64,6 +75,17 @@ export interface GetInstanceVariableResult { * The `gitlab.InstanceVariable` data source allows to retrieve details about an instance-level CI/CD variable. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getInstanceVariable({ + * key: "foo", + * }); + * ``` */ export function getInstanceVariableOutput(args: GetInstanceVariableOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getInstanceVariable(a, opts)) diff --git a/sdk/nodejs/getInstanceVariables.ts b/sdk/nodejs/getInstanceVariables.ts index a08f641e4..232e323c7 100644 --- a/sdk/nodejs/getInstanceVariables.ts +++ b/sdk/nodejs/getInstanceVariables.ts @@ -10,6 +10,15 @@ import * as utilities from "./utilities"; * The `gitlab.getInstanceVariables` data source allows to retrieve all instance-level CI/CD variables. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const vars = gitlab.getInstanceVariables({}); + * ``` */ export function getInstanceVariables(opts?: pulumi.InvokeOptions): Promise { @@ -35,6 +44,15 @@ export interface GetInstanceVariablesResult { * The `gitlab.getInstanceVariables` data source allows to retrieve all instance-level CI/CD variables. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const vars = gitlab.getInstanceVariables({}); + * ``` */ export function getInstanceVariablesOutput(opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(getInstanceVariables(opts)) diff --git a/sdk/nodejs/getMetadata.ts b/sdk/nodejs/getMetadata.ts index a3aecbb8d..c777ff0fe 100644 --- a/sdk/nodejs/getMetadata.ts +++ b/sdk/nodejs/getMetadata.ts @@ -10,6 +10,15 @@ import * as utilities from "./utilities"; * The `gitlab.getMetadata` data source retrieves the metadata of the GitLab instance. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const this = gitlab.getMetadata({}); + * ``` */ export function getMetadata(opts?: pulumi.InvokeOptions): Promise { @@ -47,6 +56,15 @@ export interface GetMetadataResult { * The `gitlab.getMetadata` data source retrieves the metadata of the GitLab instance. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const this = gitlab.getMetadata({}); + * ``` */ export function getMetadataOutput(opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(getMetadata(opts)) diff --git a/sdk/nodejs/getProject.ts b/sdk/nodejs/getProject.ts index 08c9cd617..46cf613d8 100644 --- a/sdk/nodejs/getProject.ts +++ b/sdk/nodejs/getProject.ts @@ -10,6 +10,17 @@ import * as utilities from "./utilities"; * The `gitlab.Project` data source allows details of a project to be retrieved by either its ID or its path with namespace. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProject({ + * pathWithNamespace: "foo/bar/baz", + * }); + * ``` */ export function getProject(args?: GetProjectArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -306,6 +317,17 @@ export interface GetProjectResult { * The `gitlab.Project` data source allows details of a project to be retrieved by either its ID or its path with namespace. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProject({ + * pathWithNamespace: "foo/bar/baz", + * }); + * ``` */ export function getProjectOutput(args?: GetProjectOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProject(a, opts)) diff --git a/sdk/nodejs/getProjectBranches.ts b/sdk/nodejs/getProjectBranches.ts index e5ddefa9d..da41a3270 100644 --- a/sdk/nodejs/getProjectBranches.ts +++ b/sdk/nodejs/getProjectBranches.ts @@ -10,6 +10,17 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectBranches` data source allows details of the branches of a given project to be retrieved. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectBranches({ + * project: "foo/bar/baz", + * }); + * ``` */ export function getProjectBranches(args: GetProjectBranchesArgs, opts?: pulumi.InvokeOptions): Promise { @@ -50,6 +61,17 @@ export interface GetProjectBranchesResult { * The `gitlab.getProjectBranches` data source allows details of the branches of a given project to be retrieved. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectBranches({ + * project: "foo/bar/baz", + * }); + * ``` */ export function getProjectBranchesOutput(args: GetProjectBranchesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectBranches(a, opts)) diff --git a/sdk/nodejs/getProjectHook.ts b/sdk/nodejs/getProjectHook.ts index 5ade3b2df..00c8a60f5 100644 --- a/sdk/nodejs/getProjectHook.ts +++ b/sdk/nodejs/getProjectHook.ts @@ -8,6 +8,21 @@ import * as utilities from "./utilities"; * The `gitlab.ProjectHook` data source allows to retrieve details about a hook in a project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleProject = gitlab.getProject({ + * id: "foo/bar/baz", + * }); + * const exampleProjectHook = exampleProject.then(exampleProject => gitlab.getProjectHook({ + * project: exampleProject.id, + * hookId: 1, + * })); + * ``` */ export function getProjectHook(args: GetProjectHookArgs, opts?: pulumi.InvokeOptions): Promise { @@ -121,6 +136,21 @@ export interface GetProjectHookResult { * The `gitlab.ProjectHook` data source allows to retrieve details about a hook in a project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleProject = gitlab.getProject({ + * id: "foo/bar/baz", + * }); + * const exampleProjectHook = exampleProject.then(exampleProject => gitlab.getProjectHook({ + * project: exampleProject.id, + * hookId: 1, + * })); + * ``` */ export function getProjectHookOutput(args: GetProjectHookOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectHook(a, opts)) diff --git a/sdk/nodejs/getProjectHooks.ts b/sdk/nodejs/getProjectHooks.ts index b5226a3c0..e369aef4b 100644 --- a/sdk/nodejs/getProjectHooks.ts +++ b/sdk/nodejs/getProjectHooks.ts @@ -10,6 +10,20 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectHooks` data source allows to retrieve details about hooks in a project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProject({ + * id: "foo/bar/baz", + * }); + * const examples = example.then(example => gitlab.getProjectHooks({ + * project: example.id, + * })); + * ``` */ export function getProjectHooks(args: GetProjectHooksArgs, opts?: pulumi.InvokeOptions): Promise { @@ -47,6 +61,20 @@ export interface GetProjectHooksResult { * The `gitlab.getProjectHooks` data source allows to retrieve details about hooks in a project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProject({ + * id: "foo/bar/baz", + * }); + * const examples = example.then(example => gitlab.getProjectHooks({ + * project: example.id, + * })); + * ``` */ export function getProjectHooksOutput(args: GetProjectHooksOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectHooks(a, opts)) diff --git a/sdk/nodejs/getProjectIssue.ts b/sdk/nodejs/getProjectIssue.ts index 87290bb9d..844d4d50b 100644 --- a/sdk/nodejs/getProjectIssue.ts +++ b/sdk/nodejs/getProjectIssue.ts @@ -10,6 +10,22 @@ import * as utilities from "./utilities"; * The `gitlab.ProjectIssue` data source allows to retrieve details about an issue in a project. * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProject({ + * pathWithNamespace: "foo/bar/baz", + * }); + * const welcomeIssue = foo.then(foo => gitlab.getProjectIssue({ + * project: foo.id, + * iid: 1, + * })); + * export const welcomeIssueWebUrl = data.gitlab_project_issue.web_url; + * ``` */ export function getProjectIssue(args: GetProjectIssueArgs, opts?: pulumi.InvokeOptions): Promise { @@ -203,6 +219,22 @@ export interface GetProjectIssueResult { * The `gitlab.ProjectIssue` data source allows to retrieve details about an issue in a project. * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProject({ + * pathWithNamespace: "foo/bar/baz", + * }); + * const welcomeIssue = foo.then(foo => gitlab.getProjectIssue({ + * project: foo.id, + * iid: 1, + * })); + * export const welcomeIssueWebUrl = data.gitlab_project_issue.web_url; + * ``` */ export function getProjectIssueOutput(args: GetProjectIssueOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectIssue(a, opts)) diff --git a/sdk/nodejs/getProjectIssues.ts b/sdk/nodejs/getProjectIssues.ts index f696c2420..0498a27cf 100644 --- a/sdk/nodejs/getProjectIssues.ts +++ b/sdk/nodejs/getProjectIssues.ts @@ -10,6 +10,21 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectIssues` data source allows to retrieve details about issues in a project. * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProject({ + * id: "foo/bar/baz", + * }); + * const allWithFoo = foo.then(foo => gitlab.getProjectIssues({ + * project: foo.id, + * search: "foo", + * })); + * ``` */ export function getProjectIssues(args: GetProjectIssuesArgs, opts?: pulumi.InvokeOptions): Promise { @@ -254,6 +269,21 @@ export interface GetProjectIssuesResult { * The `gitlab.getProjectIssues` data source allows to retrieve details about issues in a project. * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProject({ + * id: "foo/bar/baz", + * }); + * const allWithFoo = foo.then(foo => gitlab.getProjectIssues({ + * project: foo.id, + * search: "foo", + * })); + * ``` */ export function getProjectIssuesOutput(args: GetProjectIssuesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectIssues(a, opts)) diff --git a/sdk/nodejs/getProjectMembership.ts b/sdk/nodejs/getProjectMembership.ts index 317fd4b19..4f681f5c7 100644 --- a/sdk/nodejs/getProjectMembership.ts +++ b/sdk/nodejs/getProjectMembership.ts @@ -12,6 +12,18 @@ import * as utilities from "./utilities"; * > **Note** exactly one of projectId or fullPath must be provided. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectMembership({ + * inherited: true, + * projectId: 123, + * }); + * ``` */ export function getProjectMembership(args?: GetProjectMembershipArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -82,6 +94,18 @@ export interface GetProjectMembershipResult { * > **Note** exactly one of projectId or fullPath must be provided. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectMembership({ + * inherited: true, + * projectId: 123, + * }); + * ``` */ export function getProjectMembershipOutput(args?: GetProjectMembershipOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectMembership(a, opts)) diff --git a/sdk/nodejs/getProjectMilestone.ts b/sdk/nodejs/getProjectMilestone.ts index d8e631e63..a76263b76 100644 --- a/sdk/nodejs/getProjectMilestone.ts +++ b/sdk/nodejs/getProjectMilestone.ts @@ -8,6 +8,18 @@ import * as utilities from "./utilities"; * The `gitlab.ProjectMilestone` data source allows get details of a project milestone. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectMilestone({ + * milestoneId: 10, + * project: "foo/bar", + * }); + * ``` */ export function getProjectMilestone(args: GetProjectMilestoneArgs, opts?: pulumi.InvokeOptions): Promise { @@ -97,6 +109,18 @@ export interface GetProjectMilestoneResult { * The `gitlab.ProjectMilestone` data source allows get details of a project milestone. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectMilestone({ + * milestoneId: 10, + * project: "foo/bar", + * }); + * ``` */ export function getProjectMilestoneOutput(args: GetProjectMilestoneOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectMilestone(a, opts)) diff --git a/sdk/nodejs/getProjectMilestones.ts b/sdk/nodejs/getProjectMilestones.ts index 230540c17..77b0ce68e 100644 --- a/sdk/nodejs/getProjectMilestones.ts +++ b/sdk/nodejs/getProjectMilestones.ts @@ -10,6 +10,17 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectMilestones` data source allows get details of a project milestones. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectMilestones({ + * project: "foo/bar", + * }); + * ``` */ export function getProjectMilestones(args: GetProjectMilestonesArgs, opts?: pulumi.InvokeOptions): Promise { @@ -86,6 +97,17 @@ export interface GetProjectMilestonesResult { * The `gitlab.getProjectMilestones` data source allows get details of a project milestones. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectMilestones({ + * project: "foo/bar", + * }); + * ``` */ export function getProjectMilestonesOutput(args: GetProjectMilestonesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectMilestones(a, opts)) diff --git a/sdk/nodejs/getProjectProtectedBranch.ts b/sdk/nodejs/getProjectProtectedBranch.ts index 7b2262a26..753070057 100644 --- a/sdk/nodejs/getProjectProtectedBranch.ts +++ b/sdk/nodejs/getProjectProtectedBranch.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * The `gitlabProtectedBranch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectProtectedBranch({ + * name: "main", + * projectId: "foo/bar/baz", + * }); + * ``` */ export function getProjectProtectedBranch(args: GetProjectProtectedBranchArgs, opts?: pulumi.InvokeOptions): Promise { @@ -71,6 +83,18 @@ export interface GetProjectProtectedBranchResult { * The `gitlabProtectedBranch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectProtectedBranch({ + * name: "main", + * projectId: "foo/bar/baz", + * }); + * ``` */ export function getProjectProtectedBranchOutput(args: GetProjectProtectedBranchOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectProtectedBranch(a, opts)) diff --git a/sdk/nodejs/getProjectProtectedBranches.ts b/sdk/nodejs/getProjectProtectedBranches.ts index e64877b92..9d2f47fa6 100644 --- a/sdk/nodejs/getProjectProtectedBranches.ts +++ b/sdk/nodejs/getProjectProtectedBranches.ts @@ -10,6 +10,17 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectProtectedBranches` data source allows details of the protected branches of a given project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectProtectedBranches({ + * projectId: "foo/bar/baz", + * }); + * ``` */ export function getProjectProtectedBranches(args: GetProjectProtectedBranchesArgs, opts?: pulumi.InvokeOptions): Promise { @@ -50,6 +61,17 @@ export interface GetProjectProtectedBranchesResult { * The `gitlab.getProjectProtectedBranches` data source allows details of the protected branches of a given project. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectProtectedBranches({ + * projectId: "foo/bar/baz", + * }); + * ``` */ export function getProjectProtectedBranchesOutput(args: GetProjectProtectedBranchesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectProtectedBranches(a, opts)) diff --git a/sdk/nodejs/getProjectTag.ts b/sdk/nodejs/getProjectTag.ts index 61fae1802..13562b339 100644 --- a/sdk/nodejs/getProjectTag.ts +++ b/sdk/nodejs/getProjectTag.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * The `gitlab.ProjectTag` data source allows details of a project tag to be retrieved by its name. * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProjectTag({ + * name: "example", + * project: "foo/bar", + * }); + * ``` */ export function getProjectTag(args: GetProjectTagArgs, opts?: pulumi.InvokeOptions): Promise { @@ -75,6 +87,18 @@ export interface GetProjectTagResult { * The `gitlab.ProjectTag` data source allows details of a project tag to be retrieved by its name. * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProjectTag({ + * name: "example", + * project: "foo/bar", + * }); + * ``` */ export function getProjectTagOutput(args: GetProjectTagOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectTag(a, opts)) diff --git a/sdk/nodejs/getProjectTags.ts b/sdk/nodejs/getProjectTags.ts index 0c743fc1a..95530d1e5 100644 --- a/sdk/nodejs/getProjectTags.ts +++ b/sdk/nodejs/getProjectTags.ts @@ -10,6 +10,17 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectTags` data source allows details of project tags to be retrieved by some search criteria. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectTags({ + * project: "foo/bar", + * }); + * ``` */ export function getProjectTags(args: GetProjectTagsArgs, opts?: pulumi.InvokeOptions): Promise { @@ -77,6 +88,17 @@ export interface GetProjectTagsResult { * The `gitlab.getProjectTags` data source allows details of project tags to be retrieved by some search criteria. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getProjectTags({ + * project: "foo/bar", + * }); + * ``` */ export function getProjectTagsOutput(args: GetProjectTagsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectTags(a, opts)) diff --git a/sdk/nodejs/getProjectVariable.ts b/sdk/nodejs/getProjectVariable.ts index b766731b2..eaa0e9416 100644 --- a/sdk/nodejs/getProjectVariable.ts +++ b/sdk/nodejs/getProjectVariable.ts @@ -8,6 +8,23 @@ import * as utilities from "./utilities"; * The `gitlab.ProjectVariable` data source allows to retrieve details about a project-level CI/CD variable. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProjectVariable({ + * key: "foo", + * project: "my/example/project", + * }); + * const bar = gitlab.getProjectVariable({ + * environmentScope: "staging/*", + * key: "bar", + * project: "my/example/project", + * }); + * ``` */ export function getProjectVariable(args: GetProjectVariableArgs, opts?: pulumi.InvokeOptions): Promise { @@ -82,6 +99,23 @@ export interface GetProjectVariableResult { * The `gitlab.ProjectVariable` data source allows to retrieve details about a project-level CI/CD variable. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = gitlab.getProjectVariable({ + * key: "foo", + * project: "my/example/project", + * }); + * const bar = gitlab.getProjectVariable({ + * environmentScope: "staging/*", + * key: "bar", + * project: "my/example/project", + * }); + * ``` */ export function getProjectVariableOutput(args: GetProjectVariableOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectVariable(a, opts)) diff --git a/sdk/nodejs/getProjectVariables.ts b/sdk/nodejs/getProjectVariables.ts index 407a012e3..37e3cb3f6 100644 --- a/sdk/nodejs/getProjectVariables.ts +++ b/sdk/nodejs/getProjectVariables.ts @@ -10,6 +10,21 @@ import * as utilities from "./utilities"; * The `gitlab.getProjectVariables` data source allows to retrieve all project-level CI/CD variables. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const vars = gitlab.getProjectVariables({ + * project: "my/example/project", + * }); + * const stagingVars = gitlab.getProjectVariables({ + * environmentScope: "staging/*", + * project: "my/example/project", + * }); + * ``` */ export function getProjectVariables(args: GetProjectVariablesArgs, opts?: pulumi.InvokeOptions): Promise { @@ -53,6 +68,21 @@ export interface GetProjectVariablesResult { * The `gitlab.getProjectVariables` data source allows to retrieve all project-level CI/CD variables. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const vars = gitlab.getProjectVariables({ + * project: "my/example/project", + * }); + * const stagingVars = gitlab.getProjectVariables({ + * environmentScope: "staging/*", + * project: "my/example/project", + * }); + * ``` */ export function getProjectVariablesOutput(args: GetProjectVariablesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjectVariables(a, opts)) diff --git a/sdk/nodejs/getProjects.ts b/sdk/nodejs/getProjects.ts index 3674b76d8..87d2ef404 100644 --- a/sdk/nodejs/getProjects.ts +++ b/sdk/nodejs/getProjects.ts @@ -14,6 +14,27 @@ import * as utilities from "./utilities"; * > The owner sub-attributes are only populated if the Gitlab token used has an administrator scope. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const mygroup = gitlab.getGroup({ + * fullPath: "mygroup", + * }); + * const groupProjects = mygroup.then(mygroup => gitlab.getProjects({ + * groupId: mygroup.id, + * orderBy: "name", + * includeSubgroups: true, + * withShared: false, + * })); + * const projects = gitlab.getProjects({ + * search: "postgresql", + * visibility: "private", + * }); + * ``` */ export function getProjects(args?: GetProjectsArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -236,6 +257,27 @@ export interface GetProjectsResult { * > The owner sub-attributes are only populated if the Gitlab token used has an administrator scope. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const mygroup = gitlab.getGroup({ + * fullPath: "mygroup", + * }); + * const groupProjects = mygroup.then(mygroup => gitlab.getProjects({ + * groupId: mygroup.id, + * orderBy: "name", + * includeSubgroups: true, + * withShared: false, + * })); + * const projects = gitlab.getProjects({ + * search: "postgresql", + * visibility: "private", + * }); + * ``` */ export function getProjectsOutput(args?: GetProjectsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getProjects(a, opts)) diff --git a/sdk/nodejs/getReleaseLink.ts b/sdk/nodejs/getReleaseLink.ts index c9c3755cc..1a4957a31 100644 --- a/sdk/nodejs/getReleaseLink.ts +++ b/sdk/nodejs/getReleaseLink.ts @@ -8,6 +8,19 @@ import * as utilities from "./utilities"; * The `gitlab.ReleaseLink` data source allows get details of a release link. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getReleaseLink({ + * linkId: 11, + * project: "foo/bar", + * tagName: "v1.0.1", + * }); + * ``` */ export function getReleaseLink(args: GetReleaseLinkArgs, opts?: pulumi.InvokeOptions): Promise { @@ -86,6 +99,19 @@ export interface GetReleaseLinkResult { * The `gitlab.ReleaseLink` data source allows get details of a release link. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getReleaseLink({ + * linkId: 11, + * project: "foo/bar", + * tagName: "v1.0.1", + * }); + * ``` */ export function getReleaseLinkOutput(args: GetReleaseLinkOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getReleaseLink(a, opts)) diff --git a/sdk/nodejs/getReleaseLinks.ts b/sdk/nodejs/getReleaseLinks.ts index bb9ab17dc..01bc07836 100644 --- a/sdk/nodejs/getReleaseLinks.ts +++ b/sdk/nodejs/getReleaseLinks.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * The `gitlab.getReleaseLinks` data source allows get details of release links. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getReleaseLinks({ + * project: "foo/bar", + * tagName: "v1.0.1", + * }); + * ``` */ export function getReleaseLinks(args: GetReleaseLinksArgs, opts?: pulumi.InvokeOptions): Promise { @@ -53,6 +65,18 @@ export interface GetReleaseLinksResult { * The `gitlab.getReleaseLinks` data source allows get details of release links. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getReleaseLinks({ + * project: "foo/bar", + * tagName: "v1.0.1", + * }); + * ``` */ export function getReleaseLinksOutput(args: GetReleaseLinksOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getReleaseLinks(a, opts)) diff --git a/sdk/nodejs/getRepositoryFile.ts b/sdk/nodejs/getRepositoryFile.ts index 2d20cb993..d62dc5f7a 100644 --- a/sdk/nodejs/getRepositoryFile.ts +++ b/sdk/nodejs/getRepositoryFile.ts @@ -8,6 +8,19 @@ import * as utilities from "./utilities"; * The `gitlab.RepositoryFile` data source allows details of a file in a repository to be retrieved. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getRepositoryFile({ + * filePath: "README.md", + * project: "example", + * ref: "main", + * }); + * ``` */ export function getRepositoryFile(args: GetRepositoryFileArgs, opts?: pulumi.InvokeOptions): Promise { @@ -98,6 +111,19 @@ export interface GetRepositoryFileResult { * The `gitlab.RepositoryFile` data source allows details of a file in a repository to be retrieved. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getRepositoryFile({ + * filePath: "README.md", + * project: "example", + * ref: "main", + * }); + * ``` */ export function getRepositoryFileOutput(args: GetRepositoryFileOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getRepositoryFile(a, opts)) diff --git a/sdk/nodejs/getRepositoryTree.ts b/sdk/nodejs/getRepositoryTree.ts index 6284bb923..e77b7e63d 100644 --- a/sdk/nodejs/getRepositoryTree.ts +++ b/sdk/nodejs/getRepositoryTree.ts @@ -10,6 +10,20 @@ import * as utilities from "./utilities"; * The `gitlab.getRepositoryTree` data source allows details of directories and files in a repository to be retrieved. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const this = gitlab.getRepositoryTree({ + * path: "ExampleSubFolder", + * project: "example", + * recursive: true, + * ref: "main", + * }); + * ``` */ export function getRepositoryTree(args: GetRepositoryTreeArgs, opts?: pulumi.InvokeOptions): Promise { @@ -74,6 +88,20 @@ export interface GetRepositoryTreeResult { * The `gitlab.getRepositoryTree` data source allows details of directories and files in a repository to be retrieved. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const this = gitlab.getRepositoryTree({ + * path: "ExampleSubFolder", + * project: "example", + * recursive: true, + * ref: "main", + * }); + * ``` */ export function getRepositoryTreeOutput(args: GetRepositoryTreeOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getRepositoryTree(a, opts)) diff --git a/sdk/nodejs/getUsers.ts b/sdk/nodejs/getUsers.ts index fa4405809..9fe16f853 100644 --- a/sdk/nodejs/getUsers.ts +++ b/sdk/nodejs/getUsers.ts @@ -14,6 +14,22 @@ import * as utilities from "./utilities"; * > Some available options require administrator privileges. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getUsers({ + * createdBefore: "2019-01-01", + * orderBy: "name", + * sort: "desc", + * }); + * const example-two = gitlab.getUsers({ + * search: "username", + * }); + * ``` */ export function getUsers(args?: GetUsersArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -128,6 +144,22 @@ export interface GetUsersResult { * > Some available options require administrator privileges. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = gitlab.getUsers({ + * createdBefore: "2019-01-01", + * orderBy: "name", + * sort: "desc", + * }); + * const example-two = gitlab.getUsers({ + * search: "username", + * }); + * ``` */ export function getUsersOutput(args?: GetUsersOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getUsers(a, opts)) diff --git a/sdk/nodejs/group.ts b/sdk/nodejs/group.ts index fa06ae1d2..33dc4bf6d 100644 --- a/sdk/nodejs/group.ts +++ b/sdk/nodejs/group.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleGroup = new gitlab.Group("exampleGroup", { + * path: "example", + * description: "An example group", + * }); + * // Create a project in the example group + * const exampleProject = new gitlab.Project("exampleProject", { + * description: "An example project", + * namespaceId: exampleGroup.id, + * }); + * ``` + * * ## Import * * ```sh diff --git a/sdk/nodejs/groupAccessToken.ts b/sdk/nodejs/groupAccessToken.ts index a90bf15ca..5cdcd27ea 100644 --- a/sdk/nodejs/groupAccessToken.ts +++ b/sdk/nodejs/groupAccessToken.ts @@ -11,6 +11,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleGroupAccessToken = new gitlab.GroupAccessToken("exampleGroupAccessToken", { + * group: "25", + * expiresAt: "2020-03-14", + * accessLevel: "developer", + * scopes: ["api"], + * }); + * const exampleGroupVariable = new gitlab.GroupVariable("exampleGroupVariable", { + * group: "25", + * key: "gat", + * value: exampleGroupAccessToken.token, + * }); + * ``` + * * ## Import * * A GitLab Group Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/nodejs/groupBadge.ts b/sdk/nodejs/groupBadge.ts index 8fbd8bb1a..dbf0b94c5 100644 --- a/sdk/nodejs/groupBadge.ts +++ b/sdk/nodejs/groupBadge.ts @@ -9,6 +9,38 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.Group("foo", {}); + * const example = new gitlab.GroupBadge("example", { + * group: foo.id, + * linkUrl: "https://example.com/badge-123", + * imageUrl: "https://example.com/badge-123.svg", + * }); + * // Pipeline status badges with placeholders will be enabled for each project + * const gitlabPipeline = new gitlab.GroupBadge("gitlabPipeline", { + * group: foo.id, + * linkUrl: "https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + * imageUrl: "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg", + * }); + * // Test coverage report badges with placeholders will be enabled for each project + * const gitlabCoverage = new gitlab.GroupBadge("gitlabCoverage", { + * group: foo.id, + * linkUrl: "https://gitlab.example.com/%{project_path}/-/jobs", + * imageUrl: "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg", + * }); + * // Latest release badges with placeholders will be enabled for each project + * const gitlabRelease = new gitlab.GroupBadge("gitlabRelease", { + * group: foo.id, + * linkUrl: "https://gitlab.example.com/%{project_path}/-/releases", + * imageUrl: "https://gitlab.example.com/%{project_path}/-/badges/release.svg", + * }); + * ``` + * * ## Import * * GitLab group badges can be imported using an id made up of `{group_id}:{badge_id}`, e.g. diff --git a/sdk/nodejs/groupCluster.ts b/sdk/nodejs/groupCluster.ts index 936c0c157..6099bad0c 100644 --- a/sdk/nodejs/groupCluster.ts +++ b/sdk/nodejs/groupCluster.ts @@ -11,6 +11,26 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_clusters.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.Group("foo", {path: "foo-path"}); + * const bar = new gitlab.GroupCluster("bar", { + * group: foo.id, + * domain: "example.com", + * enabled: true, + * kubernetesApiUrl: "https://124.124.124", + * kubernetesToken: "some-token", + * kubernetesCaCert: "some-cert", + * kubernetesAuthorizationType: "rbac", + * environmentScope: "*", + * managementProjectId: "123456", + * }); + * ``` + * * ## Import * * GitLab group clusters can be imported using an id made up of `groupid:clusterid`, e.g. diff --git a/sdk/nodejs/groupCustomAttribute.ts b/sdk/nodejs/groupCustomAttribute.ts index e918225f5..8015f7973 100644 --- a/sdk/nodejs/groupCustomAttribute.ts +++ b/sdk/nodejs/groupCustomAttribute.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const attr = new gitlab.GroupCustomAttribute("attr", { + * group: 42, + * key: "location", + * value: "Greenland", + * }); + * ``` + * * ## Import * * You can import a group custom attribute using the an id made up of `{group-id}:{key}`, e.g. diff --git a/sdk/nodejs/groupEpicBoard.ts b/sdk/nodejs/groupEpicBoard.ts index 68908eebe..a50883e77 100644 --- a/sdk/nodejs/groupEpicBoard.ts +++ b/sdk/nodejs/groupEpicBoard.ts @@ -13,6 +13,32 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_boards.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.Group("example", { + * path: "test_group", + * description: "An example group", + * }); + * const label1 = new gitlab.GroupLabel("label1", { + * group: example.id, + * color: "#FF0000", + * }); + * const label3 = new gitlab.GroupLabel("label3", { + * group: example.id, + * color: "#003000", + * }); + * const epicBoard = new gitlab.GroupEpicBoard("epicBoard", { + * group: example.path, + * lists: [{ + * labelId: label1.labelId, + * }], + * }); + * ``` + * * ## Import * * You can import this resource with an id made up of `{group-id}:{epic-board-id}`, e.g. diff --git a/sdk/nodejs/groupHook.ts b/sdk/nodejs/groupHook.ts index 8b9cd3241..f73279cde 100644 --- a/sdk/nodejs/groupHook.ts +++ b/sdk/nodejs/groupHook.ts @@ -9,6 +9,40 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.GroupHook("example", { + * group: "example/hooked", + * mergeRequestsEvents: true, + * url: "https://example.com/hook/example", + * }); + * // Setting all attributes + * const allAttributes = new gitlab.GroupHook("allAttributes", { + * confidentialIssuesEvents: false, + * confidentialNoteEvents: true, + * deploymentEvents: true, + * enableSslVerification: false, + * group: "1", + * issuesEvents: false, + * jobEvents: true, + * mergeRequestsEvents: true, + * noteEvents: true, + * pipelineEvents: true, + * pushEvents: true, + * pushEventsBranchFilter: "devel", + * releasesEvents: true, + * subgroupEvents: true, + * tagPushEvents: true, + * token: "supersecret", + * url: "http://example.com", + * wikiPageEvents: true, + * }); + * ``` + * * ## Import * * A GitLab Group Hook can be imported using a key composed of `:`, e.g. diff --git a/sdk/nodejs/groupLabel.ts b/sdk/nodejs/groupLabel.ts index 4301c1475..3f5c699d8 100644 --- a/sdk/nodejs/groupLabel.ts +++ b/sdk/nodejs/groupLabel.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/labels.html#group-labels) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const fixme = new gitlab.GroupLabel("fixme", { + * color: "#ffcc00", + * description: "issue with failing tests", + * group: "example", + * }); + * ``` + * * ## Import * * Gitlab group labels can be imported using an id made up of `{group_id}:{group_label_id}`, e.g. diff --git a/sdk/nodejs/groupMembership.ts b/sdk/nodejs/groupMembership.ts index fc79b0a05..2ced06cce 100644 --- a/sdk/nodejs/groupMembership.ts +++ b/sdk/nodejs/groupMembership.ts @@ -11,6 +11,20 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const test = new gitlab.GroupMembership("test", { + * accessLevel: "guest", + * expiresAt: "2020-12-31", + * groupId: "12345", + * userId: 1337, + * }); + * ``` + * * ## Import * * GitLab group membership can be imported using an id made up of `group_id:user_id`, e.g. diff --git a/sdk/nodejs/groupProjectFileTemplate.ts b/sdk/nodejs/groupProjectFileTemplate.ts index 26e653261..3a462f086 100644 --- a/sdk/nodejs/groupProjectFileTemplate.ts +++ b/sdk/nodejs/groupProjectFileTemplate.ts @@ -14,6 +14,27 @@ import * as utilities from "./utilities"; * > This resource requires a GitLab Enterprise instance with a Premium license. * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#update-group) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.Group("foo", { + * path: "group", + * description: "An example group", + * }); + * const bar = new gitlab.Project("bar", { + * description: "contains file templates", + * visibilityLevel: "public", + * namespaceId: foo.id, + * }); + * const templateLink = new gitlab.GroupProjectFileTemplate("templateLink", { + * groupId: foo.id, + * fileTemplateProjectId: bar.id, + * }); + * ``` */ export class GroupProjectFileTemplate extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/groupSamlLink.ts b/sdk/nodejs/groupSamlLink.ts index 443ba964f..91274ff34 100644 --- a/sdk/nodejs/groupSamlLink.ts +++ b/sdk/nodejs/groupSamlLink.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#saml-group-links) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const test = new gitlab.GroupSamlLink("test", { + * accessLevel: "developer", + * group: "12345", + * samlGroupName: "samlgroupname1", + * }); + * ``` + * * ## Import * * GitLab group saml links can be imported using an id made up of `group_id:saml_group_name`, e.g. diff --git a/sdk/nodejs/groupShareGroup.ts b/sdk/nodejs/groupShareGroup.ts index dca11f10e..fbe753e37 100644 --- a/sdk/nodejs/groupShareGroup.ts +++ b/sdk/nodejs/groupShareGroup.ts @@ -9,6 +9,20 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#share-groups-with-groups) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const test = new gitlab.GroupShareGroup("test", { + * groupId: gitlab_group.foo.id, + * shareGroupId: gitlab_group.bar.id, + * groupAccess: "guest", + * expiresAt: "2099-01-01", + * }); + * ``` + * * ## Import * * GitLab group shares can be imported using an id made up of `mainGroupId:shareGroupId`, e.g. diff --git a/sdk/nodejs/groupVariable.ts b/sdk/nodejs/groupVariable.ts index 14834269c..a76ffd48f 100644 --- a/sdk/nodejs/groupVariable.ts +++ b/sdk/nodejs/groupVariable.ts @@ -9,6 +9,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.GroupVariable("example", { + * environmentScope: "*", + * group: "12345", + * key: "group_variable_key", + * masked: false, + * "protected": false, + * value: "group_variable_value", + * }); + * ``` + * * ## Import * * GitLab group variables can be imported using an id made up of `groupid:variablename:scope`, e.g. diff --git a/sdk/nodejs/instanceCluster.ts b/sdk/nodejs/instanceCluster.ts index 69404b034..ca753dbeb 100644 --- a/sdk/nodejs/instanceCluster.ts +++ b/sdk/nodejs/instanceCluster.ts @@ -11,6 +11,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_clusters.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const bar = new gitlab.InstanceCluster("bar", { + * domain: "example.com", + * enabled: true, + * environmentScope: "*", + * kubernetesApiUrl: "https://124.124.124", + * kubernetesAuthorizationType: "rbac", + * kubernetesCaCert: "some-cert", + * kubernetesNamespace: "namespace", + * kubernetesToken: "some-token", + * managementProjectId: "123456", + * }); + * ``` + * * ## Import * * GitLab instance clusters can be imported using a `clusterid`, e.g. diff --git a/sdk/nodejs/instanceVariable.ts b/sdk/nodejs/instanceVariable.ts index 395c285d6..dd4e1056a 100644 --- a/sdk/nodejs/instanceVariable.ts +++ b/sdk/nodejs/instanceVariable.ts @@ -9,6 +9,20 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.InstanceVariable("example", { + * key: "instance_variable_key", + * masked: false, + * "protected": false, + * value: "instance_variable_value", + * }); + * ``` + * * ## Import * * GitLab instance variables can be imported using an id made up of `variablename`, e.g. diff --git a/sdk/nodejs/integrationCustomIssueTracker.ts b/sdk/nodejs/integrationCustomIssueTracker.ts index 8f4b457f4..b334060ed 100644 --- a/sdk/nodejs/integrationCustomIssueTracker.ts +++ b/sdk/nodejs/integrationCustomIssueTracker.ts @@ -9,6 +9,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const tracker = new gitlab.IntegrationCustomIssueTracker("tracker", { + * project: awesomeProject.id, + * projectUrl: "https://customtracker.com/issues", + * issuesUrl: "https://customtracker.com/TEST-:id", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/nodejs/integrationEmailsOnPush.ts b/sdk/nodejs/integrationEmailsOnPush.ts index fd3a14634..4e93fe7c9 100644 --- a/sdk/nodejs/integrationEmailsOnPush.ts +++ b/sdk/nodejs/integrationEmailsOnPush.ts @@ -9,6 +9,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const emails = new gitlab.IntegrationEmailsOnPush("emails", { + * project: awesomeProject.id, + * recipients: "myrecipient@example.com myotherrecipient@example.com", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_emails_on_push state using the project ID, e.g. diff --git a/sdk/nodejs/integrationExternalWiki.ts b/sdk/nodejs/integrationExternalWiki.ts index 0b4a0c8ac..700c8ce1c 100644 --- a/sdk/nodejs/integrationExternalWiki.ts +++ b/sdk/nodejs/integrationExternalWiki.ts @@ -9,6 +9,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const wiki = new gitlab.IntegrationExternalWiki("wiki", { + * project: awesomeProject.id, + * externalWikiUrl: "https://MyAwesomeExternalWikiURL.com", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_external_wiki state using the project ID, e.g. diff --git a/sdk/nodejs/integrationGithub.ts b/sdk/nodejs/integrationGithub.ts index de8c04467..bcb404968 100644 --- a/sdk/nodejs/integrationGithub.ts +++ b/sdk/nodejs/integrationGithub.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const github = new gitlab.IntegrationGithub("github", { + * project: awesomeProject.id, + * token: "REDACTED", + * repositoryUrl: "https://github.com/gitlabhq/terraform-provider-gitlab", + * }); + * ``` + * * ## Import * * ```sh diff --git a/sdk/nodejs/integrationJira.ts b/sdk/nodejs/integrationJira.ts index 98888ce7f..dc523fb8a 100644 --- a/sdk/nodejs/integrationJira.ts +++ b/sdk/nodejs/integrationJira.ts @@ -9,6 +9,24 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const jira = new gitlab.IntegrationJira("jira", { + * project: awesomeProject.id, + * url: "https://jira.example.com", + * username: "user", + * password: "mypass", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_jira state using the project ID, e.g. diff --git a/sdk/nodejs/integrationMattermost.ts b/sdk/nodejs/integrationMattermost.ts index 2e804dbf0..a95865442 100644 --- a/sdk/nodejs/integrationMattermost.ts +++ b/sdk/nodejs/integrationMattermost.ts @@ -9,6 +9,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#mattermost-notifications) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const mattermost = new gitlab.IntegrationMattermost("mattermost", { + * project: awesomeProject.id, + * webhook: "https://webhook.com", + * username: "myuser", + * pushEvents: true, + * pushChannel: "push_chan", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_mattermost.mattermost state using the project ID, e.g. diff --git a/sdk/nodejs/integrationMicrosoftTeams.ts b/sdk/nodejs/integrationMicrosoftTeams.ts index 5dac2a478..768ab804d 100644 --- a/sdk/nodejs/integrationMicrosoftTeams.ts +++ b/sdk/nodejs/integrationMicrosoftTeams.ts @@ -9,6 +9,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const teams = new gitlab.IntegrationMicrosoftTeams("teams", { + * project: awesomeProject.id, + * webhook: "https://testurl.com/?token=XYZ", + * pushEvents: true, + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_microsoft_teams state using the project ID, e.g. diff --git a/sdk/nodejs/integrationPipelinesEmail.ts b/sdk/nodejs/integrationPipelinesEmail.ts index 2e50345c3..bdf8ed96f 100644 --- a/sdk/nodejs/integrationPipelinesEmail.ts +++ b/sdk/nodejs/integrationPipelinesEmail.ts @@ -9,6 +9,24 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const email = new gitlab.IntegrationPipelinesEmail("email", { + * project: awesomeProject.id, + * recipients: ["gitlab@user.create"], + * notifyOnlyBrokenPipelines: true, + * branchesToBeNotified: "all", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_pipelines_email state using the project ID, e.g. diff --git a/sdk/nodejs/integrationSlack.ts b/sdk/nodejs/integrationSlack.ts index ad5da65a0..5cc566dad 100644 --- a/sdk/nodejs/integrationSlack.ts +++ b/sdk/nodejs/integrationSlack.ts @@ -9,6 +9,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const slack = new gitlab.IntegrationSlack("slack", { + * project: awesomeProject.id, + * webhook: "https://webhook.com", + * username: "myuser", + * pushEvents: true, + * pushChannel: "push_chan", + * }); + * ``` + * * ## Import * * You can import a gitlab_integration_slack.slack state using the project ID, e.g. diff --git a/sdk/nodejs/pagesDomain.ts b/sdk/nodejs/pagesDomain.ts index 5fda8a6e1..e13760cbd 100644 --- a/sdk/nodejs/pagesDomain.ts +++ b/sdk/nodejs/pagesDomain.ts @@ -9,6 +9,28 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pages_domains.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as fs from "fs"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // Example using auto_ssl_enabled, which uses lets encrypt to generate a certificate + * const thisPagesDomain = new gitlab.PagesDomain("thisPagesDomain", { + * project: "123", + * domain: "example.com", + * autoSslEnabled: true, + * }); + * // Example using a manually generated certificate and key + * const thisIndex_pagesDomainPagesDomain = new gitlab.PagesDomain("thisIndex/pagesDomainPagesDomain", { + * project: "123", + * domain: "example.com", + * key: fs.readFileSync(`${path.module}/key.pem`), + * certificate: fs.readFileSync(`${path.module}/cert.pem`), + * }); + * ``` + * * ## Import * * GitLab pages domain can be imported using an id made up of `projectId:domain` _without_ the http protocol, e.g. diff --git a/sdk/nodejs/personalAccessToken.ts b/sdk/nodejs/personalAccessToken.ts index ff81fbbdd..66b4b77b9 100644 --- a/sdk/nodejs/personalAccessToken.ts +++ b/sdk/nodejs/personalAccessToken.ts @@ -11,6 +11,24 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/personal_access_tokens.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const examplePersonalAccessToken = new gitlab.PersonalAccessToken("examplePersonalAccessToken", { + * userId: 25, + * expiresAt: "2020-03-14", + * scopes: ["api"], + * }); + * const exampleProjectVariable = new gitlab.ProjectVariable("exampleProjectVariable", { + * project: gitlab_project.example.id, + * key: "pat", + * value: examplePersonalAccessToken.token, + * }); + * ``` + * * ## Import * * A GitLab Personal Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/nodejs/pipelineSchedule.ts b/sdk/nodejs/pipelineSchedule.ts index 32db6a3e2..79125d793 100644 --- a/sdk/nodejs/pipelineSchedule.ts +++ b/sdk/nodejs/pipelineSchedule.ts @@ -9,6 +9,20 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.PipelineSchedule("example", { + * cron: "0 1 * * *", + * description: "Used to schedule builds", + * project: "12345", + * ref: "master", + * }); + * ``` + * * ## Import * * GitLab pipeline schedules can be imported using an id made up of `{project_id}:{pipeline_schedule_id}`, e.g. diff --git a/sdk/nodejs/pipelineScheduleVariable.ts b/sdk/nodejs/pipelineScheduleVariable.ts index 5af615684..48c11e9cb 100644 --- a/sdk/nodejs/pipelineScheduleVariable.ts +++ b/sdk/nodejs/pipelineScheduleVariable.ts @@ -9,6 +9,26 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html#pipeline-schedule-variables) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const examplePipelineSchedule = new gitlab.PipelineSchedule("examplePipelineSchedule", { + * project: "12345", + * description: "Used to schedule builds", + * ref: "master", + * cron: "0 1 * * *", + * }); + * const examplePipelineScheduleVariable = new gitlab.PipelineScheduleVariable("examplePipelineScheduleVariable", { + * project: examplePipelineSchedule.project, + * pipelineScheduleId: examplePipelineSchedule.pipelineScheduleId, + * key: "EXAMPLE_KEY", + * value: "example", + * }); + * ``` + * * ## Import * * Pipeline schedule variables can be imported using an id made up of `project_id:pipeline_schedule_id:key`, e.g. diff --git a/sdk/nodejs/pipelineTrigger.ts b/sdk/nodejs/pipelineTrigger.ts index 0e9edb2ac..ae75d3e17 100644 --- a/sdk/nodejs/pipelineTrigger.ts +++ b/sdk/nodejs/pipelineTrigger.ts @@ -9,6 +9,18 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_triggers.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.PipelineTrigger("example", { + * description: "Used to trigger builds", + * project: "12345", + * }); + * ``` + * * ## Import * * GitLab pipeline triggers can be imported using an id made up of `{project_id}:{pipeline_trigger_id}`, e.g. diff --git a/sdk/nodejs/project.ts b/sdk/nodejs/project.ts index e8740e93b..41d4bc4b4 100644 --- a/sdk/nodejs/project.ts +++ b/sdk/nodejs/project.ts @@ -7,6 +7,68 @@ import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.Project("example", { + * description: "My awesome codebase", + * visibilityLevel: "public", + * }); + * // Project with custom push rules + * const example_two = new gitlab.Project("example-two", {pushRules: { + * authorEmailRegex: "@example\\.com$", + * commitCommitterCheck: true, + * memberCheck: true, + * preventSecrets: true, + * }}); + * const peterParker = gitlab.getUser({ + * username: "peter_parker", + * }); + * const petersRepo = new gitlab.Project("petersRepo", { + * description: "This is a description", + * namespaceId: peterParker.then(peterParker => peterParker.namespaceId), + * }); + * // Fork a project + * const forkProject = new gitlab.Project("forkProject", { + * description: "This is a fork", + * forkedFromProjectId: example.id, + * }); + * // Fork a project and setup a pull mirror + * const forkIndex_projectProject = new gitlab.Project("forkIndex/projectProject", { + * description: "This is a fork", + * forkedFromProjectId: example.id, + * importUrl: example.httpUrlToRepo, + * mirror: true, + * }); + * // Create a project by importing it from a public project + * const importPublic = new gitlab.Project("importPublic", {importUrl: "https://gitlab.example.com/repo.git"}); + * // Create a project by importing it from a public project and setup the pull mirror + * const importPublicWithMirror = new gitlab.Project("importPublicWithMirror", { + * importUrl: "https://gitlab.example.com/repo.git", + * mirror: true, + * }); + * // Create a project by importing it from a private project + * const importPrivateProject = new gitlab.Project("importPrivateProject", { + * importUrl: "https://gitlab.example.com/repo.git", + * importUrlUsername: "user", + * importUrlPassword: "pass", + * }); + * // Create a project by importing it from a private project and setup the pull mirror + * const importPrivateWithMirror = new gitlab.Project("importPrivateWithMirror", { + * importUrl: "https://gitlab.example.com/repo.git", + * importUrlUsername: "user", + * importUrlPassword: "pass", + * mirror: true, + * }); + * // Create a project by importing it from a private project and provide credentials in `import_url` + * // NOTE: only use this if you really must, use `import_url_username` and `import_url_password` whenever possible + * // GitLab API will always return the `import_url` without credentials, therefore you must ignore the `import_url` for changes: + * const importPrivateIndex_projectProject = new gitlab.Project("importPrivateIndex/projectProject", {importUrl: "https://user:pass@gitlab.example.com/repo.git"}); + * ``` + * * ## Import * * ```sh diff --git a/sdk/nodejs/projectAccessToken.ts b/sdk/nodejs/projectAccessToken.ts index 7db0e12d3..f1d240246 100644 --- a/sdk/nodejs/projectAccessToken.ts +++ b/sdk/nodejs/projectAccessToken.ts @@ -9,6 +9,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/project_access_tokens.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleProjectAccessToken = new gitlab.ProjectAccessToken("exampleProjectAccessToken", { + * project: "25", + * expiresAt: "2020-03-14", + * accessLevel: "reporter", + * scopes: ["api"], + * }); + * const exampleProjectVariable = new gitlab.ProjectVariable("exampleProjectVariable", { + * project: gitlab_project.example.id, + * key: "pat", + * value: exampleProjectAccessToken.token, + * }); + * ``` + * * ## Import * * A GitLab Project Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/nodejs/projectBadge.ts b/sdk/nodejs/projectBadge.ts index b4196a727..8d0b84dcb 100644 --- a/sdk/nodejs/projectBadge.ts +++ b/sdk/nodejs/projectBadge.ts @@ -9,6 +9,38 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#project-badges) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.Project("foo", {}); + * const example = new gitlab.ProjectBadge("example", { + * project: foo.id, + * linkUrl: "https://example.com/badge-123", + * imageUrl: "https://example.com/badge-123.svg", + * }); + * // Pipeline status badges with placeholders will be enabled + * const gitlabPipeline = new gitlab.ProjectBadge("gitlabPipeline", { + * project: foo.id, + * linkUrl: "https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + * imageUrl: "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg", + * }); + * // Test coverage report badges with placeholders will be enabled + * const gitlabCoverage = new gitlab.ProjectBadge("gitlabCoverage", { + * project: foo.id, + * linkUrl: "https://gitlab.example.com/%{project_path}/-/jobs", + * imageUrl: "https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg", + * }); + * // Latest release badges with placeholders will be enabled + * const gitlabRelease = new gitlab.ProjectBadge("gitlabRelease", { + * project: foo.id, + * linkUrl: "https://gitlab.example.com/%{project_path}/-/releases", + * imageUrl: "https://gitlab.example.com/%{project_path}/-/badges/release.svg", + * }); + * ``` + * * ## Import * * GitLab project badges can be imported using an id made up of `{project_id}:{badge_id}`, e.g. diff --git a/sdk/nodejs/projectCluster.ts b/sdk/nodejs/projectCluster.ts index b2eb90909..6b96cbbdb 100644 --- a/sdk/nodejs/projectCluster.ts +++ b/sdk/nodejs/projectCluster.ts @@ -11,6 +11,27 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_clusters.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.Project("foo", {}); + * const bar = new gitlab.ProjectCluster("bar", { + * project: foo.id, + * domain: "example.com", + * enabled: true, + * kubernetesApiUrl: "https://124.124.124", + * kubernetesToken: "some-token", + * kubernetesCaCert: "some-cert", + * kubernetesNamespace: "namespace", + * kubernetesAuthorizationType: "rbac", + * environmentScope: "*", + * managementProjectId: "123456", + * }); + * ``` + * * ## Import * * GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g. diff --git a/sdk/nodejs/projectComplianceFramework.ts b/sdk/nodejs/projectComplianceFramework.ts index 273a18f05..af99d6ecd 100644 --- a/sdk/nodejs/projectComplianceFramework.ts +++ b/sdk/nodejs/projectComplianceFramework.ts @@ -11,6 +11,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const sampleComplianceFramework = new gitlab.ComplianceFramework("sampleComplianceFramework", { + * namespacePath: "top-level-group", + * description: "A HIPAA Compliance Framework", + * color: "#87BEEF", + * "default": false, + * pipelineConfigurationFullPath: ".hipaa.yml@top-level-group/compliance-frameworks", + * }); + * const sampleProjectComplianceFramework = new gitlab.ProjectComplianceFramework("sampleProjectComplianceFramework", { + * complianceFrameworkId: sampleComplianceFramework.frameworkId, + * project: "12345678", + * }); + * ``` + * * ## Import * * Gitlab project compliance frameworks can be imported with a key composed of ``, e.g. diff --git a/sdk/nodejs/projectCustomAttribute.ts b/sdk/nodejs/projectCustomAttribute.ts index 1df1c4ef3..63863c007 100644 --- a/sdk/nodejs/projectCustomAttribute.ts +++ b/sdk/nodejs/projectCustomAttribute.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const attr = new gitlab.ProjectCustomAttribute("attr", { + * key: "location", + * project: 42, + * value: "Greenland", + * }); + * ``` + * * ## Import * * You can import a project custom attribute using an id made up of `{project-id}:{key}`, e.g. diff --git a/sdk/nodejs/projectEnvironment.ts b/sdk/nodejs/projectEnvironment.ts index 99b921482..296cc6d61 100644 --- a/sdk/nodejs/projectEnvironment.ts +++ b/sdk/nodejs/projectEnvironment.ts @@ -5,6 +5,26 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const thisGroup = new gitlab.Group("thisGroup", { + * path: "example", + * description: "An example group", + * }); + * const thisProject = new gitlab.Project("thisProject", { + * namespaceId: thisGroup.id, + * initializeWithReadme: true, + * }); + * const thisProjectEnvironment = new gitlab.ProjectEnvironment("thisProjectEnvironment", { + * project: thisProject.id, + * externalUrl: "www.example.com", + * }); + * ``` + * * ## Import * * GitLab project environments can be imported using an id made up of `projectId:environmenId`, e.g. diff --git a/sdk/nodejs/projectFreezePeriod.ts b/sdk/nodejs/projectFreezePeriod.ts index f8d4aba75..be58df639 100644 --- a/sdk/nodejs/projectFreezePeriod.ts +++ b/sdk/nodejs/projectFreezePeriod.ts @@ -9,6 +9,20 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/freeze_periods.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const schedule = new gitlab.ProjectFreezePeriod("schedule", { + * project: gitlab_project.foo.id, + * freezeStart: "0 23 * * 5", + * freezeEnd: "0 7 * * 1", + * cronTimezone: "UTC", + * }); + * ``` + * * ## Import * * GitLab project freeze periods can be imported using an id made up of `project_id:freeze_period_id`, e.g. diff --git a/sdk/nodejs/projectHook.ts b/sdk/nodejs/projectHook.ts index 27c09c179..e5d71d0a8 100644 --- a/sdk/nodejs/projectHook.ts +++ b/sdk/nodejs/projectHook.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#hooks) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.ProjectHook("example", { + * mergeRequestsEvents: true, + * project: "example/hooked", + * url: "https://example.com/hook/example", + * }); + * ``` + * * ## Import * * A GitLab Project Hook can be imported using a key composed of `:`, e.g. diff --git a/sdk/nodejs/projectIssue.ts b/sdk/nodejs/projectIssue.ts index 4f098325c..46c3bc1aa 100644 --- a/sdk/nodejs/projectIssue.ts +++ b/sdk/nodejs/projectIssue.ts @@ -7,6 +7,27 @@ import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.Project("foo", { + * description: "Lorem Ipsum", + * visibilityLevel: "public", + * }); + * const welcomeIssue = new gitlab.ProjectIssue("welcomeIssue", { + * project: foo.id, + * title: "Welcome!", + * description: pulumi.interpolate` Welcome to the ${foo.name} project! + * + * `, + * discussionLocked: true, + * }); + * export const welcomeIssueWebUrl = data.gitlab_project_issue.web_url; + * ``` + * * ## Import * * You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g. diff --git a/sdk/nodejs/projectLabel.ts b/sdk/nodejs/projectLabel.ts index f00e520ea..681b5bba7 100644 --- a/sdk/nodejs/projectLabel.ts +++ b/sdk/nodejs/projectLabel.ts @@ -9,6 +9,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/labels.html#project-labels) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const fixme = new gitlab.ProjectLabel("fixme", { + * project: "example", + * description: "issue with failing tests", + * color: "#ffcc00", + * }); + * // Scoped label + * const devopsCreate = new gitlab.ProjectLabel("devopsCreate", { + * project: gitlab_project.example.id, + * description: "issue for creating infrastructure resources", + * color: "#ffa500", + * }); + * ``` + * * ## Import * * Gitlab Project labels can be imported using an id made up of `{project_id}:{group_label_id}`, e.g. diff --git a/sdk/nodejs/projectLevelMrApprovals.ts b/sdk/nodejs/projectLevelMrApprovals.ts index 1c3e3e91e..fb7db8bdd 100644 --- a/sdk/nodejs/projectLevelMrApprovals.ts +++ b/sdk/nodejs/projectLevelMrApprovals.ts @@ -11,6 +11,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const fooProject = new gitlab.Project("fooProject", {description: "My example project"}); + * const fooProjectLevelMrApprovals = new gitlab.ProjectLevelMrApprovals("fooProjectLevelMrApprovals", { + * project: fooProject.id, + * resetApprovalsOnPush: true, + * disableOverridingApproversPerMergeRequest: false, + * mergeRequestsAuthorApproval: false, + * mergeRequestsDisableCommittersApproval: true, + * }); + * ``` + * * ## Import * * ```sh diff --git a/sdk/nodejs/projectMembership.ts b/sdk/nodejs/projectMembership.ts index 558f05793..56b3a423a 100644 --- a/sdk/nodejs/projectMembership.ts +++ b/sdk/nodejs/projectMembership.ts @@ -11,6 +11,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const test = new gitlab.ProjectMembership("test", { + * accessLevel: "guest", + * project: "12345", + * userId: 1337, + * }); + * const example = new gitlab.ProjectMembership("example", { + * accessLevel: "guest", + * expiresAt: "2022-12-31", + * project: "67890", + * userId: 1234, + * }); + * ``` + * * ## Import * * GitLab project membership can be imported using an id made up of `project_id:user_id`, e.g. diff --git a/sdk/nodejs/projectMilestone.ts b/sdk/nodejs/projectMilestone.ts index cd4d9ab30..d4230c1ce 100644 --- a/sdk/nodejs/projectMilestone.ts +++ b/sdk/nodejs/projectMilestone.ts @@ -9,6 +9,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // Create a project for the milestone to use + * const exampleProject = new gitlab.Project("exampleProject", { + * description: "An example project", + * namespaceId: gitlab_group.example.id, + * }); + * const exampleProjectMilestone = new gitlab.ProjectMilestone("exampleProjectMilestone", { + * project: exampleProject.id, + * title: "example", + * }); + * ``` + * * ## Import * * Gitlab project milestone can be imported with a key composed of `:`, e.g. diff --git a/sdk/nodejs/projectMirror.ts b/sdk/nodejs/projectMirror.ts index ba67f8b74..d771dc8ab 100644 --- a/sdk/nodejs/projectMirror.ts +++ b/sdk/nodejs/projectMirror.ts @@ -20,6 +20,18 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/remote_mirrors.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.ProjectMirror("foo", { + * project: "1", + * url: "https://username:password@github.com/org/repository.git", + * }); + * ``` + * * ## Import * * GitLab project mirror can be imported using an id made up of `project_id:mirror_id`, e.g. diff --git a/sdk/nodejs/projectRunnerEnablement.ts b/sdk/nodejs/projectRunnerEnablement.ts index d985d7fb5..2565c60ba 100644 --- a/sdk/nodejs/projectRunnerEnablement.ts +++ b/sdk/nodejs/projectRunnerEnablement.ts @@ -9,6 +9,18 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#enable-a-runner-in-project) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const foo = new gitlab.ProjectRunnerEnablement("foo", { + * project: "5", + * runnerId: 7, + * }); + * ``` + * * ## Import * * GitLab project runners can be imported using an id made up of `project:runner_id`, e.g. diff --git a/sdk/nodejs/projectShareGroup.ts b/sdk/nodejs/projectShareGroup.ts index ca154cb38..0e2e998ad 100644 --- a/sdk/nodejs/projectShareGroup.ts +++ b/sdk/nodejs/projectShareGroup.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#share-project-with-group) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const test = new gitlab.ProjectShareGroup("test", { + * groupAccess: "guest", + * groupId: 1337, + * project: "12345", + * }); + * ``` + * * ## Import * * GitLab project group shares can be imported using an id made up of `projectid:groupid`, e.g. diff --git a/sdk/nodejs/projectTag.ts b/sdk/nodejs/projectTag.ts index bfef4ffcd..160ab6268 100644 --- a/sdk/nodejs/projectTag.ts +++ b/sdk/nodejs/projectTag.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // Create a project for the tag to use + * const exampleProject = new gitlab.Project("exampleProject", { + * description: "An example project", + * namespaceId: gitlab_group.example.id, + * }); + * const exampleProjectTag = new gitlab.ProjectTag("exampleProjectTag", { + * ref: "main", + * project: exampleProject.id, + * }); + * ``` + * * ## Import * * Gitlab project tags can be imported with a key composed of `:`, e.g. diff --git a/sdk/nodejs/projectVariable.ts b/sdk/nodejs/projectVariable.ts index 05bfef392..5fb072bc7 100644 --- a/sdk/nodejs/projectVariable.ts +++ b/sdk/nodejs/projectVariable.ts @@ -11,6 +11,20 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.ProjectVariable("example", { + * key: "project_variable_key", + * project: "12345", + * "protected": false, + * value: "project_variable_value", + * }); + * ``` + * * ## Import * * GitLab project variables can be imported using an id made up of `project:key:environment_scope`, e.g. diff --git a/sdk/nodejs/releaseLink.ts b/sdk/nodejs/releaseLink.ts index 5e09ebf6d..6af8c7172 100644 --- a/sdk/nodejs/releaseLink.ts +++ b/sdk/nodejs/releaseLink.ts @@ -9,6 +9,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // Create a project + * const exampleProject = new gitlab.Project("exampleProject", {description: "An example project"}); + * // Can create release link only to a tag associated with a release + * const exampleReleaseLink = new gitlab.ReleaseLink("exampleReleaseLink", { + * project: exampleProject.id, + * tagName: "tag_name_associated_with_release", + * url: "https://test/", + * }); + * ``` + * * ## Import * * Gitlab release link can be imported with a key composed of `::`, e.g. diff --git a/sdk/nodejs/runner.ts b/sdk/nodejs/runner.ts index 1d1e0a8e4..4f142379d 100644 --- a/sdk/nodejs/runner.ts +++ b/sdk/nodejs/runner.ts @@ -15,6 +15,54 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * import * as local from "@pulumi/local"; + * + * // Basic GitLab Group Runner + * const myGroup = new gitlab.Group("myGroup", {description: "group that holds the runners"}); + * const basicRunner = new gitlab.Runner("basicRunner", {registrationToken: myGroup.runnersToken}); + * // GitLab Runner that runs only tagged jobs + * const taggedOnly = new gitlab.Runner("taggedOnly", { + * registrationToken: myGroup.runnersToken, + * description: "I only run tagged jobs", + * runUntagged: false, + * tagLists: [ + * "tag_one", + * "tag_two", + * ], + * }); + * // GitLab Runner that only runs on protected branches + * const _protected = new gitlab.Runner("protected", { + * registrationToken: myGroup.runnersToken, + * description: "I only run protected jobs", + * accessLevel: "ref_protected", + * }); + * // Generate a `config.toml` file that you can use to create a runner + * // This is the typical workflow for this resource, using it to create an authentication_token which can then be used + * // to generate the `config.toml` file to prevent re-registering the runner every time new hardware is created. + * const myCustomGroup = new gitlab.Group("myCustomGroup", {description: "group that holds the custom runners"}); + * const myRunner = new gitlab.Runner("myRunner", {registrationToken: myCustomGroup.runnersToken}); + * // This creates a configuration for a local "shell" runner, but can be changed to generate whatever is needed. + * // Place this configuration file on a server at `/etc/gitlab-runner/config.toml`, then run `gitlab-runner start`. + * // See https://docs.gitlab.com/runner/configuration/advanced-configuration.html for more information. + * const config = new local.File("config", { + * filename: `${path.module}/config.toml`, + * content: pulumi.interpolate` concurrent = 1 + * + * [[runners]] + * name = "Hello Terraform" + * url = "https://example.gitlab.com/" + * token = "${myRunner.authenticationToken}" + * executor = "shell" + * + * `, + * }); + * ``` + * * ## Import * * A GitLab Runner can be imported using the runner's ID, eg diff --git a/sdk/nodejs/serviceCustomIssueTracker.ts b/sdk/nodejs/serviceCustomIssueTracker.ts index f090fb8f9..a0d331bc8 100644 --- a/sdk/nodejs/serviceCustomIssueTracker.ts +++ b/sdk/nodejs/serviceCustomIssueTracker.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const tracker = new gitlab.ServiceCustomIssueTracker("tracker", { + * project: awesomeProject.id, + * projectUrl: "https://customtracker.com/issues", + * issuesUrl: "https://customtracker.com/TEST-:id", + * }); + * ``` + * * ## Import * * You can import a gitlab_service_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/nodejs/serviceEmailsOnPush.ts b/sdk/nodejs/serviceEmailsOnPush.ts index 262f8fcbc..5c5a65012 100644 --- a/sdk/nodejs/serviceEmailsOnPush.ts +++ b/sdk/nodejs/serviceEmailsOnPush.ts @@ -11,6 +11,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const emails = new gitlab.ServiceEmailsOnPush("emails", { + * project: awesomeProject.id, + * recipients: "myrecipient@example.com myotherrecipient@example.com", + * }); + * ``` + * * ## Import * * You can import a gitlab_service_emails_on_push state using the project ID, e.g. diff --git a/sdk/nodejs/serviceExternalWiki.ts b/sdk/nodejs/serviceExternalWiki.ts index 5b3b48bd4..1c9c5d54b 100644 --- a/sdk/nodejs/serviceExternalWiki.ts +++ b/sdk/nodejs/serviceExternalWiki.ts @@ -11,6 +11,22 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const wiki = new gitlab.ServiceExternalWiki("wiki", { + * project: awesomeProject.id, + * externalWikiUrl: "https://MyAwesomeExternalWikiURL.com", + * }); + * ``` + * * ## Import * * You can import a gitlab_service_external_wiki state using the project ID, e.g. diff --git a/sdk/nodejs/serviceGithub.ts b/sdk/nodejs/serviceGithub.ts index af36b7fec..39c9c475f 100644 --- a/sdk/nodejs/serviceGithub.ts +++ b/sdk/nodejs/serviceGithub.ts @@ -13,6 +13,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const github = new gitlab.ServiceGithub("github", { + * project: awesomeProject.id, + * token: "REDACTED", + * repositoryUrl: "https://github.com/gitlabhq/terraform-provider-gitlab", + * }); + * ``` + * * ## Import * * ```sh diff --git a/sdk/nodejs/serviceJira.ts b/sdk/nodejs/serviceJira.ts index dbf083213..6f0c71cf6 100644 --- a/sdk/nodejs/serviceJira.ts +++ b/sdk/nodejs/serviceJira.ts @@ -11,6 +11,24 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const jira = new gitlab.ServiceJira("jira", { + * project: awesomeProject.id, + * url: "https://jira.example.com", + * username: "user", + * password: "mypass", + * }); + * ``` + * * ## Import * * You can import a gitlab_service_jira state using the project ID, e.g. diff --git a/sdk/nodejs/serviceMicrosoftTeams.ts b/sdk/nodejs/serviceMicrosoftTeams.ts index 50eed6695..10b675873 100644 --- a/sdk/nodejs/serviceMicrosoftTeams.ts +++ b/sdk/nodejs/serviceMicrosoftTeams.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const teams = new gitlab.ServiceMicrosoftTeams("teams", { + * project: awesomeProject.id, + * webhook: "https://testurl.com/?token=XYZ", + * pushEvents: true, + * }); + * ``` + * * ## Import * * You can import a gitlab_service_microsoft_teams state using the project ID, e.g. diff --git a/sdk/nodejs/servicePipelinesEmail.ts b/sdk/nodejs/servicePipelinesEmail.ts index a61cf2536..cb11ee63b 100644 --- a/sdk/nodejs/servicePipelinesEmail.ts +++ b/sdk/nodejs/servicePipelinesEmail.ts @@ -11,6 +11,24 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const email = new gitlab.ServicePipelinesEmail("email", { + * project: awesomeProject.id, + * recipients: ["gitlab@user.create"], + * notifyOnlyBrokenPipelines: true, + * branchesToBeNotified: "all", + * }); + * ``` + * * ## Import * * You can import a gitlab_service_pipelines_email state using the project ID, e.g. diff --git a/sdk/nodejs/serviceSlack.ts b/sdk/nodejs/serviceSlack.ts index eb6d57541..1abff08ad 100644 --- a/sdk/nodejs/serviceSlack.ts +++ b/sdk/nodejs/serviceSlack.ts @@ -11,6 +11,25 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const awesomeProject = new gitlab.Project("awesomeProject", { + * description: "My awesome project.", + * visibilityLevel: "public", + * }); + * const slack = new gitlab.ServiceSlack("slack", { + * project: awesomeProject.id, + * webhook: "https://webhook.com", + * username: "myuser", + * pushEvents: true, + * pushChannel: "push_chan", + * }); + * ``` + * * ## Import * * You can import a gitlab_service_slack.slack state using the project ID, e.g. diff --git a/sdk/nodejs/systemHook.ts b/sdk/nodejs/systemHook.ts index bc33da6fc..cabf0a236 100644 --- a/sdk/nodejs/systemHook.ts +++ b/sdk/nodejs/systemHook.ts @@ -11,6 +11,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/system_hooks.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.SystemHook("example", { + * enableSslVerification: true, + * mergeRequestsEvents: true, + * pushEvents: true, + * repositoryUpdateEvents: true, + * tagPushEvents: true, + * token: "secret-token", + * url: "https://example.com/hook-%d", + * }); + * ``` + * * ## Import * * You can import a system hook using the hook id `{hook-id}`, e.g. diff --git a/sdk/nodejs/tagProtection.ts b/sdk/nodejs/tagProtection.ts index 984a8134e..0a386c0f1 100644 --- a/sdk/nodejs/tagProtection.ts +++ b/sdk/nodejs/tagProtection.ts @@ -7,6 +7,27 @@ import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const tagProtect = new gitlab.TagProtection("tagProtect", { + * allowedToCreates: [ + * { + * userId: 42, + * }, + * { + * groupId: 43, + * }, + * ], + * createAccessLevel: "developer", + * project: "12345", + * tag: "TagProtected", + * }); + * ``` + * * ## Import * * Tag protections can be imported using an id made up of `project_id:tag_name`, e.g. diff --git a/sdk/nodejs/user.ts b/sdk/nodejs/user.ts index e206a8ffd..228995c80 100644 --- a/sdk/nodejs/user.ts +++ b/sdk/nodejs/user.ts @@ -13,6 +13,24 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const example = new gitlab.User("example", { + * canCreateGroup: false, + * email: "gitlab@user.create", + * isAdmin: true, + * isExternal: true, + * password: "superPassword", + * projectsLimit: 4, + * resetPassword: false, + * username: "example", + * }); + * ``` + * * ## Import * * ```sh diff --git a/sdk/nodejs/userCustomAttribute.ts b/sdk/nodejs/userCustomAttribute.ts index 4eaab7095..40402f361 100644 --- a/sdk/nodejs/userCustomAttribute.ts +++ b/sdk/nodejs/userCustomAttribute.ts @@ -9,6 +9,19 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const attr = new gitlab.UserCustomAttribute("attr", { + * key: "location", + * user: 42, + * value: "Greenland", + * }); + * ``` + * * ## Import * * You can import a user custom attribute using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/nodejs/userGpgKey.ts b/sdk/nodejs/userGpgKey.ts index 4ed5d16b9..76ee06668 100644 --- a/sdk/nodejs/userGpgKey.ts +++ b/sdk/nodejs/userGpgKey.ts @@ -11,6 +11,28 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html#get-a-specific-gpg-key) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleUser = gitlab.getUser({ + * username: "example-user", + * }); + * // Manages a GPG key for the specified user. An admin token is required if `user_id` is specified. + * const exampleUserGpgKey = new gitlab.UserGpgKey("exampleUserGpgKey", { + * userId: exampleUser.then(exampleUser => exampleUser.id), + * key: `-----BEGIN PGP PUBLIC KEY BLOCK----- + * ... + * -----END PGP PUBLIC KEY BLOCK-----`, + * }); + * // Manages a GPG key for the current user + * const exampleUserUserGpgKey = new gitlab.UserGpgKey("exampleUserUserGpgKey", {key: `-----BEGIN PGP PUBLIC KEY BLOCK----- + * ... + * -----END PGP PUBLIC KEY BLOCK-----`}); + * ``` + * * ## Import * * You can import a GPG key for a specific user using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/nodejs/userSshKey.ts b/sdk/nodejs/userSshKey.ts index c7587d901..85387d8e2 100644 --- a/sdk/nodejs/userSshKey.ts +++ b/sdk/nodejs/userSshKey.ts @@ -9,6 +9,23 @@ import * as utilities from "./utilities"; * * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/users.html#single-ssh-key) * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const exampleUser = gitlab.getUser({ + * username: "example-user", + * }); + * const exampleUserSshKey = new gitlab.UserSshKey("exampleUserSshKey", { + * userId: exampleUser.then(exampleUser => exampleUser.id), + * title: "example-key", + * key: "ssh-ed25519 AAAA...", + * expiresAt: "2016-01-21T00:00:00.000Z", + * }); + * ``` + * * ## Import * * You can import a user ssh key using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/python/pulumi_gitlab/application.py b/sdk/python/pulumi_gitlab/application.py index 5f033ea6d..2aa74054b 100644 --- a/sdk/python/pulumi_gitlab/application.py +++ b/sdk/python/pulumi_gitlab/application.py @@ -255,6 +255,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/applications.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + oidc = gitlab.Application("oidc", + confidential=True, + redirect_url="https://mycompany.com", + scopes=["openid"]) + ``` + ## Import Gitlab applications can be imported with their id, e.g. @@ -287,6 +299,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/applications.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + oidc = gitlab.Application("oidc", + confidential=True, + redirect_url="https://mycompany.com", + scopes=["openid"]) + ``` + ## Import Gitlab applications can be imported with their id, e.g. diff --git a/sdk/python/pulumi_gitlab/application_settings.py b/sdk/python/pulumi_gitlab/application_settings.py index 48310ce52..468bcd9e5 100644 --- a/sdk/python/pulumi_gitlab/application_settings.py +++ b/sdk/python/pulumi_gitlab/application_settings.py @@ -9970,7 +9970,18 @@ def __init__(__self__, wiki_page_max_content_bytes: Optional[pulumi.Input[int]] = None, __props__=None): """ - Create a ApplicationSettings resource with the given unique name, props, and options. + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Set the 2FA settings + this = gitlab.ApplicationSettings("this", + require_two_factor_authentication=True, + two_factor_grace_period=24) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] abuse_notification_email: If set, abuse reports are sent to this address. Abuse reports are always available in the Admin Area. @@ -10223,7 +10234,18 @@ def __init__(__self__, args: Optional[ApplicationSettingsArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a ApplicationSettings resource with the given unique name, props, and options. + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Set the 2FA settings + this = gitlab.ApplicationSettings("this", + require_two_factor_authentication=True, + two_factor_grace_period=24) + ``` + :param str resource_name: The name of the resource. :param ApplicationSettingsArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_gitlab/branch.py b/sdk/python/pulumi_gitlab/branch.py index d690f7b62..a928ab167 100644 --- a/sdk/python/pulumi_gitlab/branch.py +++ b/sdk/python/pulumi_gitlab/branch.py @@ -323,6 +323,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project for the branch to use + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=gitlab_group["example"]["id"]) + example_branch = gitlab.Branch("exampleBranch", + ref="main", + project=example_project.id) + ``` + ## Import Gitlab branches can be imported with a key composed of `:`, e.g. @@ -348,6 +363,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project for the branch to use + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=gitlab_group["example"]["id"]) + example_branch = gitlab.Branch("exampleBranch", + ref="main", + project=example_project.id) + ``` + ## Import Gitlab branches can be imported with a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/cluster_agent.py b/sdk/python/pulumi_gitlab/cluster_agent.py index 237a51173..39137cd85 100644 --- a/sdk/python/pulumi_gitlab/cluster_agent.py +++ b/sdk/python/pulumi_gitlab/cluster_agent.py @@ -200,6 +200,27 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.ClusterAgent("example", project="12345") + # Optionally, configure the agent as described in + # https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#create-an-agent-configuration-file + example_agent_config = gitlab.RepositoryFile("exampleAgentConfig", + project=example.project, + branch="main", + file_path=example.name.apply(lambda name: f".gitlab/agents/{name}"), + content=\"\"\" gitops: + ... + \"\"\", + author_email="terraform@example.com", + author_name="Terraform", + commit_message=example.name.apply(lambda name: f"feature: add agent config for {name}")) + ``` + ## Import GitLab Agent for Kubernetes can be imported with the following command and the id pattern `:` @@ -233,6 +254,27 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.ClusterAgent("example", project="12345") + # Optionally, configure the agent as described in + # https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#create-an-agent-configuration-file + example_agent_config = gitlab.RepositoryFile("exampleAgentConfig", + project=example.project, + branch="main", + file_path=example.name.apply(lambda name: f".gitlab/agents/{name}"), + content=\"\"\" gitops: + ... + \"\"\", + author_email="terraform@example.com", + author_name="Terraform", + commit_message=example.name.apply(lambda name: f"feature: add agent config for {name}")) + ``` + ## Import GitLab Agent for Kubernetes can be imported with the following command and the id pattern `:` diff --git a/sdk/python/pulumi_gitlab/cluster_agent_token.py b/sdk/python/pulumi_gitlab/cluster_agent_token.py index ca166ca57..2d94afe22 100644 --- a/sdk/python/pulumi_gitlab/cluster_agent_token.py +++ b/sdk/python/pulumi_gitlab/cluster_agent_token.py @@ -330,6 +330,37 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html#create-an-agent-token) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + import pulumi_helm as helm + + # Create token for an agent + example = gitlab.ClusterAgentToken("example", + project="12345", + agent_id=42, + description="some token") + this_project = gitlab.get_project(path_with_namespace="my-org/example") + this_cluster_agent = gitlab.ClusterAgent("thisClusterAgent", project=this_project.id) + this_cluster_agent_token = gitlab.ClusterAgentToken("thisClusterAgentToken", + project=this_project.id, + agent_id=this_cluster_agent.agent_id, + description="Token for the my-agent used with `gitlab-agent` Helm Chart") + gitlab_agent = helm.index.Helm_release("gitlabAgent", + name=gitlab-agent, + namespace=gitlab-agent, + create_namespace=True, + repository=https://charts.gitlab.io, + chart=gitlab-agent, + version=1.2.0, + set=[{ + name: config.token, + value: this_cluster_agent_token.token, + }]) + ``` + ## Import A token for a GitLab Agent for Kubernetes can be imported with the following command and the id pattern `::` @@ -362,6 +393,37 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html#create-an-agent-token) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + import pulumi_helm as helm + + # Create token for an agent + example = gitlab.ClusterAgentToken("example", + project="12345", + agent_id=42, + description="some token") + this_project = gitlab.get_project(path_with_namespace="my-org/example") + this_cluster_agent = gitlab.ClusterAgent("thisClusterAgent", project=this_project.id) + this_cluster_agent_token = gitlab.ClusterAgentToken("thisClusterAgentToken", + project=this_project.id, + agent_id=this_cluster_agent.agent_id, + description="Token for the my-agent used with `gitlab-agent` Helm Chart") + gitlab_agent = helm.index.Helm_release("gitlabAgent", + name=gitlab-agent, + namespace=gitlab-agent, + create_namespace=True, + repository=https://charts.gitlab.io, + chart=gitlab-agent, + version=1.2.0, + set=[{ + name: config.token, + value: this_cluster_agent_token.token, + }]) + ``` + ## Import A token for a GitLab Agent for Kubernetes can be imported with the following command and the id pattern `::` diff --git a/sdk/python/pulumi_gitlab/compliance_framework.py b/sdk/python/pulumi_gitlab/compliance_framework.py index 7d0852365..fae5505a4 100644 --- a/sdk/python/pulumi_gitlab/compliance_framework.py +++ b/sdk/python/pulumi_gitlab/compliance_framework.py @@ -315,6 +315,20 @@ def __init__(__self__, **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + sample = gitlab.ComplianceFramework("sample", + color="#87BEEF", + default=False, + description="A HIPAA Compliance Framework", + namespace_path="top-level-group", + pipeline_configuration_full_path=".hipaa.yml@top-level-group/compliance-frameworks") + ``` + ## Import Gitlab compliance frameworks can be imported with a key composed of `:`, e.g. @@ -349,6 +363,20 @@ def __init__(__self__, **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + sample = gitlab.ComplianceFramework("sample", + color="#87BEEF", + default=False, + description="A HIPAA Compliance Framework", + namespace_path="top-level-group", + pipeline_configuration_full_path=".hipaa.yml@top-level-group/compliance-frameworks") + ``` + ## Import Gitlab compliance frameworks can be imported with a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/deploy_key.py b/sdk/python/pulumi_gitlab/deploy_key.py index 22f2f422b..2236cdc38 100644 --- a/sdk/python/pulumi_gitlab/deploy_key.py +++ b/sdk/python/pulumi_gitlab/deploy_key.py @@ -233,6 +233,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.DeployKey("example", + key="ssh-ed25519 AAAA...", + project="example/deploying", + title="Example deploy key") + ``` + ## Import GitLab deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example @@ -265,6 +277,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.DeployKey("example", + key="ssh-ed25519 AAAA...", + project="example/deploying", + title="Example deploy key") + ``` + ## Import GitLab deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/python/pulumi_gitlab/deploy_key_enable.py b/sdk/python/pulumi_gitlab/deploy_key_enable.py index ba149c10f..30b38896b 100644 --- a/sdk/python/pulumi_gitlab/deploy_key_enable.py +++ b/sdk/python/pulumi_gitlab/deploy_key_enable.py @@ -251,6 +251,27 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#enable-a-deploy-key) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # A repo to host the deployment key + parent_project = gitlab.Project("parentProject") + # A second repo to use the deployment key from the parent project + foo_project = gitlab.Project("fooProject") + # Upload a deployment key for the parent repo + parent_deploy_key = gitlab.DeployKey("parentDeployKey", + project=parent_project.id, + title="Example deploy key", + key="ssh-ed25519 AAAA...") + # Enable the deployment key on the second repo + foo_deploy_key_enable = gitlab.DeployKeyEnable("fooDeployKeyEnable", + project=foo_project.id, + key_id=parent_deploy_key.deploy_key_id) + ``` + ## Import GitLab enabled deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example @@ -282,6 +303,27 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#enable-a-deploy-key) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # A repo to host the deployment key + parent_project = gitlab.Project("parentProject") + # A second repo to use the deployment key from the parent project + foo_project = gitlab.Project("fooProject") + # Upload a deployment key for the parent repo + parent_deploy_key = gitlab.DeployKey("parentDeployKey", + project=parent_project.id, + title="Example deploy key", + key="ssh-ed25519 AAAA...") + # Enable the deployment key on the second repo + foo_deploy_key_enable = gitlab.DeployKeyEnable("fooDeployKeyEnable", + project=foo_project.id, + key_id=parent_deploy_key.deploy_key_id) + ``` + ## Import GitLab enabled deploy keys can be imported using an id made up of `{project_id}:{deploy_key_id}`, e.g. `project_id` can be whatever the [get single project api][get_single_project] takes for its `:id` value, so for example diff --git a/sdk/python/pulumi_gitlab/get_branch.py b/sdk/python/pulumi_gitlab/get_branch.py index ae3b56053..91f3ac705 100644 --- a/sdk/python/pulumi_gitlab/get_branch.py +++ b/sdk/python/pulumi_gitlab/get_branch.py @@ -173,6 +173,16 @@ def get_branch(name: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_branch(name="example", + project="foo/bar") + ``` + :param str name: The name of the branch. :param str project: The full path or id of the project. @@ -206,6 +216,16 @@ def get_branch_output(name: Optional[pulumi.Input[str]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_branch(name="example", + project="foo/bar") + ``` + :param str name: The name of the branch. :param str project: The full path or id of the project. diff --git a/sdk/python/pulumi_gitlab/get_cluster_agent.py b/sdk/python/pulumi_gitlab/get_cluster_agent.py index 403819888..9d536bfbc 100644 --- a/sdk/python/pulumi_gitlab/get_cluster_agent.py +++ b/sdk/python/pulumi_gitlab/get_cluster_agent.py @@ -114,6 +114,16 @@ def get_cluster_agent(agent_id: Optional[int] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_cluster_agent(agent_id=1, + project="12345") + ``` + :param int agent_id: The ID of the agent. :param str project: ID or full path of the project maintained by the authenticated user. @@ -144,6 +154,16 @@ def get_cluster_agent_output(agent_id: Optional[pulumi.Input[int]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_cluster_agent(agent_id=1, + project="12345") + ``` + :param int agent_id: The ID of the agent. :param str project: ID or full path of the project maintained by the authenticated user. diff --git a/sdk/python/pulumi_gitlab/get_cluster_agents.py b/sdk/python/pulumi_gitlab/get_cluster_agents.py index 809eb4965..e35cbd7a7 100644 --- a/sdk/python/pulumi_gitlab/get_cluster_agents.py +++ b/sdk/python/pulumi_gitlab/get_cluster_agents.py @@ -77,6 +77,15 @@ def get_cluster_agents(project: Optional[str] = None, > Requires at least GitLab 14.10 **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + agents = gitlab.get_cluster_agents(project="12345") + ``` """ __args__ = dict() __args__['project'] = project @@ -98,5 +107,14 @@ def get_cluster_agents_output(project: Optional[pulumi.Input[str]] = None, > Requires at least GitLab 14.10 **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/cluster_agents.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + agents = gitlab.get_cluster_agents(project="12345") + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_current_user.py b/sdk/python/pulumi_gitlab/get_current_user.py index 414c61a18..ea63c9838 100644 --- a/sdk/python/pulumi_gitlab/get_current_user.py +++ b/sdk/python/pulumi_gitlab/get_current_user.py @@ -145,6 +145,15 @@ def get_current_user(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGe The `get_current_user` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_current_user() + ``` """ __args__ = dict() opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) @@ -168,5 +177,14 @@ def get_current_user_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulu The `get_current_user` data source allows details of the current user (determined by `token` provider attribute) to be retrieved. **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#querycurrentuser) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_current_user() + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_group.py b/sdk/python/pulumi_gitlab/get_group.py index 263045de1..82f06b5d2 100644 --- a/sdk/python/pulumi_gitlab/get_group.py +++ b/sdk/python/pulumi_gitlab/get_group.py @@ -268,6 +268,15 @@ def get_group(full_path: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_group(full_path="foo/bar") + ``` + :param str full_path: The full path of the group. :param int group_id: The ID of the group. @@ -309,6 +318,15 @@ def get_group_output(full_path: Optional[pulumi.Input[Optional[str]]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_group(full_path="foo/bar") + ``` + :param str full_path: The full path of the group. :param int group_id: The ID of the group. diff --git a/sdk/python/pulumi_gitlab/get_group_membership.py b/sdk/python/pulumi_gitlab/get_group_membership.py index 3898ebaeb..579852664 100644 --- a/sdk/python/pulumi_gitlab/get_group_membership.py +++ b/sdk/python/pulumi_gitlab/get_group_membership.py @@ -115,6 +115,15 @@ def get_group_membership(access_level: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_group_membership(full_path="foo/bar") + ``` + :param str full_path: The full path of the group. :param int group_id: The ID of the group. @@ -148,6 +157,15 @@ def get_group_membership_output(access_level: Optional[pulumi.Input[Optional[str **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_group_membership(full_path="foo/bar") + ``` + :param str full_path: The full path of the group. :param int group_id: The ID of the group. diff --git a/sdk/python/pulumi_gitlab/get_group_subgroups.py b/sdk/python/pulumi_gitlab/get_group_subgroups.py index a6fea57df..1cf85273e 100644 --- a/sdk/python/pulumi_gitlab/get_group_subgroups.py +++ b/sdk/python/pulumi_gitlab/get_group_subgroups.py @@ -193,6 +193,16 @@ def get_group_subgroups(all_available: Optional[bool] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + subgroups_group_subgroups = gitlab.get_group_subgroups(group_id=123456) + pulumi.export("subgroups", subgroups_group_subgroups) + ``` + :param bool all_available: Show all the groups you have access to. :param str min_access_level: Limit to groups where current user has at least this access level. @@ -249,6 +259,16 @@ def get_group_subgroups_output(all_available: Optional[pulumi.Input[Optional[boo **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + subgroups_group_subgroups = gitlab.get_group_subgroups(group_id=123456) + pulumi.export("subgroups", subgroups_group_subgroups) + ``` + :param bool all_available: Show all the groups you have access to. :param str min_access_level: Limit to groups where current user has at least this access level. diff --git a/sdk/python/pulumi_gitlab/get_group_variable.py b/sdk/python/pulumi_gitlab/get_group_variable.py index 5d6b032fe..62728cbbe 100644 --- a/sdk/python/pulumi_gitlab/get_group_variable.py +++ b/sdk/python/pulumi_gitlab/get_group_variable.py @@ -149,6 +149,19 @@ def get_group_variable(environment_scope: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_group_variable(group="my/example/group", + key="foo") + bar = gitlab.get_group_variable(environment_scope="staging/*", + group="my/example/group", + key="bar") + ``` + :param str environment_scope: The environment scope of the variable. Defaults to all environment (`*`). Note that in Community Editions of Gitlab, values other than `*` will cause inconsistent plans. :param str group: The name or id of the group. @@ -183,6 +196,19 @@ def get_group_variable_output(environment_scope: Optional[pulumi.Input[Optional[ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_group_variable(group="my/example/group", + key="foo") + bar = gitlab.get_group_variable(environment_scope="staging/*", + group="my/example/group", + key="bar") + ``` + :param str environment_scope: The environment scope of the variable. Defaults to all environment (`*`). Note that in Community Editions of Gitlab, values other than `*` will cause inconsistent plans. :param str group: The name or id of the group. diff --git a/sdk/python/pulumi_gitlab/get_group_variables.py b/sdk/python/pulumi_gitlab/get_group_variables.py index d844cd74f..ea440664b 100644 --- a/sdk/python/pulumi_gitlab/get_group_variables.py +++ b/sdk/python/pulumi_gitlab/get_group_variables.py @@ -88,6 +88,17 @@ def get_group_variables(environment_scope: Optional[str] = None, The `get_group_variables` data source allows to retrieve all group-level CI/CD variables. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + vars = gitlab.get_group_variables(group="my/example/group") + staging_vars = gitlab.get_group_variables(environment_scope="staging/*", + group="my/example/group") + ``` """ __args__ = dict() __args__['environmentScope'] = environment_scope @@ -110,5 +121,16 @@ def get_group_variables_output(environment_scope: Optional[pulumi.Input[Optional The `get_group_variables` data source allows to retrieve all group-level CI/CD variables. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + vars = gitlab.get_group_variables(group="my/example/group") + staging_vars = gitlab.get_group_variables(environment_scope="staging/*", + group="my/example/group") + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_groups.py b/sdk/python/pulumi_gitlab/get_groups.py index 622e91ff9..ceee51fd7 100644 --- a/sdk/python/pulumi_gitlab/get_groups.py +++ b/sdk/python/pulumi_gitlab/get_groups.py @@ -119,6 +119,17 @@ def get_groups(order_by: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_groups(order_by="name", + sort="desc") + example_two = gitlab.get_groups(search="GitLab") + ``` + :param str order_by: Order the groups' list by `id`, `name`, `path`, or `similarity`. (Requires administrator privileges) :param str search: Search groups by name or path. @@ -157,6 +168,17 @@ def get_groups_output(order_by: Optional[pulumi.Input[Optional[str]]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#list-groups) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_groups(order_by="name", + sort="desc") + example_two = gitlab.get_groups(search="GitLab") + ``` + :param str order_by: Order the groups' list by `id`, `name`, `path`, or `similarity`. (Requires administrator privileges) :param str search: Search groups by name or path. diff --git a/sdk/python/pulumi_gitlab/get_instance_deploy_keys.py b/sdk/python/pulumi_gitlab/get_instance_deploy_keys.py index 05cd39e01..9a4d24a6c 100644 --- a/sdk/python/pulumi_gitlab/get_instance_deploy_keys.py +++ b/sdk/python/pulumi_gitlab/get_instance_deploy_keys.py @@ -78,6 +78,15 @@ def get_instance_deploy_keys(public: Optional[bool] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_instance_deploy_keys(public=True) + ``` + :param bool public: Only return deploy keys that are public. """ @@ -102,6 +111,15 @@ def get_instance_deploy_keys_output(public: Optional[pulumi.Input[Optional[bool] **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_keys.html#list-all-deploy-keys) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_instance_deploy_keys(public=True) + ``` + :param bool public: Only return deploy keys that are public. """ diff --git a/sdk/python/pulumi_gitlab/get_instance_variable.py b/sdk/python/pulumi_gitlab/get_instance_variable.py index c03b2fe21..077dbe097 100644 --- a/sdk/python/pulumi_gitlab/get_instance_variable.py +++ b/sdk/python/pulumi_gitlab/get_instance_variable.py @@ -123,6 +123,15 @@ def get_instance_variable(key: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_instance_variable(key="foo") + ``` + :param str key: The name of the variable. """ @@ -149,6 +158,15 @@ def get_instance_variable_output(key: Optional[pulumi.Input[str]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_instance_variable(key="foo") + ``` + :param str key: The name of the variable. """ diff --git a/sdk/python/pulumi_gitlab/get_instance_variables.py b/sdk/python/pulumi_gitlab/get_instance_variables.py index 6d0440fcc..93f1b20a0 100644 --- a/sdk/python/pulumi_gitlab/get_instance_variables.py +++ b/sdk/python/pulumi_gitlab/get_instance_variables.py @@ -62,6 +62,15 @@ def get_instance_variables(opts: Optional[pulumi.InvokeOptions] = None) -> Await The `get_instance_variables` data source allows to retrieve all instance-level CI/CD variables. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + vars = gitlab.get_instance_variables() + ``` """ __args__ = dict() opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) @@ -78,5 +87,14 @@ def get_instance_variables_output(opts: Optional[pulumi.InvokeOptions] = None) - The `get_instance_variables` data source allows to retrieve all instance-level CI/CD variables. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + vars = gitlab.get_instance_variables() + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_metadata.py b/sdk/python/pulumi_gitlab/get_metadata.py index ec77b32bd..9eda4699b 100644 --- a/sdk/python/pulumi_gitlab/get_metadata.py +++ b/sdk/python/pulumi_gitlab/get_metadata.py @@ -98,6 +98,15 @@ def get_metadata(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMet The `get_metadata` data source retrieves the metadata of the GitLab instance. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + this = gitlab.get_metadata() + ``` """ __args__ = dict() opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) @@ -117,5 +126,14 @@ def get_metadata_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.O The `get_metadata` data source retrieves the metadata of the GitLab instance. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/metadata.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + this = gitlab.get_metadata() + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_project.py b/sdk/python/pulumi_gitlab/get_project.py index ab7abdd90..b9d717399 100644 --- a/sdk/python/pulumi_gitlab/get_project.py +++ b/sdk/python/pulumi_gitlab/get_project.py @@ -799,6 +799,15 @@ def get_project(ci_default_git_depth: Optional[int] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project(path_with_namespace="foo/bar/baz") + ``` + :param int ci_default_git_depth: Default number of revisions for shallow cloning. :param str id: The integer that uniquely identifies the project within the gitlab install. @@ -890,6 +899,15 @@ def get_project_output(ci_default_git_depth: Optional[pulumi.Input[Optional[int] **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project(path_with_namespace="foo/bar/baz") + ``` + :param int ci_default_git_depth: Default number of revisions for shallow cloning. :param str id: The integer that uniquely identifies the project within the gitlab install. diff --git a/sdk/python/pulumi_gitlab/get_project_branches.py b/sdk/python/pulumi_gitlab/get_project_branches.py index 64915b920..5401177fd 100644 --- a/sdk/python/pulumi_gitlab/get_project_branches.py +++ b/sdk/python/pulumi_gitlab/get_project_branches.py @@ -76,6 +76,15 @@ def get_project_branches(project: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_branches(project="foo/bar/baz") + ``` + :param str project: ID or URL-encoded path of the project owned by the authenticated user. """ @@ -98,6 +107,15 @@ def get_project_branches_output(project: Optional[pulumi.Input[str]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_branches(project="foo/bar/baz") + ``` + :param str project: ID or URL-encoded path of the project owned by the authenticated user. """ diff --git a/sdk/python/pulumi_gitlab/get_project_hook.py b/sdk/python/pulumi_gitlab/get_project_hook.py index 8f894fe52..d40019921 100644 --- a/sdk/python/pulumi_gitlab/get_project_hook.py +++ b/sdk/python/pulumi_gitlab/get_project_hook.py @@ -280,6 +280,17 @@ def get_project_hook(hook_id: Optional[int] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_project = gitlab.get_project(id="foo/bar/baz") + example_project_hook = gitlab.get_project_hook(project=example_project.id, + hook_id=1) + ``` + :param int hook_id: The id of the project hook. :param str project: The name or id of the project to add the hook to. @@ -322,6 +333,17 @@ def get_project_hook_output(hook_id: Optional[pulumi.Input[int]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-project-hook) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_project = gitlab.get_project(id="foo/bar/baz") + example_project_hook = gitlab.get_project_hook(project=example_project.id, + hook_id=1) + ``` + :param int hook_id: The id of the project hook. :param str project: The name or id of the project to add the hook to. diff --git a/sdk/python/pulumi_gitlab/get_project_hooks.py b/sdk/python/pulumi_gitlab/get_project_hooks.py index f91c4369a..f768b8944 100644 --- a/sdk/python/pulumi_gitlab/get_project_hooks.py +++ b/sdk/python/pulumi_gitlab/get_project_hooks.py @@ -75,6 +75,16 @@ def get_project_hooks(project: Optional[str] = None, The `get_project_hooks` data source allows to retrieve details about hooks in a project. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project(id="foo/bar/baz") + examples = gitlab.get_project_hooks(project=example.id) + ``` """ __args__ = dict() __args__['project'] = project @@ -94,5 +104,15 @@ def get_project_hooks_output(project: Optional[pulumi.Input[str]] = None, The `get_project_hooks` data source allows to retrieve details about hooks in a project. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-project-hooks) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project(id="foo/bar/baz") + examples = gitlab.get_project_hooks(project=example.id) + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_project_issue.py b/sdk/python/pulumi_gitlab/get_project_issue.py index 6170dcfa0..fcc0558c9 100644 --- a/sdk/python/pulumi_gitlab/get_project_issue.py +++ b/sdk/python/pulumi_gitlab/get_project_issue.py @@ -521,6 +521,18 @@ def get_project_issue(iid: Optional[int] = None, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project(path_with_namespace="foo/bar/baz") + welcome_issue = gitlab.get_project_issue(project=foo.id, + iid=1) + pulumi.export("welcomeIssueWebUrl", data["gitlab_project_issue"]["web_url"]) + ``` + :param int iid: The internal ID of the project's issue. :param str project: The name or ID of the project. @@ -583,6 +595,18 @@ def get_project_issue_output(iid: Optional[pulumi.Input[int]] = None, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project(path_with_namespace="foo/bar/baz") + welcome_issue = gitlab.get_project_issue(project=foo.id, + iid=1) + pulumi.export("welcomeIssueWebUrl", data["gitlab_project_issue"]["web_url"]) + ``` + :param int iid: The internal ID of the project's issue. :param str project: The name or ID of the project. diff --git a/sdk/python/pulumi_gitlab/get_project_issues.py b/sdk/python/pulumi_gitlab/get_project_issues.py index 299ab9565..22b15596c 100644 --- a/sdk/python/pulumi_gitlab/get_project_issues.py +++ b/sdk/python/pulumi_gitlab/get_project_issues.py @@ -401,6 +401,17 @@ def get_project_issues(assignee_id: Optional[int] = None, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project(id="foo/bar/baz") + all_with_foo = gitlab.get_project_issues(project=foo.id, + search="foo") + ``` + :param int assignee_id: Return issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee. :param str assignee_username: Return issues assigned to the given username. Similar to assignee*id and mutually exclusive with assignee*id. In GitLab CE, the assignee_username array should only contain a single value. Otherwise, an invalid parameter error is returned. @@ -516,6 +527,17 @@ def get_project_issues_output(assignee_id: Optional[pulumi.Input[Optional[int]]] **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project(id="foo/bar/baz") + all_with_foo = gitlab.get_project_issues(project=foo.id, + search="foo") + ``` + :param int assignee_id: Return issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee. :param str assignee_username: Return issues assigned to the given username. Similar to assignee*id and mutually exclusive with assignee*id. In GitLab CE, the assignee_username array should only contain a single value. Otherwise, an invalid parameter error is returned. diff --git a/sdk/python/pulumi_gitlab/get_project_membership.py b/sdk/python/pulumi_gitlab/get_project_membership.py index 99a830688..7cf0f1947 100644 --- a/sdk/python/pulumi_gitlab/get_project_membership.py +++ b/sdk/python/pulumi_gitlab/get_project_membership.py @@ -117,6 +117,16 @@ def get_project_membership(full_path: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_membership(inherited=True, + project_id=123) + ``` + :param str full_path: The full path of the project. :param bool inherited: Return all project members including members through ancestor groups @@ -153,6 +163,16 @@ def get_project_membership_output(full_path: Optional[pulumi.Input[Optional[str] **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_membership(inherited=True, + project_id=123) + ``` + :param str full_path: The full path of the project. :param bool inherited: Return all project members including members through ancestor groups diff --git a/sdk/python/pulumi_gitlab/get_project_milestone.py b/sdk/python/pulumi_gitlab/get_project_milestone.py index 3c7dc0098..dec13e3a4 100644 --- a/sdk/python/pulumi_gitlab/get_project_milestone.py +++ b/sdk/python/pulumi_gitlab/get_project_milestone.py @@ -208,6 +208,16 @@ def get_project_milestone(milestone_id: Optional[int] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_milestone(milestone_id=10, + project="foo/bar") + ``` + :param int milestone_id: The instance-wide ID of the project’s milestone. :param str project: The ID or URL-encoded path of the project owned by the authenticated user. @@ -244,6 +254,16 @@ def get_project_milestone_output(milestone_id: Optional[pulumi.Input[int]] = Non **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_milestone(milestone_id=10, + project="foo/bar") + ``` + :param int milestone_id: The instance-wide ID of the project’s milestone. :param str project: The ID or URL-encoded path of the project owned by the authenticated user. diff --git a/sdk/python/pulumi_gitlab/get_project_milestones.py b/sdk/python/pulumi_gitlab/get_project_milestones.py index 87333ed53..d8fc92dec 100644 --- a/sdk/python/pulumi_gitlab/get_project_milestones.py +++ b/sdk/python/pulumi_gitlab/get_project_milestones.py @@ -141,6 +141,15 @@ def get_project_milestones(iids: Optional[Sequence[int]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_milestones(project="foo/bar") + ``` + :param Sequence[int] iids: Return only the milestones having the given `iid` (Note: ignored if `include_parent_milestones` is set as `true`). :param bool include_parent_milestones: Include group milestones from parent group and its ancestors. Introduced in GitLab 13.4. @@ -180,6 +189,15 @@ def get_project_milestones_output(iids: Optional[pulumi.Input[Optional[Sequence[ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_milestones(project="foo/bar") + ``` + :param Sequence[int] iids: Return only the milestones having the given `iid` (Note: ignored if `include_parent_milestones` is set as `true`). :param bool include_parent_milestones: Include group milestones from parent group and its ancestors. Introduced in GitLab 13.4. diff --git a/sdk/python/pulumi_gitlab/get_project_protected_branch.py b/sdk/python/pulumi_gitlab/get_project_protected_branch.py index 4909e2a7b..bcf378aae 100644 --- a/sdk/python/pulumi_gitlab/get_project_protected_branch.py +++ b/sdk/python/pulumi_gitlab/get_project_protected_branch.py @@ -125,6 +125,16 @@ def get_project_protected_branch(name: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_protected_branch(name="main", + project_id="foo/bar/baz") + ``` + :param str name: The name of the protected branch. :param str project_id: The integer or path with namespace that uniquely identifies the project. @@ -154,6 +164,16 @@ def get_project_protected_branch_output(name: Optional[pulumi.Input[str]] = None **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_protected_branch(name="main", + project_id="foo/bar/baz") + ``` + :param str name: The name of the protected branch. :param str project_id: The integer or path with namespace that uniquely identifies the project. diff --git a/sdk/python/pulumi_gitlab/get_project_protected_branches.py b/sdk/python/pulumi_gitlab/get_project_protected_branches.py index 43edbc10c..56704a6e0 100644 --- a/sdk/python/pulumi_gitlab/get_project_protected_branches.py +++ b/sdk/python/pulumi_gitlab/get_project_protected_branches.py @@ -76,6 +76,15 @@ def get_project_protected_branches(project_id: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_protected_branches(project_id="foo/bar/baz") + ``` + :param str project_id: The integer or path with namespace that uniquely identifies the project. """ @@ -98,6 +107,15 @@ def get_project_protected_branches_output(project_id: Optional[pulumi.Input[str] **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_protected_branches(project_id="foo/bar/baz") + ``` + :param str project_id: The integer or path with namespace that uniquely identifies the project. """ diff --git a/sdk/python/pulumi_gitlab/get_project_tag.py b/sdk/python/pulumi_gitlab/get_project_tag.py index f285b8f9b..664435993 100644 --- a/sdk/python/pulumi_gitlab/get_project_tag.py +++ b/sdk/python/pulumi_gitlab/get_project_tag.py @@ -137,6 +137,16 @@ def get_project_tag(name: Optional[str] = None, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project_tag(name="example", + project="foo/bar") + ``` + :param str name: The name of a tag. :param str project: The ID or URL-encoded path of the project owned by the authenticated user. @@ -167,6 +177,16 @@ def get_project_tag_output(name: Optional[pulumi.Input[str]] = None, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project_tag(name="example", + project="foo/bar") + ``` + :param str name: The name of a tag. :param str project: The ID or URL-encoded path of the project owned by the authenticated user. diff --git a/sdk/python/pulumi_gitlab/get_project_tags.py b/sdk/python/pulumi_gitlab/get_project_tags.py index 67746ea58..21f73b7c5 100644 --- a/sdk/python/pulumi_gitlab/get_project_tags.py +++ b/sdk/python/pulumi_gitlab/get_project_tags.py @@ -115,6 +115,15 @@ def get_project_tags(order_by: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_tags(project="foo/bar") + ``` + :param str order_by: Return tags ordered by `name` or `updated` fields. Default is `updated`. :param str project: The ID or URL-encoded path of the project owned by the authenticated user. @@ -149,6 +158,15 @@ def get_project_tags_output(order_by: Optional[pulumi.Input[Optional[str]]] = No **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/tags.html#list-project-repository-tags) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_project_tags(project="foo/bar") + ``` + :param str order_by: Return tags ordered by `name` or `updated` fields. Default is `updated`. :param str project: The ID or URL-encoded path of the project owned by the authenticated user. diff --git a/sdk/python/pulumi_gitlab/get_project_variable.py b/sdk/python/pulumi_gitlab/get_project_variable.py index e5a0fab6b..09fa36954 100644 --- a/sdk/python/pulumi_gitlab/get_project_variable.py +++ b/sdk/python/pulumi_gitlab/get_project_variable.py @@ -149,6 +149,19 @@ def get_project_variable(environment_scope: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project_variable(key="foo", + project="my/example/project") + bar = gitlab.get_project_variable(environment_scope="staging/*", + key="bar", + project="my/example/project") + ``` + :param str environment_scope: The environment scope of the variable. Defaults to all environment (`*`). Note that in Community Editions of Gitlab, values other than `*` will cause inconsistent plans. :param str key: The name of the variable. @@ -183,6 +196,19 @@ def get_project_variable_output(environment_scope: Optional[pulumi.Input[Optiona **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.get_project_variable(key="foo", + project="my/example/project") + bar = gitlab.get_project_variable(environment_scope="staging/*", + key="bar", + project="my/example/project") + ``` + :param str environment_scope: The environment scope of the variable. Defaults to all environment (`*`). Note that in Community Editions of Gitlab, values other than `*` will cause inconsistent plans. :param str key: The name of the variable. diff --git a/sdk/python/pulumi_gitlab/get_project_variables.py b/sdk/python/pulumi_gitlab/get_project_variables.py index e10ce9d39..79c6c33ea 100644 --- a/sdk/python/pulumi_gitlab/get_project_variables.py +++ b/sdk/python/pulumi_gitlab/get_project_variables.py @@ -88,6 +88,17 @@ def get_project_variables(environment_scope: Optional[str] = None, The `get_project_variables` data source allows to retrieve all project-level CI/CD variables. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + vars = gitlab.get_project_variables(project="my/example/project") + staging_vars = gitlab.get_project_variables(environment_scope="staging/*", + project="my/example/project") + ``` """ __args__ = dict() __args__['environmentScope'] = environment_scope @@ -110,5 +121,16 @@ def get_project_variables_output(environment_scope: Optional[pulumi.Input[Option The `get_project_variables` data source allows to retrieve all project-level CI/CD variables. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + vars = gitlab.get_project_variables(project="my/example/project") + staging_vars = gitlab.get_project_variables(environment_scope="staging/*", + project="my/example/project") + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_projects.py b/sdk/python/pulumi_gitlab/get_projects.py index 42868fcc0..df14d0b15 100644 --- a/sdk/python/pulumi_gitlab/get_projects.py +++ b/sdk/python/pulumi_gitlab/get_projects.py @@ -353,6 +353,21 @@ def get_projects(archived: Optional[bool] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + mygroup = gitlab.get_group(full_path="mygroup") + group_projects = gitlab.get_projects(group_id=mygroup.id, + order_by="name", + include_subgroups=True, + with_shared=False) + projects = gitlab.get_projects(search="postgresql", + visibility="private") + ``` + :param bool include_subgroups: Include projects in subgroups of this group. Default is `false`. Needs `group_id`. :param int max_queryable_pages: The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration. @@ -459,6 +474,21 @@ def get_projects_output(archived: Optional[pulumi.Input[Optional[bool]]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + mygroup = gitlab.get_group(full_path="mygroup") + group_projects = gitlab.get_projects(group_id=mygroup.id, + order_by="name", + include_subgroups=True, + with_shared=False) + projects = gitlab.get_projects(search="postgresql", + visibility="private") + ``` + :param bool include_subgroups: Include projects in subgroups of this group. Default is `false`. Needs `group_id`. :param int max_queryable_pages: The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration. diff --git a/sdk/python/pulumi_gitlab/get_release_link.py b/sdk/python/pulumi_gitlab/get_release_link.py index 634efc5d4..78c0433ba 100644 --- a/sdk/python/pulumi_gitlab/get_release_link.py +++ b/sdk/python/pulumi_gitlab/get_release_link.py @@ -161,6 +161,17 @@ def get_release_link(link_id: Optional[int] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_release_link(link_id=11, + project="foo/bar", + tag_name="v1.0.1") + ``` + :param int link_id: The ID of the link. :param str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/ee/api/index.html#namespaced-path-encoding). @@ -196,6 +207,17 @@ def get_release_link_output(link_id: Optional[pulumi.Input[int]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_release_link(link_id=11, + project="foo/bar", + tag_name="v1.0.1") + ``` + :param int link_id: The ID of the link. :param str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/ee/api/index.html#namespaced-path-encoding). diff --git a/sdk/python/pulumi_gitlab/get_release_links.py b/sdk/python/pulumi_gitlab/get_release_links.py index 0bb93a1e4..bd5f071f0 100644 --- a/sdk/python/pulumi_gitlab/get_release_links.py +++ b/sdk/python/pulumi_gitlab/get_release_links.py @@ -88,6 +88,16 @@ def get_release_links(project: Optional[str] = None, The `get_release_links` data source allows get details of release links. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_release_links(project="foo/bar", + tag_name="v1.0.1") + ``` """ __args__ = dict() __args__['project'] = project @@ -110,5 +120,15 @@ def get_release_links_output(project: Optional[pulumi.Input[str]] = None, The `get_release_links` data source allows get details of release links. **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_release_links(project="foo/bar", + tag_name="v1.0.1") + ``` """ ... diff --git a/sdk/python/pulumi_gitlab/get_repository_file.py b/sdk/python/pulumi_gitlab/get_repository_file.py index ef718a78c..ec004d873 100644 --- a/sdk/python/pulumi_gitlab/get_repository_file.py +++ b/sdk/python/pulumi_gitlab/get_repository_file.py @@ -197,6 +197,17 @@ def get_repository_file(file_path: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_repository_file(file_path="README.md", + project="example", + ref="main") + ``` + :param str file_path: The full path of the file. It must be relative to the root of the project without a leading slash `/` or `./`. :param str project: The name or ID of the project. @@ -235,6 +246,17 @@ def get_repository_file_output(file_path: Optional[pulumi.Input[str]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repository_files.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_repository_file(file_path="README.md", + project="example", + ref="main") + ``` + :param str file_path: The full path of the file. It must be relative to the root of the project without a leading slash `/` or `./`. :param str project: The name or ID of the project. diff --git a/sdk/python/pulumi_gitlab/get_repository_tree.py b/sdk/python/pulumi_gitlab/get_repository_tree.py index 0f741bdbc..52b3744a4 100644 --- a/sdk/python/pulumi_gitlab/get_repository_tree.py +++ b/sdk/python/pulumi_gitlab/get_repository_tree.py @@ -115,6 +115,18 @@ def get_repository_tree(path: Optional[str] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + this = gitlab.get_repository_tree(path="ExampleSubFolder", + project="example", + recursive=True, + ref="main") + ``` + :param str project: The ID or full path of the project owned by the authenticated user. :param bool recursive: Boolean value used to get a recursive tree (false by default). @@ -148,6 +160,18 @@ def get_repository_tree_output(path: Optional[pulumi.Input[Optional[str]]] = Non **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + this = gitlab.get_repository_tree(path="ExampleSubFolder", + project="example", + recursive=True, + ref="main") + ``` + :param str project: The ID or full path of the project owned by the authenticated user. :param bool recursive: Boolean value used to get a recursive tree (false by default). diff --git a/sdk/python/pulumi_gitlab/get_users.py b/sdk/python/pulumi_gitlab/get_users.py index 02ecf98f7..ee88d1421 100644 --- a/sdk/python/pulumi_gitlab/get_users.py +++ b/sdk/python/pulumi_gitlab/get_users.py @@ -184,6 +184,18 @@ def get_users(active: Optional[bool] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_users(created_before="2019-01-01", + order_by="name", + sort="desc") + example_two = gitlab.get_users(search="username") + ``` + :param bool active: Filter users that are active. :param bool blocked: Filter users that are blocked. @@ -241,6 +253,18 @@ def get_users_output(active: Optional[pulumi.Input[Optional[bool]]] = None, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.get_users(created_before="2019-01-01", + order_by="name", + sort="desc") + example_two = gitlab.get_users(search="username") + ``` + :param bool active: Filter users that are active. :param bool blocked: Filter users that are blocked. diff --git a/sdk/python/pulumi_gitlab/group.py b/sdk/python/pulumi_gitlab/group.py index 5c42726e9..ef8518e8b 100644 --- a/sdk/python/pulumi_gitlab/group.py +++ b/sdk/python/pulumi_gitlab/group.py @@ -1127,6 +1127,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_group = gitlab.Group("exampleGroup", + path="example", + description="An example group") + # Create a project in the example group + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=example_group.id) + ``` + ## Import ```sh @@ -1179,6 +1194,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_group = gitlab.Group("exampleGroup", + path="example", + description="An example group") + # Create a project in the example group + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=example_group.id) + ``` + ## Import ```sh diff --git a/sdk/python/pulumi_gitlab/group_access_token.py b/sdk/python/pulumi_gitlab/group_access_token.py index 4b3929977..6df53179a 100644 --- a/sdk/python/pulumi_gitlab/group_access_token.py +++ b/sdk/python/pulumi_gitlab/group_access_token.py @@ -348,6 +348,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_group_access_token = gitlab.GroupAccessToken("exampleGroupAccessToken", + group="25", + expires_at="2020-03-14", + access_level="developer", + scopes=["api"]) + example_group_variable = gitlab.GroupVariable("exampleGroupVariable", + group="25", + key="gat", + value=example_group_access_token.token) + ``` + ## Import A GitLab Group Access Token can be imported using a key composed of `:`, e.g. @@ -379,6 +396,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_group_access_token = gitlab.GroupAccessToken("exampleGroupAccessToken", + group="25", + expires_at="2020-03-14", + access_level="developer", + scopes=["api"]) + example_group_variable = gitlab.GroupVariable("exampleGroupVariable", + group="25", + key="gat", + value=example_group_access_token.token) + ``` + ## Import A GitLab Group Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_badge.py b/sdk/python/pulumi_gitlab/group_badge.py index 50b7f4a03..0357b65b8 100644 --- a/sdk/python/pulumi_gitlab/group_badge.py +++ b/sdk/python/pulumi_gitlab/group_badge.py @@ -255,6 +255,34 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Group("foo") + example = gitlab.GroupBadge("example", + group=foo.id, + link_url="https://example.com/badge-123", + image_url="https://example.com/badge-123.svg") + # Pipeline status badges with placeholders will be enabled for each project + gitlab_pipeline = gitlab.GroupBadge("gitlabPipeline", + group=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg") + # Test coverage report badges with placeholders will be enabled for each project + gitlab_coverage = gitlab.GroupBadge("gitlabCoverage", + group=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/jobs", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg") + # Latest release badges with placeholders will be enabled for each project + gitlab_release = gitlab.GroupBadge("gitlabRelease", + group=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/releases", + image_url="https://gitlab.example.com/%{project_path}/-/badges/release.svg") + ``` + ## Import GitLab group badges can be imported using an id made up of `{group_id}:{badge_id}`, e.g. @@ -281,6 +309,34 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Group("foo") + example = gitlab.GroupBadge("example", + group=foo.id, + link_url="https://example.com/badge-123", + image_url="https://example.com/badge-123.svg") + # Pipeline status badges with placeholders will be enabled for each project + gitlab_pipeline = gitlab.GroupBadge("gitlabPipeline", + group=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg") + # Test coverage report badges with placeholders will be enabled for each project + gitlab_coverage = gitlab.GroupBadge("gitlabCoverage", + group=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/jobs", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg") + # Latest release badges with placeholders will be enabled for each project + gitlab_release = gitlab.GroupBadge("gitlabRelease", + group=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/releases", + image_url="https://gitlab.example.com/%{project_path}/-/badges/release.svg") + ``` + ## Import GitLab group badges can be imported using an id made up of `{group_id}:{badge_id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_cluster.py b/sdk/python/pulumi_gitlab/group_cluster.py index 230745ba7..39ee8092c 100644 --- a/sdk/python/pulumi_gitlab/group_cluster.py +++ b/sdk/python/pulumi_gitlab/group_cluster.py @@ -572,6 +572,25 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_clusters.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Group("foo", path="foo-path") + bar = gitlab.GroupCluster("bar", + group=foo.id, + domain="example.com", + enabled=True, + kubernetes_api_url="https://124.124.124", + kubernetes_token="some-token", + kubernetes_ca_cert="some-cert", + kubernetes_authorization_type="rbac", + environment_scope="*", + management_project_id="123456") + ``` + ## Import GitLab group clusters can be imported using an id made up of `groupid:clusterid`, e.g. @@ -607,6 +626,25 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_clusters.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Group("foo", path="foo-path") + bar = gitlab.GroupCluster("bar", + group=foo.id, + domain="example.com", + enabled=True, + kubernetes_api_url="https://124.124.124", + kubernetes_token="some-token", + kubernetes_ca_cert="some-cert", + kubernetes_authorization_type="rbac", + environment_scope="*", + management_project_id="123456") + ``` + ## Import GitLab group clusters can be imported using an id made up of `groupid:clusterid`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_custom_attribute.py b/sdk/python/pulumi_gitlab/group_custom_attribute.py index d75a330ed..c572f09fc 100644 --- a/sdk/python/pulumi_gitlab/group_custom_attribute.py +++ b/sdk/python/pulumi_gitlab/group_custom_attribute.py @@ -170,6 +170,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + attr = gitlab.GroupCustomAttribute("attr", + group=42, + key="location", + value="Greenland") + ``` + ## Import You can import a group custom attribute using the an id made up of `{group-id}:{key}`, e.g. @@ -195,6 +207,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + attr = gitlab.GroupCustomAttribute("attr", + group=42, + key="location", + value="Greenland") + ``` + ## Import You can import a group custom attribute using the an id made up of `{group-id}:{key}`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_epic_board.py b/sdk/python/pulumi_gitlab/group_epic_board.py index b64dd815f..7d73f61f9 100644 --- a/sdk/python/pulumi_gitlab/group_epic_board.py +++ b/sdk/python/pulumi_gitlab/group_epic_board.py @@ -172,6 +172,28 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_boards.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.Group("example", + path="test_group", + description="An example group") + label1 = gitlab.GroupLabel("label1", + group=example.id, + color="#FF0000") + label3 = gitlab.GroupLabel("label3", + group=example.id, + color="#003000") + epic_board = gitlab.GroupEpicBoard("epicBoard", + group=example.path, + lists=[gitlab.GroupEpicBoardListArgs( + label_id=label1.label_id, + )]) + ``` + ## Import You can import this resource with an id made up of `{group-id}:{epic-board-id}`, e.g. @@ -199,6 +221,28 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_boards.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.Group("example", + path="test_group", + description="An example group") + label1 = gitlab.GroupLabel("label1", + group=example.id, + color="#FF0000") + label3 = gitlab.GroupLabel("label3", + group=example.id, + color="#003000") + epic_board = gitlab.GroupEpicBoard("epicBoard", + group=example.path, + lists=[gitlab.GroupEpicBoardListArgs( + label_id=label1.label_id, + )]) + ``` + ## Import You can import this resource with an id made up of `{group-id}:{epic-board-id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_hook.py b/sdk/python/pulumi_gitlab/group_hook.py index 16a60314a..491a081ae 100644 --- a/sdk/python/pulumi_gitlab/group_hook.py +++ b/sdk/python/pulumi_gitlab/group_hook.py @@ -824,6 +824,38 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.GroupHook("example", + group="example/hooked", + merge_requests_events=True, + url="https://example.com/hook/example") + # Setting all attributes + all_attributes = gitlab.GroupHook("allAttributes", + confidential_issues_events=False, + confidential_note_events=True, + deployment_events=True, + enable_ssl_verification=False, + group="1", + issues_events=False, + job_events=True, + merge_requests_events=True, + note_events=True, + pipeline_events=True, + push_events=True, + push_events_branch_filter="devel", + releases_events=True, + subgroup_events=True, + tag_push_events=True, + token="supersecret", + url="http://example.com", + wiki_page_events=True) + ``` + ## Import A GitLab Group Hook can be imported using a key composed of `:`, e.g. @@ -866,6 +898,38 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.GroupHook("example", + group="example/hooked", + merge_requests_events=True, + url="https://example.com/hook/example") + # Setting all attributes + all_attributes = gitlab.GroupHook("allAttributes", + confidential_issues_events=False, + confidential_note_events=True, + deployment_events=True, + enable_ssl_verification=False, + group="1", + issues_events=False, + job_events=True, + merge_requests_events=True, + note_events=True, + pipeline_events=True, + push_events=True, + push_events_branch_filter="devel", + releases_events=True, + subgroup_events=True, + tag_push_events=True, + token="supersecret", + url="http://example.com", + wiki_page_events=True) + ``` + ## Import A GitLab Group Hook can be imported using a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_label.py b/sdk/python/pulumi_gitlab/group_label.py index 9af062efd..0662dfe48 100644 --- a/sdk/python/pulumi_gitlab/group_label.py +++ b/sdk/python/pulumi_gitlab/group_label.py @@ -226,6 +226,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/labels.html#group-labels) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + fixme = gitlab.GroupLabel("fixme", + color="#ffcc00", + description="issue with failing tests", + group="example") + ``` + ## Import Gitlab group labels can be imported using an id made up of `{group_id}:{group_label_id}`, e.g. @@ -252,6 +264,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/labels.html#group-labels) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + fixme = gitlab.GroupLabel("fixme", + color="#ffcc00", + description="issue with failing tests", + group="example") + ``` + ## Import Gitlab group labels can be imported using an id made up of `{group_id}:{group_label_id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_membership.py b/sdk/python/pulumi_gitlab/group_membership.py index 4079a33d6..9c15c3f5b 100644 --- a/sdk/python/pulumi_gitlab/group_membership.py +++ b/sdk/python/pulumi_gitlab/group_membership.py @@ -307,6 +307,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.GroupMembership("test", + access_level="guest", + expires_at="2020-12-31", + group_id="12345", + user_id=1337) + ``` + ## Import GitLab group membership can be imported using an id made up of `group_id:user_id`, e.g. @@ -337,6 +350,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.GroupMembership("test", + access_level="guest", + expires_at="2020-12-31", + group_id="12345", + user_id=1337) + ``` + ## Import GitLab group membership can be imported using an id made up of `group_id:user_id`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_project_file_template.py b/sdk/python/pulumi_gitlab/group_project_file_template.py index e6a14cb47..f3d70da21 100644 --- a/sdk/python/pulumi_gitlab/group_project_file_template.py +++ b/sdk/python/pulumi_gitlab/group_project_file_template.py @@ -154,6 +154,24 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#update-group) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Group("foo", + path="group", + description="An example group") + bar = gitlab.Project("bar", + description="contains file templates", + visibility_level="public", + namespace_id=foo.id) + template_link = gitlab.GroupProjectFileTemplate("templateLink", + group_id=foo.id, + file_template_project_id=bar.id) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[int] file_template_project_id: The ID of the project that will be used for file templates. This project must be the direct @@ -178,6 +196,24 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#update-group) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Group("foo", + path="group", + description="An example group") + bar = gitlab.Project("bar", + description="contains file templates", + visibility_level="public", + namespace_id=foo.id) + template_link = gitlab.GroupProjectFileTemplate("templateLink", + group_id=foo.id, + file_template_project_id=bar.id) + ``` + :param str resource_name: The name of the resource. :param GroupProjectFileTemplateArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_gitlab/group_saml_link.py b/sdk/python/pulumi_gitlab/group_saml_link.py index 7da53ff8c..a84461677 100644 --- a/sdk/python/pulumi_gitlab/group_saml_link.py +++ b/sdk/python/pulumi_gitlab/group_saml_link.py @@ -178,6 +178,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#saml-group-links) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.GroupSamlLink("test", + access_level="developer", + group="12345", + saml_group_name="samlgroupname1") + ``` + ## Import GitLab group saml links can be imported using an id made up of `group_id:saml_group_name`, e.g. @@ -203,6 +215,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#saml-group-links) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.GroupSamlLink("test", + access_level="developer", + group="12345", + saml_group_name="samlgroupname1") + ``` + ## Import GitLab group saml links can be imported using an id made up of `group_id:saml_group_name`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_share_group.py b/sdk/python/pulumi_gitlab/group_share_group.py index 4c6d7e9ed..02b274806 100644 --- a/sdk/python/pulumi_gitlab/group_share_group.py +++ b/sdk/python/pulumi_gitlab/group_share_group.py @@ -223,6 +223,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#share-groups-with-groups) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.GroupShareGroup("test", + group_id=gitlab_group["foo"]["id"], + share_group_id=gitlab_group["bar"]["id"], + group_access="guest", + expires_at="2099-01-01") + ``` + ## Import GitLab group shares can be imported using an id made up of `mainGroupId:shareGroupId`, e.g. @@ -249,6 +262,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#share-groups-with-groups) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.GroupShareGroup("test", + group_id=gitlab_group["foo"]["id"], + share_group_id=gitlab_group["bar"]["id"], + group_access="guest", + expires_at="2099-01-01") + ``` + ## Import GitLab group shares can be imported using an id made up of `mainGroupId:shareGroupId`, e.g. diff --git a/sdk/python/pulumi_gitlab/group_variable.py b/sdk/python/pulumi_gitlab/group_variable.py index b14fa2d2a..5cf6690e7 100644 --- a/sdk/python/pulumi_gitlab/group_variable.py +++ b/sdk/python/pulumi_gitlab/group_variable.py @@ -363,6 +363,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.GroupVariable("example", + environment_scope="*", + group="12345", + key="group_variable_key", + masked=False, + protected=False, + value="group_variable_value") + ``` + ## Import GitLab group variables can be imported using an id made up of `groupid:variablename:scope`, e.g. @@ -393,6 +408,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.GroupVariable("example", + environment_scope="*", + group="12345", + key="group_variable_key", + masked=False, + protected=False, + value="group_variable_value") + ``` + ## Import GitLab group variables can be imported using an id made up of `groupid:variablename:scope`, e.g. diff --git a/sdk/python/pulumi_gitlab/instance_cluster.py b/sdk/python/pulumi_gitlab/instance_cluster.py index 779959a17..78b9e2ac7 100644 --- a/sdk/python/pulumi_gitlab/instance_cluster.py +++ b/sdk/python/pulumi_gitlab/instance_cluster.py @@ -575,6 +575,24 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_clusters.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + bar = gitlab.InstanceCluster("bar", + domain="example.com", + enabled=True, + environment_scope="*", + kubernetes_api_url="https://124.124.124", + kubernetes_authorization_type="rbac", + kubernetes_ca_cert="some-cert", + kubernetes_namespace="namespace", + kubernetes_token="some-token", + management_project_id="123456") + ``` + ## Import GitLab instance clusters can be imported using a `clusterid`, e.g. @@ -610,6 +628,24 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_clusters.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + bar = gitlab.InstanceCluster("bar", + domain="example.com", + enabled=True, + environment_scope="*", + kubernetes_api_url="https://124.124.124", + kubernetes_authorization_type="rbac", + kubernetes_ca_cert="some-cert", + kubernetes_namespace="namespace", + kubernetes_token="some-token", + management_project_id="123456") + ``` + ## Import GitLab instance clusters can be imported using a `clusterid`, e.g. diff --git a/sdk/python/pulumi_gitlab/instance_variable.py b/sdk/python/pulumi_gitlab/instance_variable.py index acef0ebec..88ac45d8b 100644 --- a/sdk/python/pulumi_gitlab/instance_variable.py +++ b/sdk/python/pulumi_gitlab/instance_variable.py @@ -284,6 +284,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.InstanceVariable("example", + key="instance_variable_key", + masked=False, + protected=False, + value="instance_variable_value") + ``` + ## Import GitLab instance variables can be imported using an id made up of `variablename`, e.g. @@ -312,6 +325,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.InstanceVariable("example", + key="instance_variable_key", + masked=False, + protected=False, + value="instance_variable_value") + ``` + ## Import GitLab instance variables can be imported using an id made up of `variablename`, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_custom_issue_tracker.py b/sdk/python/pulumi_gitlab/integration_custom_issue_tracker.py index 13d1fd331..84c3ab1f5 100644 --- a/sdk/python/pulumi_gitlab/integration_custom_issue_tracker.py +++ b/sdk/python/pulumi_gitlab/integration_custom_issue_tracker.py @@ -254,6 +254,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + tracker = gitlab.IntegrationCustomIssueTracker("tracker", + project=awesome_project.id, + project_url="https://customtracker.com/issues", + issues_url="https://customtracker.com/TEST-:id") + ``` + ## Import You can import a gitlab_integration_custom_issue_tracker state using the project ID, e.g. @@ -279,6 +294,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + tracker = gitlab.IntegrationCustomIssueTracker("tracker", + project=awesome_project.id, + project_url="https://customtracker.com/issues", + issues_url="https://customtracker.com/TEST-:id") + ``` + ## Import You can import a gitlab_integration_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_emails_on_push.py b/sdk/python/pulumi_gitlab/integration_emails_on_push.py index 92fa17088..933a46a97 100644 --- a/sdk/python/pulumi_gitlab/integration_emails_on_push.py +++ b/sdk/python/pulumi_gitlab/integration_emails_on_push.py @@ -431,6 +431,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + emails = gitlab.IntegrationEmailsOnPush("emails", + project=awesome_project.id, + recipients="myrecipient@example.com myotherrecipient@example.com") + ``` + ## Import You can import a gitlab_integration_emails_on_push state using the project ID, e.g. @@ -460,6 +474,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + emails = gitlab.IntegrationEmailsOnPush("emails", + project=awesome_project.id, + recipients="myrecipient@example.com myotherrecipient@example.com") + ``` + ## Import You can import a gitlab_integration_emails_on_push state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_external_wiki.py b/sdk/python/pulumi_gitlab/integration_external_wiki.py index c3ca817f1..98fdbc90d 100644 --- a/sdk/python/pulumi_gitlab/integration_external_wiki.py +++ b/sdk/python/pulumi_gitlab/integration_external_wiki.py @@ -230,6 +230,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + wiki = gitlab.IntegrationExternalWiki("wiki", + project=awesome_project.id, + external_wiki_url="https://MyAwesomeExternalWikiURL.com") + ``` + ## Import You can import a gitlab_integration_external_wiki state using the project ID, e.g. @@ -254,6 +268,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + wiki = gitlab.IntegrationExternalWiki("wiki", + project=awesome_project.id, + external_wiki_url="https://MyAwesomeExternalWikiURL.com") + ``` + ## Import You can import a gitlab_integration_external_wiki state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_github.py b/sdk/python/pulumi_gitlab/integration_github.py index 94de5bfa2..48517c284 100644 --- a/sdk/python/pulumi_gitlab/integration_github.py +++ b/sdk/python/pulumi_gitlab/integration_github.py @@ -293,6 +293,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + github = gitlab.IntegrationGithub("github", + project=awesome_project.id, + token="REDACTED", + repository_url="https://github.com/gitlabhq/terraform-provider-gitlab") + ``` + ## Import ```sh @@ -323,6 +338,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + github = gitlab.IntegrationGithub("github", + project=awesome_project.id, + token="REDACTED", + repository_url="https://github.com/gitlabhq/terraform-provider-gitlab") + ``` + ## Import ```sh diff --git a/sdk/python/pulumi_gitlab/integration_jira.py b/sdk/python/pulumi_gitlab/integration_jira.py index 3547d1b06..096bb573f 100644 --- a/sdk/python/pulumi_gitlab/integration_jira.py +++ b/sdk/python/pulumi_gitlab/integration_jira.py @@ -776,6 +776,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + jira = gitlab.IntegrationJira("jira", + project=awesome_project.id, + url="https://jira.example.com", + username="user", + password="mypass") + ``` + ## Import You can import a gitlab_integration_jira state using the project ID, e.g. @@ -814,6 +830,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + jira = gitlab.IntegrationJira("jira", + project=awesome_project.id, + url="https://jira.example.com", + username="user", + password="mypass") + ``` + ## Import You can import a gitlab_integration_jira state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_mattermost.py b/sdk/python/pulumi_gitlab/integration_mattermost.py index 14c4d7054..7eeb99e2f 100644 --- a/sdk/python/pulumi_gitlab/integration_mattermost.py +++ b/sdk/python/pulumi_gitlab/integration_mattermost.py @@ -989,6 +989,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#mattermost-notifications) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + mattermost = gitlab.IntegrationMattermost("mattermost", + project=awesome_project.id, + webhook="https://webhook.com", + username="myuser", + push_events=True, + push_channel="push_chan") + ``` + ## Import You can import a gitlab_integration_mattermost.mattermost state using the project ID, e.g. @@ -1034,6 +1051,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#mattermost-notifications) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + mattermost = gitlab.IntegrationMattermost("mattermost", + project=awesome_project.id, + webhook="https://webhook.com", + username="myuser", + push_events=True, + push_channel="push_chan") + ``` + ## Import You can import a gitlab_integration_mattermost.mattermost state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_microsoft_teams.py b/sdk/python/pulumi_gitlab/integration_microsoft_teams.py index 265291638..09222099e 100644 --- a/sdk/python/pulumi_gitlab/integration_microsoft_teams.py +++ b/sdk/python/pulumi_gitlab/integration_microsoft_teams.py @@ -641,6 +641,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + teams = gitlab.IntegrationMicrosoftTeams("teams", + project=awesome_project.id, + webhook="https://testurl.com/?token=XYZ", + push_events=True) + ``` + ## Import You can import a gitlab_integration_microsoft_teams state using the project ID, e.g. @@ -676,6 +691,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + teams = gitlab.IntegrationMicrosoftTeams("teams", + project=awesome_project.id, + webhook="https://testurl.com/?token=XYZ", + push_events=True) + ``` + ## Import You can import a gitlab_integration_microsoft_teams state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_pipelines_email.py b/sdk/python/pulumi_gitlab/integration_pipelines_email.py index 796a1bb76..99ea1304e 100644 --- a/sdk/python/pulumi_gitlab/integration_pipelines_email.py +++ b/sdk/python/pulumi_gitlab/integration_pipelines_email.py @@ -214,6 +214,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + email = gitlab.IntegrationPipelinesEmail("email", + project=awesome_project.id, + recipients=["gitlab@user.create"], + notify_only_broken_pipelines=True, + branches_to_be_notified="all") + ``` + ## Import You can import a gitlab_integration_pipelines_email state using the project ID, e.g. @@ -240,6 +256,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + email = gitlab.IntegrationPipelinesEmail("email", + project=awesome_project.id, + recipients=["gitlab@user.create"], + notify_only_broken_pipelines=True, + branches_to_be_notified="all") + ``` + ## Import You can import a gitlab_integration_pipelines_email state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/integration_slack.py b/sdk/python/pulumi_gitlab/integration_slack.py index 530aa8a1c..fb6f06b4d 100644 --- a/sdk/python/pulumi_gitlab/integration_slack.py +++ b/sdk/python/pulumi_gitlab/integration_slack.py @@ -1021,6 +1021,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + slack = gitlab.IntegrationSlack("slack", + project=awesome_project.id, + webhook="https://webhook.com", + username="myuser", + push_events=True, + push_channel="push_chan") + ``` + ## Import You can import a gitlab_integration_slack.slack state using the project ID, e.g. @@ -1066,6 +1083,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + slack = gitlab.IntegrationSlack("slack", + project=awesome_project.id, + webhook="https://webhook.com", + username="myuser", + push_events=True, + push_channel="push_chan") + ``` + ## Import You can import a gitlab_integration_slack.slack state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/pages_domain.py b/sdk/python/pulumi_gitlab/pages_domain.py index 09e4d96f6..779bd0941 100644 --- a/sdk/python/pulumi_gitlab/pages_domain.py +++ b/sdk/python/pulumi_gitlab/pages_domain.py @@ -340,6 +340,25 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pages_domains.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Example using auto_ssl_enabled, which uses lets encrypt to generate a certificate + this_pages_domain = gitlab.PagesDomain("thisPagesDomain", + project="123", + domain="example.com", + auto_ssl_enabled=True) + # Example using a manually generated certificate and key + this_index_pages_domain_pages_domain = gitlab.PagesDomain("thisIndex/pagesDomainPagesDomain", + project="123", + domain="example.com", + key=(lambda path: open(path).read())(f"{path['module']}/key.pem"), + certificate=(lambda path: open(path).read())(f"{path['module']}/cert.pem")) + ``` + ## Import GitLab pages domain can be imported using an id made up of `projectId:domain` _without_ the http protocol, e.g. @@ -368,6 +387,25 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pages_domains.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Example using auto_ssl_enabled, which uses lets encrypt to generate a certificate + this_pages_domain = gitlab.PagesDomain("thisPagesDomain", + project="123", + domain="example.com", + auto_ssl_enabled=True) + # Example using a manually generated certificate and key + this_index_pages_domain_pages_domain = gitlab.PagesDomain("thisIndex/pagesDomainPagesDomain", + project="123", + domain="example.com", + key=(lambda path: open(path).read())(f"{path['module']}/key.pem"), + certificate=(lambda path: open(path).read())(f"{path['module']}/cert.pem")) + ``` + ## Import GitLab pages domain can be imported using an id made up of `projectId:domain` _without_ the http protocol, e.g. diff --git a/sdk/python/pulumi_gitlab/personal_access_token.py b/sdk/python/pulumi_gitlab/personal_access_token.py index 06b8e7a8d..e811f9ec0 100644 --- a/sdk/python/pulumi_gitlab/personal_access_token.py +++ b/sdk/python/pulumi_gitlab/personal_access_token.py @@ -291,6 +291,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/personal_access_tokens.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_personal_access_token = gitlab.PersonalAccessToken("examplePersonalAccessToken", + user_id=25, + expires_at="2020-03-14", + scopes=["api"]) + example_project_variable = gitlab.ProjectVariable("exampleProjectVariable", + project=gitlab_project["example"]["id"], + key="pat", + value=example_personal_access_token.token) + ``` + ## Import A GitLab Personal Access Token can be imported using a key composed of `:`, e.g. @@ -321,6 +337,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/personal_access_tokens.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_personal_access_token = gitlab.PersonalAccessToken("examplePersonalAccessToken", + user_id=25, + expires_at="2020-03-14", + scopes=["api"]) + example_project_variable = gitlab.ProjectVariable("exampleProjectVariable", + project=gitlab_project["example"]["id"], + key="pat", + value=example_personal_access_token.token) + ``` + ## Import A GitLab Personal Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/pipeline_schedule.py b/sdk/python/pulumi_gitlab/pipeline_schedule.py index cd0cc3e03..8ef27e81a 100644 --- a/sdk/python/pulumi_gitlab/pipeline_schedule.py +++ b/sdk/python/pulumi_gitlab/pipeline_schedule.py @@ -306,6 +306,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.PipelineSchedule("example", + cron="0 1 * * *", + description="Used to schedule builds", + project="12345", + ref="master") + ``` + ## Import GitLab pipeline schedules can be imported using an id made up of `{project_id}:{pipeline_schedule_id}`, e.g. @@ -334,6 +347,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.PipelineSchedule("example", + cron="0 1 * * *", + description="Used to schedule builds", + project="12345", + ref="master") + ``` + ## Import GitLab pipeline schedules can be imported using an id made up of `{project_id}:{pipeline_schedule_id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/pipeline_schedule_variable.py b/sdk/python/pulumi_gitlab/pipeline_schedule_variable.py index effca297d..ad3ce6b36 100644 --- a/sdk/python/pulumi_gitlab/pipeline_schedule_variable.py +++ b/sdk/python/pulumi_gitlab/pipeline_schedule_variable.py @@ -212,6 +212,24 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html#pipeline-schedule-variables) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_pipeline_schedule = gitlab.PipelineSchedule("examplePipelineSchedule", + project="12345", + description="Used to schedule builds", + ref="master", + cron="0 1 * * *") + example_pipeline_schedule_variable = gitlab.PipelineScheduleVariable("examplePipelineScheduleVariable", + project=example_pipeline_schedule.project, + pipeline_schedule_id=example_pipeline_schedule.pipeline_schedule_id, + key="EXAMPLE_KEY", + value="example") + ``` + ## Import Pipeline schedule variables can be imported using an id made up of `project_id:pipeline_schedule_id:key`, e.g. @@ -238,6 +256,24 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_schedules.html#pipeline-schedule-variables) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_pipeline_schedule = gitlab.PipelineSchedule("examplePipelineSchedule", + project="12345", + description="Used to schedule builds", + ref="master", + cron="0 1 * * *") + example_pipeline_schedule_variable = gitlab.PipelineScheduleVariable("examplePipelineScheduleVariable", + project=example_pipeline_schedule.project, + pipeline_schedule_id=example_pipeline_schedule.pipeline_schedule_id, + key="EXAMPLE_KEY", + value="example") + ``` + ## Import Pipeline schedule variables can be imported using an id made up of `project_id:pipeline_schedule_id:key`, e.g. diff --git a/sdk/python/pulumi_gitlab/pipeline_trigger.py b/sdk/python/pulumi_gitlab/pipeline_trigger.py index c85d19c16..b15726233 100644 --- a/sdk/python/pulumi_gitlab/pipeline_trigger.py +++ b/sdk/python/pulumi_gitlab/pipeline_trigger.py @@ -170,6 +170,17 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_triggers.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.PipelineTrigger("example", + description="Used to trigger builds", + project="12345") + ``` + ## Import GitLab pipeline triggers can be imported using an id made up of `{project_id}:{pipeline_trigger_id}`, e.g. @@ -194,6 +205,17 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_triggers.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.PipelineTrigger("example", + description="Used to trigger builds", + project="12345") + ``` + ## Import GitLab pipeline triggers can be imported using an id made up of `{project_id}:{pipeline_trigger_id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/project.py b/sdk/python/pulumi_gitlab/project.py index 0da9b5195..6761a021f 100644 --- a/sdk/python/pulumi_gitlab/project.py +++ b/sdk/python/pulumi_gitlab/project.py @@ -3887,6 +3887,59 @@ def __init__(__self__, wiki_enabled: Optional[pulumi.Input[bool]] = None, __props__=None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.Project("example", + description="My awesome codebase", + visibility_level="public") + # Project with custom push rules + example_two = gitlab.Project("example-two", push_rules=gitlab.ProjectPushRulesArgs( + author_email_regex="@example\\\\.com$", + commit_committer_check=True, + member_check=True, + prevent_secrets=True, + )) + peter_parker = gitlab.get_user(username="peter_parker") + peters_repo = gitlab.Project("petersRepo", + description="This is a description", + namespace_id=peter_parker.namespace_id) + # Fork a project + fork_project = gitlab.Project("forkProject", + description="This is a fork", + forked_from_project_id=example.id) + # Fork a project and setup a pull mirror + fork_index_project_project = gitlab.Project("forkIndex/projectProject", + description="This is a fork", + forked_from_project_id=example.id, + import_url=example.http_url_to_repo, + mirror=True) + # Create a project by importing it from a public project + import_public = gitlab.Project("importPublic", import_url="https://gitlab.example.com/repo.git") + # Create a project by importing it from a public project and setup the pull mirror + import_public_with_mirror = gitlab.Project("importPublicWithMirror", + import_url="https://gitlab.example.com/repo.git", + mirror=True) + # Create a project by importing it from a private project + import_private_project = gitlab.Project("importPrivateProject", + import_url="https://gitlab.example.com/repo.git", + import_url_username="user", + import_url_password="pass") + # Create a project by importing it from a private project and setup the pull mirror + import_private_with_mirror = gitlab.Project("importPrivateWithMirror", + import_url="https://gitlab.example.com/repo.git", + import_url_username="user", + import_url_password="pass", + mirror=True) + # Create a project by importing it from a private project and provide credentials in `import_url` + # NOTE: only use this if you really must, use `import_url_username` and `import_url_password` whenever possible + # GitLab API will always return the `import_url` without credentials, therefore you must ignore the `import_url` for changes: + import_private_index_project_project = gitlab.Project("importPrivateIndex/projectProject", import_url="https://user:pass@gitlab.example.com/repo.git") + ``` + ## Import ```sh @@ -4015,6 +4068,59 @@ def __init__(__self__, args: Optional[ProjectArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.Project("example", + description="My awesome codebase", + visibility_level="public") + # Project with custom push rules + example_two = gitlab.Project("example-two", push_rules=gitlab.ProjectPushRulesArgs( + author_email_regex="@example\\\\.com$", + commit_committer_check=True, + member_check=True, + prevent_secrets=True, + )) + peter_parker = gitlab.get_user(username="peter_parker") + peters_repo = gitlab.Project("petersRepo", + description="This is a description", + namespace_id=peter_parker.namespace_id) + # Fork a project + fork_project = gitlab.Project("forkProject", + description="This is a fork", + forked_from_project_id=example.id) + # Fork a project and setup a pull mirror + fork_index_project_project = gitlab.Project("forkIndex/projectProject", + description="This is a fork", + forked_from_project_id=example.id, + import_url=example.http_url_to_repo, + mirror=True) + # Create a project by importing it from a public project + import_public = gitlab.Project("importPublic", import_url="https://gitlab.example.com/repo.git") + # Create a project by importing it from a public project and setup the pull mirror + import_public_with_mirror = gitlab.Project("importPublicWithMirror", + import_url="https://gitlab.example.com/repo.git", + mirror=True) + # Create a project by importing it from a private project + import_private_project = gitlab.Project("importPrivateProject", + import_url="https://gitlab.example.com/repo.git", + import_url_username="user", + import_url_password="pass") + # Create a project by importing it from a private project and setup the pull mirror + import_private_with_mirror = gitlab.Project("importPrivateWithMirror", + import_url="https://gitlab.example.com/repo.git", + import_url_username="user", + import_url_password="pass", + mirror=True) + # Create a project by importing it from a private project and provide credentials in `import_url` + # NOTE: only use this if you really must, use `import_url_username` and `import_url_password` whenever possible + # GitLab API will always return the `import_url` without credentials, therefore you must ignore the `import_url` for changes: + import_private_index_project_project = gitlab.Project("importPrivateIndex/projectProject", import_url="https://user:pass@gitlab.example.com/repo.git") + ``` + ## Import ```sh diff --git a/sdk/python/pulumi_gitlab/project_access_token.py b/sdk/python/pulumi_gitlab/project_access_token.py index c481b7d8b..ae3b230ed 100644 --- a/sdk/python/pulumi_gitlab/project_access_token.py +++ b/sdk/python/pulumi_gitlab/project_access_token.py @@ -346,6 +346,23 @@ def __init__(__self__, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/project_access_tokens.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_project_access_token = gitlab.ProjectAccessToken("exampleProjectAccessToken", + project="25", + expires_at="2020-03-14", + access_level="reporter", + scopes=["api"]) + example_project_variable = gitlab.ProjectVariable("exampleProjectVariable", + project=gitlab_project["example"]["id"], + key="pat", + value=example_project_access_token.token) + ``` + ## Import A GitLab Project Access Token can be imported using a key composed of `:`, e.g. @@ -375,6 +392,23 @@ def __init__(__self__, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/project_access_tokens.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_project_access_token = gitlab.ProjectAccessToken("exampleProjectAccessToken", + project="25", + expires_at="2020-03-14", + access_level="reporter", + scopes=["api"]) + example_project_variable = gitlab.ProjectVariable("exampleProjectVariable", + project=gitlab_project["example"]["id"], + key="pat", + value=example_project_access_token.token) + ``` + ## Import A GitLab Project Access Token can be imported using a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_badge.py b/sdk/python/pulumi_gitlab/project_badge.py index 0044bb224..b03a418d2 100644 --- a/sdk/python/pulumi_gitlab/project_badge.py +++ b/sdk/python/pulumi_gitlab/project_badge.py @@ -255,6 +255,34 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#project-badges) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Project("foo") + example = gitlab.ProjectBadge("example", + project=foo.id, + link_url="https://example.com/badge-123", + image_url="https://example.com/badge-123.svg") + # Pipeline status badges with placeholders will be enabled + gitlab_pipeline = gitlab.ProjectBadge("gitlabPipeline", + project=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg") + # Test coverage report badges with placeholders will be enabled + gitlab_coverage = gitlab.ProjectBadge("gitlabCoverage", + project=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/jobs", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg") + # Latest release badges with placeholders will be enabled + gitlab_release = gitlab.ProjectBadge("gitlabRelease", + project=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/releases", + image_url="https://gitlab.example.com/%{project_path}/-/badges/release.svg") + ``` + ## Import GitLab project badges can be imported using an id made up of `{project_id}:{badge_id}`, e.g. @@ -281,6 +309,34 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#project-badges) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Project("foo") + example = gitlab.ProjectBadge("example", + project=foo.id, + link_url="https://example.com/badge-123", + image_url="https://example.com/badge-123.svg") + # Pipeline status badges with placeholders will be enabled + gitlab_pipeline = gitlab.ProjectBadge("gitlabPipeline", + project=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg") + # Test coverage report badges with placeholders will be enabled + gitlab_coverage = gitlab.ProjectBadge("gitlabCoverage", + project=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/jobs", + image_url="https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg") + # Latest release badges with placeholders will be enabled + gitlab_release = gitlab.ProjectBadge("gitlabRelease", + project=foo.id, + link_url="https://gitlab.example.com/%{project_path}/-/releases", + image_url="https://gitlab.example.com/%{project_path}/-/badges/release.svg") + ``` + ## Import GitLab project badges can be imported using an id made up of `{project_id}:{badge_id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_cluster.py b/sdk/python/pulumi_gitlab/project_cluster.py index be8aadf6a..6a8217e85 100644 --- a/sdk/python/pulumi_gitlab/project_cluster.py +++ b/sdk/python/pulumi_gitlab/project_cluster.py @@ -613,6 +613,26 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_clusters.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Project("foo") + bar = gitlab.ProjectCluster("bar", + project=foo.id, + domain="example.com", + enabled=True, + kubernetes_api_url="https://124.124.124", + kubernetes_token="some-token", + kubernetes_ca_cert="some-cert", + kubernetes_namespace="namespace", + kubernetes_authorization_type="rbac", + environment_scope="*", + management_project_id="123456") + ``` + ## Import GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g. @@ -649,6 +669,26 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_clusters.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Project("foo") + bar = gitlab.ProjectCluster("bar", + project=foo.id, + domain="example.com", + enabled=True, + kubernetes_api_url="https://124.124.124", + kubernetes_token="some-token", + kubernetes_ca_cert="some-cert", + kubernetes_namespace="namespace", + kubernetes_authorization_type="rbac", + environment_scope="*", + management_project_id="123456") + ``` + ## Import GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_compliance_framework.py b/sdk/python/pulumi_gitlab/project_compliance_framework.py index 790c478b1..bc22cb057 100644 --- a/sdk/python/pulumi_gitlab/project_compliance_framework.py +++ b/sdk/python/pulumi_gitlab/project_compliance_framework.py @@ -138,6 +138,23 @@ def __init__(__self__, **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + sample_compliance_framework = gitlab.ComplianceFramework("sampleComplianceFramework", + namespace_path="top-level-group", + description="A HIPAA Compliance Framework", + color="#87BEEF", + default=False, + pipeline_configuration_full_path=".hipaa.yml@top-level-group/compliance-frameworks") + sample_project_compliance_framework = gitlab.ProjectComplianceFramework("sampleProjectComplianceFramework", + compliance_framework_id=sample_compliance_framework.framework_id, + project="12345678") + ``` + ## Import Gitlab project compliance frameworks can be imported with a key composed of ``, e.g. @@ -164,6 +181,23 @@ def __init__(__self__, **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + sample_compliance_framework = gitlab.ComplianceFramework("sampleComplianceFramework", + namespace_path="top-level-group", + description="A HIPAA Compliance Framework", + color="#87BEEF", + default=False, + pipeline_configuration_full_path=".hipaa.yml@top-level-group/compliance-frameworks") + sample_project_compliance_framework = gitlab.ProjectComplianceFramework("sampleProjectComplianceFramework", + compliance_framework_id=sample_compliance_framework.framework_id, + project="12345678") + ``` + ## Import Gitlab project compliance frameworks can be imported with a key composed of ``, e.g. diff --git a/sdk/python/pulumi_gitlab/project_custom_attribute.py b/sdk/python/pulumi_gitlab/project_custom_attribute.py index 02915202a..143586593 100644 --- a/sdk/python/pulumi_gitlab/project_custom_attribute.py +++ b/sdk/python/pulumi_gitlab/project_custom_attribute.py @@ -170,6 +170,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + attr = gitlab.ProjectCustomAttribute("attr", + key="location", + project=42, + value="Greenland") + ``` + ## Import You can import a project custom attribute using an id made up of `{project-id}:{key}`, e.g. @@ -195,6 +207,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + attr = gitlab.ProjectCustomAttribute("attr", + key="location", + project=42, + value="Greenland") + ``` + ## Import You can import a project custom attribute using an id made up of `{project-id}:{key}`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_environment.py b/sdk/python/pulumi_gitlab/project_environment.py index 0e8eb74cc..6e534230f 100644 --- a/sdk/python/pulumi_gitlab/project_environment.py +++ b/sdk/python/pulumi_gitlab/project_environment.py @@ -285,6 +285,23 @@ def __init__(__self__, stop_before_destroy: Optional[pulumi.Input[bool]] = None, __props__=None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + this_group = gitlab.Group("thisGroup", + path="example", + description="An example group") + this_project = gitlab.Project("thisProject", + namespace_id=this_group.id, + initialize_with_readme=True) + this_project_environment = gitlab.ProjectEnvironment("thisProjectEnvironment", + project=this_project.id, + external_url="www.example.com") + ``` + ## Import GitLab project environments can be imported using an id made up of `projectId:environmenId`, e.g. @@ -307,6 +324,23 @@ def __init__(__self__, args: ProjectEnvironmentArgs, opts: Optional[pulumi.ResourceOptions] = None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + this_group = gitlab.Group("thisGroup", + path="example", + description="An example group") + this_project = gitlab.Project("thisProject", + namespace_id=this_group.id, + initialize_with_readme=True) + this_project_environment = gitlab.ProjectEnvironment("thisProjectEnvironment", + project=this_project.id, + external_url="www.example.com") + ``` + ## Import GitLab project environments can be imported using an id made up of `projectId:environmenId`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_freeze_period.py b/sdk/python/pulumi_gitlab/project_freeze_period.py index ec1a5d3ac..1d4bfa88f 100644 --- a/sdk/python/pulumi_gitlab/project_freeze_period.py +++ b/sdk/python/pulumi_gitlab/project_freeze_period.py @@ -219,6 +219,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/freeze_periods.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + schedule = gitlab.ProjectFreezePeriod("schedule", + project=gitlab_project["foo"]["id"], + freeze_start="0 23 * * 5", + freeze_end="0 7 * * 1", + cron_timezone="UTC") + ``` + ## Import GitLab project freeze periods can be imported using an id made up of `project_id:freeze_period_id`, e.g. @@ -245,6 +258,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/freeze_periods.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + schedule = gitlab.ProjectFreezePeriod("schedule", + project=gitlab_project["foo"]["id"], + freeze_start="0 23 * * 5", + freeze_end="0 7 * * 1", + cron_timezone="UTC") + ``` + ## Import GitLab project freeze periods can be imported using an id made up of `project_id:freeze_period_id`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_hook.py b/sdk/python/pulumi_gitlab/project_hook.py index 8b815beb0..615c745eb 100644 --- a/sdk/python/pulumi_gitlab/project_hook.py +++ b/sdk/python/pulumi_gitlab/project_hook.py @@ -783,6 +783,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#hooks) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.ProjectHook("example", + merge_requests_events=True, + project="example/hooked", + url="https://example.com/hook/example") + ``` + ## Import A GitLab Project Hook can be imported using a key composed of `:`, e.g. @@ -824,6 +836,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#hooks) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.ProjectHook("example", + merge_requests_events=True, + project="example/hooked", + url="https://example.com/hook/example") + ``` + ## Import A GitLab Project Hook can be imported using a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_issue.py b/sdk/python/pulumi_gitlab/project_issue.py index 017de2df6..5bc7b65d1 100644 --- a/sdk/python/pulumi_gitlab/project_issue.py +++ b/sdk/python/pulumi_gitlab/project_issue.py @@ -1213,6 +1213,25 @@ def __init__(__self__, weight: Optional[pulumi.Input[int]] = None, __props__=None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Project("foo", + description="Lorem Ipsum", + visibility_level="public") + welcome_issue = gitlab.ProjectIssue("welcomeIssue", + project=foo.id, + title="Welcome!", + description=foo.name.apply(lambda name: f\"\"\" Welcome to the {name} project! + + \"\"\"), + discussion_locked=True) + pulumi.export("welcomeIssueWebUrl", data["gitlab_project_issue"]["web_url"]) + ``` + ## Import You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g. @@ -1250,6 +1269,25 @@ def __init__(__self__, args: ProjectIssueArgs, opts: Optional[pulumi.ResourceOptions] = None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.Project("foo", + description="Lorem Ipsum", + visibility_level="public") + welcome_issue = gitlab.ProjectIssue("welcomeIssue", + project=foo.id, + title="Welcome!", + description=foo.name.apply(lambda name: f\"\"\" Welcome to the {name} project! + + \"\"\"), + discussion_locked=True) + pulumi.export("welcomeIssueWebUrl", data["gitlab_project_issue"]["web_url"]) + ``` + ## Import You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_label.py b/sdk/python/pulumi_gitlab/project_label.py index bddeb1b52..9da12826b 100644 --- a/sdk/python/pulumi_gitlab/project_label.py +++ b/sdk/python/pulumi_gitlab/project_label.py @@ -226,6 +226,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/labels.html#project-labels) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + fixme = gitlab.ProjectLabel("fixme", + project="example", + description="issue with failing tests", + color="#ffcc00") + # Scoped label + devops_create = gitlab.ProjectLabel("devopsCreate", + project=gitlab_project["example"]["id"], + description="issue for creating infrastructure resources", + color="#ffa500") + ``` + ## Import Gitlab Project labels can be imported using an id made up of `{project_id}:{group_label_id}`, e.g. @@ -252,6 +269,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/labels.html#project-labels) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + fixme = gitlab.ProjectLabel("fixme", + project="example", + description="issue with failing tests", + color="#ffcc00") + # Scoped label + devops_create = gitlab.ProjectLabel("devopsCreate", + project=gitlab_project["example"]["id"], + description="issue for creating infrastructure resources", + color="#ffa500") + ``` + ## Import Gitlab Project labels can be imported using an id made up of `{project_id}:{group_label_id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_level_mr_approvals.py b/sdk/python/pulumi_gitlab/project_level_mr_approvals.py index 3c41ec228..c14130058 100644 --- a/sdk/python/pulumi_gitlab/project_level_mr_approvals.py +++ b/sdk/python/pulumi_gitlab/project_level_mr_approvals.py @@ -342,6 +342,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo_project = gitlab.Project("fooProject", description="My example project") + foo_project_level_mr_approvals = gitlab.ProjectLevelMrApprovals("fooProjectLevelMrApprovals", + project=foo_project.id, + reset_approvals_on_push=True, + disable_overriding_approvers_per_merge_request=False, + merge_requests_author_approval=False, + merge_requests_disable_committers_approval=True) + ``` + ## Import ```sh @@ -377,6 +392,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo_project = gitlab.Project("fooProject", description="My example project") + foo_project_level_mr_approvals = gitlab.ProjectLevelMrApprovals("fooProjectLevelMrApprovals", + project=foo_project.id, + reset_approvals_on_push=True, + disable_overriding_approvers_per_merge_request=False, + merge_requests_author_approval=False, + merge_requests_disable_committers_approval=True) + ``` + ## Import ```sh diff --git a/sdk/python/pulumi_gitlab/project_membership.py b/sdk/python/pulumi_gitlab/project_membership.py index c0fd51631..bb162d59e 100644 --- a/sdk/python/pulumi_gitlab/project_membership.py +++ b/sdk/python/pulumi_gitlab/project_membership.py @@ -221,6 +221,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.ProjectMembership("test", + access_level="guest", + project="12345", + user_id=1337) + example = gitlab.ProjectMembership("example", + access_level="guest", + expires_at="2022-12-31", + project="67890", + user_id=1234) + ``` + ## Import GitLab project membership can be imported using an id made up of `project_id:user_id`, e.g. @@ -249,6 +266,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.ProjectMembership("test", + access_level="guest", + project="12345", + user_id=1337) + example = gitlab.ProjectMembership("example", + access_level="guest", + expires_at="2022-12-31", + project="67890", + user_id=1234) + ``` + ## Import GitLab project membership can be imported using an id made up of `project_id:user_id`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_milestone.py b/sdk/python/pulumi_gitlab/project_milestone.py index 047a150ba..c19f85954 100644 --- a/sdk/python/pulumi_gitlab/project_milestone.py +++ b/sdk/python/pulumi_gitlab/project_milestone.py @@ -424,6 +424,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project for the milestone to use + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=gitlab_group["example"]["id"]) + example_project_milestone = gitlab.ProjectMilestone("exampleProjectMilestone", + project=example_project.id, + title="example") + ``` + ## Import Gitlab project milestone can be imported with a key composed of `:`, e.g. @@ -452,6 +467,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project for the milestone to use + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=gitlab_group["example"]["id"]) + example_project_milestone = gitlab.ProjectMilestone("exampleProjectMilestone", + project=example_project.id, + title="example") + ``` + ## Import Gitlab project milestone can be imported with a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_mirror.py b/sdk/python/pulumi_gitlab/project_mirror.py index c6294f71e..1e2d52695 100644 --- a/sdk/python/pulumi_gitlab/project_mirror.py +++ b/sdk/python/pulumi_gitlab/project_mirror.py @@ -282,6 +282,17 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/remote_mirrors.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.ProjectMirror("foo", + project="1", + url="https://username:password@github.com/org/repository.git") + ``` + ## Import GitLab project mirror can be imported using an id made up of `project_id:mirror_id`, e.g. @@ -320,6 +331,17 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/remote_mirrors.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.ProjectMirror("foo", + project="1", + url="https://username:password@github.com/org/repository.git") + ``` + ## Import GitLab project mirror can be imported using an id made up of `project_id:mirror_id`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_runner_enablement.py b/sdk/python/pulumi_gitlab/project_runner_enablement.py index 2661cb8fa..2e5f0000c 100644 --- a/sdk/python/pulumi_gitlab/project_runner_enablement.py +++ b/sdk/python/pulumi_gitlab/project_runner_enablement.py @@ -136,6 +136,17 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#enable-a-runner-in-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.ProjectRunnerEnablement("foo", + project="5", + runner_id=7) + ``` + ## Import GitLab project runners can be imported using an id made up of `project:runner_id`, e.g. @@ -160,6 +171,17 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#enable-a-runner-in-project) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + foo = gitlab.ProjectRunnerEnablement("foo", + project="5", + runner_id=7) + ``` + ## Import GitLab project runners can be imported using an id made up of `project:runner_id`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_share_group.py b/sdk/python/pulumi_gitlab/project_share_group.py index cf1ed7cc2..f3d3e68db 100644 --- a/sdk/python/pulumi_gitlab/project_share_group.py +++ b/sdk/python/pulumi_gitlab/project_share_group.py @@ -230,6 +230,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#share-project-with-group) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.ProjectShareGroup("test", + group_access="guest", + group_id=1337, + project="12345") + ``` + ## Import GitLab project group shares can be imported using an id made up of `projectid:groupid`, e.g. @@ -256,6 +268,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#share-project-with-group) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + test = gitlab.ProjectShareGroup("test", + group_access="guest", + group_id=1337, + project="12345") + ``` + ## Import GitLab project group shares can be imported using an id made up of `projectid:groupid`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_tag.py b/sdk/python/pulumi_gitlab/project_tag.py index 9f0b1cde4..0ae1ceacb 100644 --- a/sdk/python/pulumi_gitlab/project_tag.py +++ b/sdk/python/pulumi_gitlab/project_tag.py @@ -280,6 +280,21 @@ def __init__(__self__, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project for the tag to use + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=gitlab_group["example"]["id"]) + example_project_tag = gitlab.ProjectTag("exampleProjectTag", + ref="main", + project=example_project.id) + ``` + ## Import Gitlab project tags can be imported with a key composed of `:`, e.g. @@ -308,6 +323,21 @@ def __init__(__self__, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project for the tag to use + example_project = gitlab.Project("exampleProject", + description="An example project", + namespace_id=gitlab_group["example"]["id"]) + example_project_tag = gitlab.ProjectTag("exampleProjectTag", + ref="main", + project=example_project.id) + ``` + ## Import Gitlab project tags can be imported with a key composed of `:`, e.g. diff --git a/sdk/python/pulumi_gitlab/project_variable.py b/sdk/python/pulumi_gitlab/project_variable.py index d88407086..01aaccf34 100644 --- a/sdk/python/pulumi_gitlab/project_variable.py +++ b/sdk/python/pulumi_gitlab/project_variable.py @@ -365,6 +365,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.ProjectVariable("example", + key="project_variable_key", + project="12345", + protected=False, + value="project_variable_value") + ``` + ## Import GitLab project variables can be imported using an id made up of `project:key:environment_scope`, e.g. @@ -397,6 +410,19 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.ProjectVariable("example", + key="project_variable_key", + project="12345", + protected=False, + value="project_variable_value") + ``` + ## Import GitLab project variables can be imported using an id made up of `project:key:environment_scope`, e.g. diff --git a/sdk/python/pulumi_gitlab/release_link.py b/sdk/python/pulumi_gitlab/release_link.py index b40144c59..edd96b39c 100644 --- a/sdk/python/pulumi_gitlab/release_link.py +++ b/sdk/python/pulumi_gitlab/release_link.py @@ -347,6 +347,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project + example_project = gitlab.Project("exampleProject", description="An example project") + # Can create release link only to a tag associated with a release + example_release_link = gitlab.ReleaseLink("exampleReleaseLink", + project=example_project.id, + tag_name="tag_name_associated_with_release", + url="https://test/") + ``` + ## Import Gitlab release link can be imported with a key composed of `::`, e.g. @@ -375,6 +390,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # Create a project + example_project = gitlab.Project("exampleProject", description="An example project") + # Can create release link only to a tag associated with a release + example_release_link = gitlab.ReleaseLink("exampleReleaseLink", + project=example_project.id, + tag_name="tag_name_associated_with_release", + url="https://test/") + ``` + ## Import Gitlab release link can be imported with a key composed of `::`, e.g. diff --git a/sdk/python/pulumi_gitlab/runner.py b/sdk/python/pulumi_gitlab/runner.py index 3bb506cd5..65a2eb01d 100644 --- a/sdk/python/pulumi_gitlab/runner.py +++ b/sdk/python/pulumi_gitlab/runner.py @@ -419,6 +419,51 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + import pulumi_local as local + + # Basic GitLab Group Runner + my_group = gitlab.Group("myGroup", description="group that holds the runners") + basic_runner = gitlab.Runner("basicRunner", registration_token=my_group.runners_token) + # GitLab Runner that runs only tagged jobs + tagged_only = gitlab.Runner("taggedOnly", + registration_token=my_group.runners_token, + description="I only run tagged jobs", + run_untagged=False, + tag_lists=[ + "tag_one", + "tag_two", + ]) + # GitLab Runner that only runs on protected branches + protected = gitlab.Runner("protected", + registration_token=my_group.runners_token, + description="I only run protected jobs", + access_level="ref_protected") + # Generate a `config.toml` file that you can use to create a runner + # This is the typical workflow for this resource, using it to create an authentication_token which can then be used + # to generate the `config.toml` file to prevent re-registering the runner every time new hardware is created. + my_custom_group = gitlab.Group("myCustomGroup", description="group that holds the custom runners") + my_runner = gitlab.Runner("myRunner", registration_token=my_custom_group.runners_token) + # This creates a configuration for a local "shell" runner, but can be changed to generate whatever is needed. + # Place this configuration file on a server at `/etc/gitlab-runner/config.toml`, then run `gitlab-runner start`. + # See https://docs.gitlab.com/runner/configuration/advanced-configuration.html for more information. + config = local.File("config", + filename=f"{path['module']}/config.toml", + content=my_runner.authentication_token.apply(lambda authentication_token: f\"\"\" concurrent = 1 + + [[runners]] + name = "Hello Terraform" + url = "https://example.gitlab.com/" + token = "{authentication_token}" + executor = "shell" + + \"\"\")) + ``` + ## Import A GitLab Runner can be imported using the runner's ID, eg @@ -455,6 +500,51 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + import pulumi_local as local + + # Basic GitLab Group Runner + my_group = gitlab.Group("myGroup", description="group that holds the runners") + basic_runner = gitlab.Runner("basicRunner", registration_token=my_group.runners_token) + # GitLab Runner that runs only tagged jobs + tagged_only = gitlab.Runner("taggedOnly", + registration_token=my_group.runners_token, + description="I only run tagged jobs", + run_untagged=False, + tag_lists=[ + "tag_one", + "tag_two", + ]) + # GitLab Runner that only runs on protected branches + protected = gitlab.Runner("protected", + registration_token=my_group.runners_token, + description="I only run protected jobs", + access_level="ref_protected") + # Generate a `config.toml` file that you can use to create a runner + # This is the typical workflow for this resource, using it to create an authentication_token which can then be used + # to generate the `config.toml` file to prevent re-registering the runner every time new hardware is created. + my_custom_group = gitlab.Group("myCustomGroup", description="group that holds the custom runners") + my_runner = gitlab.Runner("myRunner", registration_token=my_custom_group.runners_token) + # This creates a configuration for a local "shell" runner, but can be changed to generate whatever is needed. + # Place this configuration file on a server at `/etc/gitlab-runner/config.toml`, then run `gitlab-runner start`. + # See https://docs.gitlab.com/runner/configuration/advanced-configuration.html for more information. + config = local.File("config", + filename=f"{path['module']}/config.toml", + content=my_runner.authentication_token.apply(lambda authentication_token: f\"\"\" concurrent = 1 + + [[runners]] + name = "Hello Terraform" + url = "https://example.gitlab.com/" + token = "{authentication_token}" + executor = "shell" + + \"\"\")) + ``` + ## Import A GitLab Runner can be imported using the runner's ID, eg diff --git a/sdk/python/pulumi_gitlab/service_custom_issue_tracker.py b/sdk/python/pulumi_gitlab/service_custom_issue_tracker.py index c792839d6..c32c8e45e 100644 --- a/sdk/python/pulumi_gitlab/service_custom_issue_tracker.py +++ b/sdk/python/pulumi_gitlab/service_custom_issue_tracker.py @@ -256,6 +256,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + tracker = gitlab.ServiceCustomIssueTracker("tracker", + project=awesome_project.id, + project_url="https://customtracker.com/issues", + issues_url="https://customtracker.com/TEST-:id") + ``` + ## Import You can import a gitlab_service_custom_issue_tracker state using the project ID, e.g. @@ -283,6 +298,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#custom-issue-tracker) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + tracker = gitlab.ServiceCustomIssueTracker("tracker", + project=awesome_project.id, + project_url="https://customtracker.com/issues", + issues_url="https://customtracker.com/TEST-:id") + ``` + ## Import You can import a gitlab_service_custom_issue_tracker state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/service_emails_on_push.py b/sdk/python/pulumi_gitlab/service_emails_on_push.py index e8bf15d58..4eeb84319 100644 --- a/sdk/python/pulumi_gitlab/service_emails_on_push.py +++ b/sdk/python/pulumi_gitlab/service_emails_on_push.py @@ -433,6 +433,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + emails = gitlab.ServiceEmailsOnPush("emails", + project=awesome_project.id, + recipients="myrecipient@example.com myotherrecipient@example.com") + ``` + ## Import You can import a gitlab_service_emails_on_push state using the project ID, e.g. @@ -464,6 +478,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + emails = gitlab.ServiceEmailsOnPush("emails", + project=awesome_project.id, + recipients="myrecipient@example.com myotherrecipient@example.com") + ``` + ## Import You can import a gitlab_service_emails_on_push state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/service_external_wiki.py b/sdk/python/pulumi_gitlab/service_external_wiki.py index d02574058..805b777e6 100644 --- a/sdk/python/pulumi_gitlab/service_external_wiki.py +++ b/sdk/python/pulumi_gitlab/service_external_wiki.py @@ -232,6 +232,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + wiki = gitlab.ServiceExternalWiki("wiki", + project=awesome_project.id, + external_wiki_url="https://MyAwesomeExternalWikiURL.com") + ``` + ## Import You can import a gitlab_service_external_wiki state using the project ID, e.g. @@ -258,6 +272,20 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#external-wiki) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + wiki = gitlab.ServiceExternalWiki("wiki", + project=awesome_project.id, + external_wiki_url="https://MyAwesomeExternalWikiURL.com") + ``` + ## Import You can import a gitlab_service_external_wiki state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/service_github.py b/sdk/python/pulumi_gitlab/service_github.py index accd641b1..6c2b20f76 100644 --- a/sdk/python/pulumi_gitlab/service_github.py +++ b/sdk/python/pulumi_gitlab/service_github.py @@ -295,6 +295,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + github = gitlab.ServiceGithub("github", + project=awesome_project.id, + token="REDACTED", + repository_url="https://github.com/gitlabhq/terraform-provider-gitlab") + ``` + ## Import ```sh @@ -327,6 +342,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#github) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + github = gitlab.ServiceGithub("github", + project=awesome_project.id, + token="REDACTED", + repository_url="https://github.com/gitlabhq/terraform-provider-gitlab") + ``` + ## Import ```sh diff --git a/sdk/python/pulumi_gitlab/service_jira.py b/sdk/python/pulumi_gitlab/service_jira.py index f9cf73534..e00d0bab2 100644 --- a/sdk/python/pulumi_gitlab/service_jira.py +++ b/sdk/python/pulumi_gitlab/service_jira.py @@ -778,6 +778,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + jira = gitlab.ServiceJira("jira", + project=awesome_project.id, + url="https://jira.example.com", + username="user", + password="mypass") + ``` + ## Import You can import a gitlab_service_jira state using the project ID, e.g. @@ -818,6 +834,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + jira = gitlab.ServiceJira("jira", + project=awesome_project.id, + url="https://jira.example.com", + username="user", + password="mypass") + ``` + ## Import You can import a gitlab_service_jira state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/service_microsoft_teams.py b/sdk/python/pulumi_gitlab/service_microsoft_teams.py index c925777f8..eeec66748 100644 --- a/sdk/python/pulumi_gitlab/service_microsoft_teams.py +++ b/sdk/python/pulumi_gitlab/service_microsoft_teams.py @@ -643,6 +643,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + teams = gitlab.ServiceMicrosoftTeams("teams", + project=awesome_project.id, + webhook="https://testurl.com/?token=XYZ", + push_events=True) + ``` + ## Import You can import a gitlab_service_microsoft_teams state using the project ID, e.g. @@ -680,6 +695,21 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#microsoft-teams) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + teams = gitlab.ServiceMicrosoftTeams("teams", + project=awesome_project.id, + webhook="https://testurl.com/?token=XYZ", + push_events=True) + ``` + ## Import You can import a gitlab_service_microsoft_teams state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/service_pipelines_email.py b/sdk/python/pulumi_gitlab/service_pipelines_email.py index 346677bbb..2f963b7d6 100644 --- a/sdk/python/pulumi_gitlab/service_pipelines_email.py +++ b/sdk/python/pulumi_gitlab/service_pipelines_email.py @@ -216,6 +216,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + email = gitlab.ServicePipelinesEmail("email", + project=awesome_project.id, + recipients=["gitlab@user.create"], + notify_only_broken_pipelines=True, + branches_to_be_notified="all") + ``` + ## Import You can import a gitlab_service_pipelines_email state using the project ID, e.g. @@ -244,6 +260,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#pipeline-emails) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + email = gitlab.ServicePipelinesEmail("email", + project=awesome_project.id, + recipients=["gitlab@user.create"], + notify_only_broken_pipelines=True, + branches_to_be_notified="all") + ``` + ## Import You can import a gitlab_service_pipelines_email state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/service_slack.py b/sdk/python/pulumi_gitlab/service_slack.py index 723ef3c6c..cca0c8ea4 100644 --- a/sdk/python/pulumi_gitlab/service_slack.py +++ b/sdk/python/pulumi_gitlab/service_slack.py @@ -1023,6 +1023,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + slack = gitlab.ServiceSlack("slack", + project=awesome_project.id, + webhook="https://webhook.com", + username="myuser", + push_events=True, + push_channel="push_chan") + ``` + ## Import You can import a gitlab_service_slack.slack state using the project ID, e.g. @@ -1070,6 +1087,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#slack-notifications) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + awesome_project = gitlab.Project("awesomeProject", + description="My awesome project.", + visibility_level="public") + slack = gitlab.ServiceSlack("slack", + project=awesome_project.id, + webhook="https://webhook.com", + username="myuser", + push_events=True, + push_channel="push_chan") + ``` + ## Import You can import a gitlab_service_slack.slack state using the project ID, e.g. diff --git a/sdk/python/pulumi_gitlab/system_hook.py b/sdk/python/pulumi_gitlab/system_hook.py index 0024e0981..438677a85 100644 --- a/sdk/python/pulumi_gitlab/system_hook.py +++ b/sdk/python/pulumi_gitlab/system_hook.py @@ -358,6 +358,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/system_hooks.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.SystemHook("example", + enable_ssl_verification=True, + merge_requests_events=True, + push_events=True, + repository_update_events=True, + tag_push_events=True, + token="secret-token", + url="https://example.com/hook-%d") + ``` + ## Import You can import a system hook using the hook id `{hook-id}`, e.g. @@ -391,6 +407,22 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/system_hooks.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.SystemHook("example", + enable_ssl_verification=True, + merge_requests_events=True, + push_events=True, + repository_update_events=True, + tag_push_events=True, + token="secret-token", + url="https://example.com/hook-%d") + ``` + ## Import You can import a system hook using the hook id `{hook-id}`, e.g. diff --git a/sdk/python/pulumi_gitlab/tag_protection.py b/sdk/python/pulumi_gitlab/tag_protection.py index 4fc87d269..3d2c35bef 100644 --- a/sdk/python/pulumi_gitlab/tag_protection.py +++ b/sdk/python/pulumi_gitlab/tag_protection.py @@ -213,6 +213,26 @@ def __init__(__self__, tag: Optional[pulumi.Input[str]] = None, __props__=None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + tag_protect = gitlab.TagProtection("tagProtect", + allowed_to_creates=[ + gitlab.TagProtectionAllowedToCreateArgs( + user_id=42, + ), + gitlab.TagProtectionAllowedToCreateArgs( + group_id=43, + ), + ], + create_access_level="developer", + project="12345", + tag="TagProtected") + ``` + ## Import Tag protections can be imported using an id made up of `project_id:tag_name`, e.g. @@ -235,6 +255,26 @@ def __init__(__self__, args: TagProtectionArgs, opts: Optional[pulumi.ResourceOptions] = None): """ + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + tag_protect = gitlab.TagProtection("tagProtect", + allowed_to_creates=[ + gitlab.TagProtectionAllowedToCreateArgs( + user_id=42, + ), + gitlab.TagProtectionAllowedToCreateArgs( + group_id=43, + ), + ], + create_access_level="developer", + project="12345", + tag="TagProtected") + ``` + ## Import Tag protections can be imported using an id made up of `project_id:tag_name`, e.g. diff --git a/sdk/python/pulumi_gitlab/user.py b/sdk/python/pulumi_gitlab/user.py index 4bc55e2f8..4fda9d53c 100644 --- a/sdk/python/pulumi_gitlab/user.py +++ b/sdk/python/pulumi_gitlab/user.py @@ -571,6 +571,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.User("example", + can_create_group=False, + email="gitlab@user.create", + is_admin=True, + is_external=True, + password="superPassword", + projects_limit=4, + reset_password=False, + username="example") + ``` + ## Import ```sh @@ -614,6 +631,23 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example = gitlab.User("example", + can_create_group=False, + email="gitlab@user.create", + is_admin=True, + is_external=True, + password="superPassword", + projects_limit=4, + reset_password=False, + username="example") + ``` + ## Import ```sh diff --git a/sdk/python/pulumi_gitlab/user_custom_attribute.py b/sdk/python/pulumi_gitlab/user_custom_attribute.py index a2327f0fe..7eea92879 100644 --- a/sdk/python/pulumi_gitlab/user_custom_attribute.py +++ b/sdk/python/pulumi_gitlab/user_custom_attribute.py @@ -170,6 +170,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + attr = gitlab.UserCustomAttribute("attr", + key="location", + user=42, + value="Greenland") + ``` + ## Import You can import a user custom attribute using an id made up of `{user-id}:{key}`, e.g. @@ -195,6 +207,18 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/custom_attributes.html) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + attr = gitlab.UserCustomAttribute("attr", + key="location", + user=42, + value="Greenland") + ``` + ## Import You can import a user custom attribute using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/python/pulumi_gitlab/user_gpg_key.py b/sdk/python/pulumi_gitlab/user_gpg_key.py index 1f8ee09b2..83f561a1f 100644 --- a/sdk/python/pulumi_gitlab/user_gpg_key.py +++ b/sdk/python/pulumi_gitlab/user_gpg_key.py @@ -177,6 +177,25 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html#get-a-specific-gpg-key) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_user = gitlab.get_user(username="example-user") + # Manages a GPG key for the specified user. An admin token is required if `user_id` is specified. + example_user_gpg_key = gitlab.UserGpgKey("exampleUserGpgKey", + user_id=example_user.id, + key=\"\"\"-----BEGIN PGP PUBLIC KEY BLOCK----- + ... + -----END PGP PUBLIC KEY BLOCK-----\"\"\") + # Manages a GPG key for the current user + example_user_user_gpg_key = gitlab.UserGpgKey("exampleUserUserGpgKey", key=\"\"\"-----BEGIN PGP PUBLIC KEY BLOCK----- + ... + -----END PGP PUBLIC KEY BLOCK-----\"\"\") + ``` + ## Import You can import a GPG key for a specific user using an id made up of `{user-id}:{key}`, e.g. @@ -209,6 +228,25 @@ def __init__(__self__, **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html#get-a-specific-gpg-key) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_user = gitlab.get_user(username="example-user") + # Manages a GPG key for the specified user. An admin token is required if `user_id` is specified. + example_user_gpg_key = gitlab.UserGpgKey("exampleUserGpgKey", + user_id=example_user.id, + key=\"\"\"-----BEGIN PGP PUBLIC KEY BLOCK----- + ... + -----END PGP PUBLIC KEY BLOCK-----\"\"\") + # Manages a GPG key for the current user + example_user_user_gpg_key = gitlab.UserGpgKey("exampleUserUserGpgKey", key=\"\"\"-----BEGIN PGP PUBLIC KEY BLOCK----- + ... + -----END PGP PUBLIC KEY BLOCK-----\"\"\") + ``` + ## Import You can import a GPG key for a specific user using an id made up of `{user-id}:{key}`, e.g. diff --git a/sdk/python/pulumi_gitlab/user_ssh_key.py b/sdk/python/pulumi_gitlab/user_ssh_key.py index 9e8051fda..ddc2c9527 100644 --- a/sdk/python/pulumi_gitlab/user_ssh_key.py +++ b/sdk/python/pulumi_gitlab/user_ssh_key.py @@ -255,6 +255,20 @@ def __init__(__self__, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/users.html#single-ssh-key) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_user = gitlab.get_user(username="example-user") + example_user_ssh_key = gitlab.UserSshKey("exampleUserSshKey", + user_id=example_user.id, + title="example-key", + key="ssh-ed25519 AAAA...", + expires_at="2016-01-21T00:00:00.000Z") + ``` + ## Import You can import a user ssh key using an id made up of `{user-id}:{key}`, e.g. @@ -281,6 +295,20 @@ def __init__(__self__, **Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/users.html#single-ssh-key) + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + example_user = gitlab.get_user(username="example-user") + example_user_ssh_key = gitlab.UserSshKey("exampleUserSshKey", + user_id=example_user.id, + title="example-key", + key="ssh-ed25519 AAAA...", + expires_at="2016-01-21T00:00:00.000Z") + ``` + ## Import You can import a user ssh key using an id made up of `{user-id}:{key}`, e.g.