@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
113 lines (112 loc) • 4.25 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* This resource allows you to create and manage deployment branch policies.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const env = new github.RepositoryEnvironment("env", {
* repository: "my_repo",
* environment: "my_env",
* deploymentBranchPolicy: {
* protectedBranches: false,
* customBranchPolicies: true,
* },
* });
* const foo = new github.RepositoryDeploymentBranchPolicy("foo", {
* repository: "my_repo",
* environmentName: "my_env",
* name: "foo",
* }, {
* dependsOn: [env],
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy foo repo:env:id
* ```
*/
export declare class RepositoryDeploymentBranchPolicy extends pulumi.CustomResource {
/**
* Get an existing RepositoryDeploymentBranchPolicy resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryDeploymentBranchPolicyState, opts?: pulumi.CustomResourceOptions): RepositoryDeploymentBranchPolicy;
/**
* Returns true if the given object is an instance of RepositoryDeploymentBranchPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is RepositoryDeploymentBranchPolicy;
/**
* The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown.
*/
readonly environmentName: pulumi.Output<string>;
/**
* An etag representing the Branch object.
*/
readonly etag: pulumi.Output<string>;
/**
* The name pattern that branches must match in order to deploy to the environment.
*/
readonly name: pulumi.Output<string>;
/**
* The repository to create the policy in.
*/
readonly repository: pulumi.Output<string>;
/**
* Create a RepositoryDeploymentBranchPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RepositoryDeploymentBranchPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RepositoryDeploymentBranchPolicy resources.
*/
export interface RepositoryDeploymentBranchPolicyState {
/**
* The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown.
*/
environmentName?: pulumi.Input<string>;
/**
* An etag representing the Branch object.
*/
etag?: pulumi.Input<string>;
/**
* The name pattern that branches must match in order to deploy to the environment.
*/
name?: pulumi.Input<string>;
/**
* The repository to create the policy in.
*/
repository?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RepositoryDeploymentBranchPolicy resource.
*/
export interface RepositoryDeploymentBranchPolicyArgs {
/**
* The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown.
*/
environmentName: pulumi.Input<string>;
/**
* The name pattern that branches must match in order to deploy to the environment.
*/
name?: pulumi.Input<string>;
/**
* The repository to create the policy in.
*/
repository: pulumi.Input<string>;
}