Project Branch. See details: https://neon.tech/docs/introduction/branching/
Create Branch Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Branch(name: string, args: BranchArgs, opts?: CustomResourceOptions);@overload
def Branch(resource_name: str,
args: BranchArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Branch(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
name: Optional[str] = None,
parent_id: Optional[str] = None,
parent_lsn: Optional[str] = None,
parent_timestamp: Optional[float] = None,
protected: Optional[str] = None)func NewBranch(ctx *Context, name string, args BranchArgs, opts ...ResourceOption) (*Branch, error)public Branch(string name, BranchArgs args, CustomResourceOptions? opts = null)
public Branch(String name, BranchArgs args)
public Branch(String name, BranchArgs args, CustomResourceOptions options)
type: neon:Branch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var branchResource = new Neon.Branch("branchResource", new()
{
ProjectId = "string",
Name = "string",
ParentId = "string",
ParentLsn = "string",
ParentTimestamp = 0,
Protected = "string",
});
example, err := neon.NewBranch(ctx, "branchResource", &neon.BranchArgs{
ProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
ParentId: pulumi.String("string"),
ParentLsn: pulumi.String("string"),
ParentTimestamp: pulumi.Float64(0),
Protected: pulumi.String("string"),
})
var branchResource = new Branch("branchResource", BranchArgs.builder()
.projectId("string")
.name("string")
.parentId("string")
.parentLsn("string")
.parentTimestamp(0.0)
.protected_("string")
.build());
branch_resource = neon.Branch("branchResource",
project_id="string",
name="string",
parent_id="string",
parent_lsn="string",
parent_timestamp=0,
protected="string")
const branchResource = new neon.Branch("branchResource", {
projectId: "string",
name: "string",
parentId: "string",
parentLsn: "string",
parentTimestamp: 0,
"protected": "string",
});
type: neon:Branch
properties:
name: string
parentId: string
parentLsn: string
parentTimestamp: 0
projectId: string
protected: string
Branch Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Branch resource accepts the following input properties:
- Project
Id string - Project ID.
- Name string
- Branch name.
- Parent
Id string - ID of the branch to check out.
- Parent
Lsn string - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- Parent
Timestamp double - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- Protected string
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- Project
Id string - Project ID.
- Name string
- Branch name.
- Parent
Id string - ID of the branch to check out.
- Parent
Lsn string - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- Parent
Timestamp float64 - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- Protected string
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- project
Id String - Project ID.
- name String
- Branch name.
- parent
Id String - ID of the branch to check out.
- parent
Lsn String - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent
Timestamp Double - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- protected_ String
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- project
Id string - Project ID.
- name string
- Branch name.
- parent
Id string - ID of the branch to check out.
- parent
Lsn string - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent
Timestamp number - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- protected string
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- project_
id str - Project ID.
- name str
- Branch name.
- parent_
id str - ID of the branch to check out.
- parent_
lsn str - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent_
timestamp float - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- protected str
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- project
Id String - Project ID.
- name String
- Branch name.
- parent
Id String - ID of the branch to check out.
- parent
Lsn String - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent
Timestamp Number - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- protected String
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
Outputs
All input properties are implicitly available as output properties. Additionally, the Branch resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Logical
Size double - Branch logical size in MB.
- Id string
- The provider-assigned unique ID for this managed resource.
- Logical
Size float64 - Branch logical size in MB.
- id String
- The provider-assigned unique ID for this managed resource.
- logical
Size Double - Branch logical size in MB.
- id string
- The provider-assigned unique ID for this managed resource.
- logical
Size number - Branch logical size in MB.
- id str
- The provider-assigned unique ID for this managed resource.
- logical_
size float - Branch logical size in MB.
- id String
- The provider-assigned unique ID for this managed resource.
- logical
Size Number - Branch logical size in MB.
Look up Existing Branch Resource
Get an existing Branch resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BranchState, opts?: CustomResourceOptions): Branch@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
logical_size: Optional[float] = None,
name: Optional[str] = None,
parent_id: Optional[str] = None,
parent_lsn: Optional[str] = None,
parent_timestamp: Optional[float] = None,
project_id: Optional[str] = None,
protected: Optional[str] = None) -> Branchfunc GetBranch(ctx *Context, name string, id IDInput, state *BranchState, opts ...ResourceOption) (*Branch, error)public static Branch Get(string name, Input<string> id, BranchState? state, CustomResourceOptions? opts = null)public static Branch get(String name, Output<String> id, BranchState state, CustomResourceOptions options)resources: _: type: neon:Branch get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Logical
Size double - Branch logical size in MB.
- Name string
- Branch name.
- Parent
Id string - ID of the branch to check out.
- Parent
Lsn string - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- Parent
Timestamp double - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- Project
Id string - Project ID.
- Protected string
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- Logical
Size float64 - Branch logical size in MB.
- Name string
- Branch name.
- Parent
Id string - ID of the branch to check out.
- Parent
Lsn string - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- Parent
Timestamp float64 - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- Project
Id string - Project ID.
- Protected string
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- logical
Size Double - Branch logical size in MB.
- name String
- Branch name.
- parent
Id String - ID of the branch to check out.
- parent
Lsn String - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent
Timestamp Double - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- project
Id String - Project ID.
- protected_ String
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- logical
Size number - Branch logical size in MB.
- name string
- Branch name.
- parent
Id string - ID of the branch to check out.
- parent
Lsn string - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent
Timestamp number - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- project
Id string - Project ID.
- protected string
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- logical_
size float - Branch logical size in MB.
- name str
- Branch name.
- parent_
id str - ID of the branch to check out.
- parent_
lsn str - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent_
timestamp float - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- project_
id str - Project ID.
- protected str
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
- logical
Size Number - Branch logical size in MB.
- name String
- Branch name.
- parent
Id String - ID of the branch to check out.
- parent
Lsn String - Log Sequence Number (LSN) horizon for the data to be present in the new branch. See details: https://neon.tech/docs/reference/glossary/#lsn
- parent
Timestamp Number - Timestamp horizon for the data to be present in the new branch. Note: it's defined as Unix epoch.'
- project
Id String - Project ID.
- protected String
- Set to 'yes' to activate, 'no' to deactivate explicitly, and omit to keep the default value. Set whether the branch is protected.
Import
The Neon Branch can be imported to the terraform state by its composite identifier that consists of
ProjectID and BranchID separated by a forward slash.
Import using the import block:
For example:
hcl
import {
to = neon_branch.example
id = “curly-poetry-30604233/br-snowy-mountain-a5jkb18i”
}
Import using the command pulumi import:
commandline
$ pulumi import neon:index/branch:Branch example "curly-poetry-30604233/br-snowy-mountain-a5jkb18i"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- neon kislerdm/terraform-provider-neon
- License
- Notes
- This Pulumi package is based on the
neonTerraform Provider.
