-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pulumi-bot
committed
Jun 22, 2023
1 parent
1e2432a
commit 00cfa3e
Showing
31 changed files
with
2,996 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** | ||
// *** Do not edit by hand unless you're certain you know what you are doing! *** | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Immutable; | ||
using System.Threading.Tasks; | ||
using Pulumi.Serialization; | ||
|
||
namespace Pulumi.Github | ||
{ | ||
public static class GetRepositoryDeploymentBranchPolicies | ||
{ | ||
/// <summary> | ||
/// Use this data source to retrieve deployment branch policies for a repository / environment. | ||
/// | ||
/// {{% examples %}} | ||
/// ## Example Usage | ||
/// {{% example %}} | ||
/// | ||
/// ```csharp | ||
/// using System.Collections.Generic; | ||
/// using System.Linq; | ||
/// using Pulumi; | ||
/// using Github = Pulumi.Github; | ||
/// | ||
/// return await Deployment.RunAsync(() => | ||
/// { | ||
/// var example = Github.GetRepositoryDeploymentBranchPolicies.Invoke(new() | ||
/// { | ||
/// EnvironmentName = "env_name", | ||
/// Repository = "example-repository", | ||
/// }); | ||
/// | ||
/// }); | ||
/// ``` | ||
/// {{% /example %}} | ||
/// {{% /examples %}} | ||
/// </summary> | ||
public static Task<GetRepositoryDeploymentBranchPoliciesResult> InvokeAsync(GetRepositoryDeploymentBranchPoliciesArgs args, InvokeOptions? options = null) | ||
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetRepositoryDeploymentBranchPoliciesResult>("github:index/getRepositoryDeploymentBranchPolicies:getRepositoryDeploymentBranchPolicies", args ?? new GetRepositoryDeploymentBranchPoliciesArgs(), options.WithDefaults()); | ||
|
||
/// <summary> | ||
/// Use this data source to retrieve deployment branch policies for a repository / environment. | ||
/// | ||
/// {{% examples %}} | ||
/// ## Example Usage | ||
/// {{% example %}} | ||
/// | ||
/// ```csharp | ||
/// using System.Collections.Generic; | ||
/// using System.Linq; | ||
/// using Pulumi; | ||
/// using Github = Pulumi.Github; | ||
/// | ||
/// return await Deployment.RunAsync(() => | ||
/// { | ||
/// var example = Github.GetRepositoryDeploymentBranchPolicies.Invoke(new() | ||
/// { | ||
/// EnvironmentName = "env_name", | ||
/// Repository = "example-repository", | ||
/// }); | ||
/// | ||
/// }); | ||
/// ``` | ||
/// {{% /example %}} | ||
/// {{% /examples %}} | ||
/// </summary> | ||
public static Output<GetRepositoryDeploymentBranchPoliciesResult> Invoke(GetRepositoryDeploymentBranchPoliciesInvokeArgs args, InvokeOptions? options = null) | ||
=> global::Pulumi.Deployment.Instance.Invoke<GetRepositoryDeploymentBranchPoliciesResult>("github:index/getRepositoryDeploymentBranchPolicies:getRepositoryDeploymentBranchPolicies", args ?? new GetRepositoryDeploymentBranchPoliciesInvokeArgs(), options.WithDefaults()); | ||
} | ||
|
||
|
||
public sealed class GetRepositoryDeploymentBranchPoliciesArgs : global::Pulumi.InvokeArgs | ||
{ | ||
/// <summary> | ||
/// Name of the environment to retrieve the deployment branch policies from. | ||
/// </summary> | ||
[Input("environmentName", required: true)] | ||
public string EnvironmentName { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// Name of the repository to retrieve the deployment branch policies from. | ||
/// </summary> | ||
[Input("repository", required: true)] | ||
public string Repository { get; set; } = null!; | ||
|
||
public GetRepositoryDeploymentBranchPoliciesArgs() | ||
{ | ||
} | ||
public static new GetRepositoryDeploymentBranchPoliciesArgs Empty => new GetRepositoryDeploymentBranchPoliciesArgs(); | ||
} | ||
|
||
public sealed class GetRepositoryDeploymentBranchPoliciesInvokeArgs : global::Pulumi.InvokeArgs | ||
{ | ||
/// <summary> | ||
/// Name of the environment to retrieve the deployment branch policies from. | ||
/// </summary> | ||
[Input("environmentName", required: true)] | ||
public Input<string> EnvironmentName { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// Name of the repository to retrieve the deployment branch policies from. | ||
/// </summary> | ||
[Input("repository", required: true)] | ||
public Input<string> Repository { get; set; } = null!; | ||
|
||
public GetRepositoryDeploymentBranchPoliciesInvokeArgs() | ||
{ | ||
} | ||
public static new GetRepositoryDeploymentBranchPoliciesInvokeArgs Empty => new GetRepositoryDeploymentBranchPoliciesInvokeArgs(); | ||
} | ||
|
||
|
||
[OutputType] | ||
public sealed class GetRepositoryDeploymentBranchPoliciesResult | ||
{ | ||
/// <summary> | ||
/// The list of this repository / environment deployment policies. Each element of `deployment_branch_policies` has the following attributes: | ||
/// </summary> | ||
public readonly ImmutableArray<Outputs.GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyResult> DeploymentBranchPolicies; | ||
public readonly string EnvironmentName; | ||
/// <summary> | ||
/// The provider-assigned unique ID for this managed resource. | ||
/// </summary> | ||
public readonly string Id; | ||
public readonly string Repository; | ||
|
||
[OutputConstructor] | ||
private GetRepositoryDeploymentBranchPoliciesResult( | ||
ImmutableArray<Outputs.GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyResult> deploymentBranchPolicies, | ||
|
||
string environmentName, | ||
|
||
string id, | ||
|
||
string repository) | ||
{ | ||
DeploymentBranchPolicies = deploymentBranchPolicies; | ||
EnvironmentName = environmentName; | ||
Id = id; | ||
Repository = repository; | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
sdk/dotnet/Outputs/GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** | ||
// *** Do not edit by hand unless you're certain you know what you are doing! *** | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Immutable; | ||
using System.Threading.Tasks; | ||
using Pulumi.Serialization; | ||
|
||
namespace Pulumi.Github.Outputs | ||
{ | ||
|
||
[OutputType] | ||
public sealed class GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyResult | ||
{ | ||
/// <summary> | ||
/// Id of the policy. | ||
/// </summary> | ||
public readonly string Id; | ||
/// <summary> | ||
/// The name pattern that branches must match in order to deploy to the environment. | ||
/// </summary> | ||
public readonly string Name; | ||
|
||
[OutputConstructor] | ||
private GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicyResult( | ||
string id, | ||
|
||
string name) | ||
{ | ||
Id = id; | ||
Name = name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** | ||
// *** Do not edit by hand unless you're certain you know what you are doing! *** | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Immutable; | ||
using System.Threading.Tasks; | ||
using Pulumi.Serialization; | ||
|
||
namespace Pulumi.Github | ||
{ | ||
/// <summary> | ||
/// This resource allows you to create and manage deployment branch policies. | ||
/// | ||
/// ## Import | ||
/// | ||
/// ```sh | ||
/// $ pulumi import github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy foo repo:env:id | ||
/// ``` | ||
/// </summary> | ||
[GithubResourceType("github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy")] | ||
public partial class RepositoryDeploymentBranchPolicy : global::Pulumi.CustomResource | ||
{ | ||
/// <summary> | ||
/// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. | ||
/// </summary> | ||
[Output("environmentName")] | ||
public Output<string> EnvironmentName { get; private set; } = null!; | ||
|
||
/// <summary> | ||
/// An etag representing the Branch object. | ||
/// </summary> | ||
[Output("etag")] | ||
public Output<string> Etag { get; private set; } = null!; | ||
|
||
/// <summary> | ||
/// The name pattern that branches must match in order to deploy to the environment. | ||
/// </summary> | ||
[Output("name")] | ||
public Output<string> Name { get; private set; } = null!; | ||
|
||
/// <summary> | ||
/// The repository to create the policy in. | ||
/// </summary> | ||
[Output("repository")] | ||
public Output<string> Repository { get; private set; } = null!; | ||
|
||
|
||
/// <summary> | ||
/// Create a RepositoryDeploymentBranchPolicy resource with the given unique name, arguments, and options. | ||
/// </summary> | ||
/// | ||
/// <param name="name">The unique name of the resource</param> | ||
/// <param name="args">The arguments used to populate this resource's properties</param> | ||
/// <param name="options">A bag of options that control this resource's behavior</param> | ||
public RepositoryDeploymentBranchPolicy(string name, RepositoryDeploymentBranchPolicyArgs args, CustomResourceOptions? options = null) | ||
: base("github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy", name, args ?? new RepositoryDeploymentBranchPolicyArgs(), MakeResourceOptions(options, "")) | ||
{ | ||
} | ||
|
||
private RepositoryDeploymentBranchPolicy(string name, Input<string> id, RepositoryDeploymentBranchPolicyState? state = null, CustomResourceOptions? options = null) | ||
: base("github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy", name, state, MakeResourceOptions(options, id)) | ||
{ | ||
} | ||
|
||
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) | ||
{ | ||
var defaultOptions = new CustomResourceOptions | ||
{ | ||
Version = Utilities.Version, | ||
}; | ||
var merged = CustomResourceOptions.Merge(defaultOptions, options); | ||
// Override the ID if one was specified for consistency with other language SDKs. | ||
merged.Id = id ?? merged.Id; | ||
return merged; | ||
} | ||
/// <summary> | ||
/// Get an existing RepositoryDeploymentBranchPolicy resource's state with the given name, ID, and optional extra | ||
/// properties used to qualify the lookup. | ||
/// </summary> | ||
/// | ||
/// <param name="name">The unique name of the resulting resource.</param> | ||
/// <param name="id">The unique provider ID of the resource to lookup.</param> | ||
/// <param name="state">Any extra arguments used during the lookup.</param> | ||
/// <param name="options">A bag of options that control this resource's behavior</param> | ||
public static RepositoryDeploymentBranchPolicy Get(string name, Input<string> id, RepositoryDeploymentBranchPolicyState? state = null, CustomResourceOptions? options = null) | ||
{ | ||
return new RepositoryDeploymentBranchPolicy(name, id, state, options); | ||
} | ||
} | ||
|
||
public sealed class RepositoryDeploymentBranchPolicyArgs : global::Pulumi.ResourceArgs | ||
{ | ||
/// <summary> | ||
/// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. | ||
/// </summary> | ||
[Input("environmentName", required: true)] | ||
public Input<string> EnvironmentName { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// The name pattern that branches must match in order to deploy to the environment. | ||
/// </summary> | ||
[Input("name")] | ||
public Input<string>? Name { get; set; } | ||
|
||
/// <summary> | ||
/// The repository to create the policy in. | ||
/// </summary> | ||
[Input("repository", required: true)] | ||
public Input<string> Repository { get; set; } = null!; | ||
|
||
public RepositoryDeploymentBranchPolicyArgs() | ||
{ | ||
} | ||
public static new RepositoryDeploymentBranchPolicyArgs Empty => new RepositoryDeploymentBranchPolicyArgs(); | ||
} | ||
|
||
public sealed class RepositoryDeploymentBranchPolicyState : global::Pulumi.ResourceArgs | ||
{ | ||
/// <summary> | ||
/// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. | ||
/// </summary> | ||
[Input("environmentName")] | ||
public Input<string>? EnvironmentName { get; set; } | ||
|
||
/// <summary> | ||
/// An etag representing the Branch object. | ||
/// </summary> | ||
[Input("etag")] | ||
public Input<string>? Etag { get; set; } | ||
|
||
/// <summary> | ||
/// The name pattern that branches must match in order to deploy to the environment. | ||
/// </summary> | ||
[Input("name")] | ||
public Input<string>? Name { get; set; } | ||
|
||
/// <summary> | ||
/// The repository to create the policy in. | ||
/// </summary> | ||
[Input("repository")] | ||
public Input<string>? Repository { get; set; } | ||
|
||
public RepositoryDeploymentBranchPolicyState() | ||
{ | ||
} | ||
public static new RepositoryDeploymentBranchPolicyState Empty => new RepositoryDeploymentBranchPolicyState(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.