aptible.Environment
Explore with Pulumi AI
Import
Existing Environments can be imported using the Environment ID. For example:
bash
$ pulumi import aptible:index/environment:Environment example <ID>
Create Environment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);
@overload
def Environment(resource_name: str,
args: EnvironmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Environment(resource_name: str,
opts: Optional[ResourceOptions] = None,
handle: Optional[str] = None,
stack_id: Optional[float] = None,
backup_retention_policies: Optional[Sequence[EnvironmentBackupRetentionPolicyArgs]] = None,
environment_id: Optional[str] = None,
org_id: Optional[str] = None)
func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: aptible:Environment
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 EnvironmentArgs
- 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 EnvironmentArgs
- 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 EnvironmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnvironmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnvironmentArgs
- 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 environmentResource = new Aptible.Environment("environmentResource", new()
{
Handle = "string",
StackId = 0,
BackupRetentionPolicies = new[]
{
new Aptible.Inputs.EnvironmentBackupRetentionPolicyArgs
{
Daily = 0,
KeepFinal = false,
MakeCopy = false,
Monthly = 0,
Yearly = 0,
},
},
EnvironmentId = "string",
OrgId = "string",
});
example, err := aptible.NewEnvironment(ctx, "environmentResource", &aptible.EnvironmentArgs{
Handle: pulumi.String("string"),
StackId: pulumi.Float64(0),
BackupRetentionPolicies: aptible.EnvironmentBackupRetentionPolicyArray{
&aptible.EnvironmentBackupRetentionPolicyArgs{
Daily: pulumi.Float64(0),
KeepFinal: pulumi.Bool(false),
MakeCopy: pulumi.Bool(false),
Monthly: pulumi.Float64(0),
Yearly: pulumi.Float64(0),
},
},
EnvironmentId: pulumi.String("string"),
OrgId: pulumi.String("string"),
})
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
.handle("string")
.stackId(0)
.backupRetentionPolicies(EnvironmentBackupRetentionPolicyArgs.builder()
.daily(0)
.keepFinal(false)
.makeCopy(false)
.monthly(0)
.yearly(0)
.build())
.environmentId("string")
.orgId("string")
.build());
environment_resource = aptible.Environment("environmentResource",
handle="string",
stack_id=0,
backup_retention_policies=[{
"daily": 0,
"keep_final": False,
"make_copy": False,
"monthly": 0,
"yearly": 0,
}],
environment_id="string",
org_id="string")
const environmentResource = new aptible.Environment("environmentResource", {
handle: "string",
stackId: 0,
backupRetentionPolicies: [{
daily: 0,
keepFinal: false,
makeCopy: false,
monthly: 0,
yearly: 0,
}],
environmentId: "string",
orgId: "string",
});
type: aptible:Environment
properties:
backupRetentionPolicies:
- daily: 0
keepFinal: false
makeCopy: false
monthly: 0
yearly: 0
environmentId: string
handle: string
orgId: string
stackId: 0
Environment 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 Environment resource accepts the following input properties:
- Handle string
- The handle for the environment.
- Stack
Id double - The id of the stack you would like the environment to be provisioned on.
- Backup
Retention List<EnvironmentPolicies Backup Retention Policy> - A block defining the environment's backup retention policy. An environment may only have one policy block.
- Environment
Id string - Org
Id string - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to.
- Handle string
- The handle for the environment.
- Stack
Id float64 - The id of the stack you would like the environment to be provisioned on.
- Backup
Retention []EnvironmentPolicies Backup Retention Policy Args - A block defining the environment's backup retention policy. An environment may only have one policy block.
- Environment
Id string - Org
Id string - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to.
- handle String
- The handle for the environment.
- stack
Id Double - The id of the stack you would like the environment to be provisioned on.
- backup
Retention List<EnvironmentPolicies Backup Retention Policy> - A block defining the environment's backup retention policy. An environment may only have one policy block.
- environment
Id String - org
Id String - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to.
- handle string
- The handle for the environment.
- stack
Id number - The id of the stack you would like the environment to be provisioned on.
- backup
Retention EnvironmentPolicies Backup Retention Policy[] - A block defining the environment's backup retention policy. An environment may only have one policy block.
- environment
Id string - org
Id string - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to.
- handle str
- The handle for the environment.
- stack_
id float - The id of the stack you would like the environment to be provisioned on.
- backup_
retention_ Sequence[Environmentpolicies Backup Retention Policy Args] - A block defining the environment's backup retention policy. An environment may only have one policy block.
- environment_
id str - org_
id str - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to.
- handle String
- The handle for the environment.
- stack
Id Number - The id of the stack you would like the environment to be provisioned on.
- backup
Retention List<Property Map>Policies - A block defining the environment's backup retention policy. An environment may only have one policy block.
- environment
Id String - org
Id String - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to.
Outputs
All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:
Look up Existing Environment Resource
Get an existing Environment 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?: EnvironmentState, opts?: CustomResourceOptions): Environment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_retention_policies: Optional[Sequence[EnvironmentBackupRetentionPolicyArgs]] = None,
env_id: Optional[float] = None,
environment_id: Optional[str] = None,
handle: Optional[str] = None,
org_id: Optional[str] = None,
stack_id: Optional[float] = None) -> Environment
func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
public static Environment get(String name, Output<String> id, EnvironmentState state, CustomResourceOptions options)
resources: _: type: aptible:Environment 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.
- Backup
Retention List<EnvironmentPolicies Backup Retention Policy> - A block defining the environment's backup retention policy. An environment may only have one policy block.
- Env
Id double - The unique ID for the environment
- Environment
Id string - Handle string
- The handle for the environment.
- Org
Id string - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to. - Stack
Id double - The id of the stack you would like the environment to be provisioned on.
- Backup
Retention []EnvironmentPolicies Backup Retention Policy Args - A block defining the environment's backup retention policy. An environment may only have one policy block.
- Env
Id float64 - The unique ID for the environment
- Environment
Id string - Handle string
- The handle for the environment.
- Org
Id string - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to. - Stack
Id float64 - The id of the stack you would like the environment to be provisioned on.
- backup
Retention List<EnvironmentPolicies Backup Retention Policy> - A block defining the environment's backup retention policy. An environment may only have one policy block.
- env
Id Double - The unique ID for the environment
- environment
Id String - handle String
- The handle for the environment.
- org
Id String - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to. - stack
Id Double - The id of the stack you would like the environment to be provisioned on.
- backup
Retention EnvironmentPolicies Backup Retention Policy[] - A block defining the environment's backup retention policy. An environment may only have one policy block.
- env
Id number - The unique ID for the environment
- environment
Id string - handle string
- The handle for the environment.
- org
Id string - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to. - stack
Id number - The id of the stack you would like the environment to be provisioned on.
- backup_
retention_ Sequence[Environmentpolicies Backup Retention Policy Args] - A block defining the environment's backup retention policy. An environment may only have one policy block.
- env_
id float - The unique ID for the environment
- environment_
id str - handle str
- The handle for the environment.
- org_
id str - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to. - stack_
id float - The id of the stack you would like the environment to be provisioned on.
- backup
Retention List<Property Map>Policies - A block defining the environment's backup retention policy. An environment may only have one policy block.
- env
Id Number - The unique ID for the environment
- environment
Id String - handle String
- The handle for the environment.
- org
Id String - The id of the organization you would like the environment to be provisioned on. If the
org_id
is not provided, the provider will attempt to determine it for you. If you are only a member of a single Aptible organization or the environment is on a dedicated stack, it will certainly be able to. - stack
Id Number - The id of the stack you would like the environment to be provisioned on.
Supporting Types
EnvironmentBackupRetentionPolicy, EnvironmentBackupRetentionPolicyArgs
- Daily double
- The number of daily backups to retain per database. Minimum of 1.
- Keep
Final bool - Whether the final backup of databases should be retained when they're deleted.
- Make
Copy bool - Whether backups should be copied to another region.
- Monthly double
- The number of monthly backups to retain per database.
- Yearly double
- The number of yearly backups to retain per database.
- Daily float64
- The number of daily backups to retain per database. Minimum of 1.
- Keep
Final bool - Whether the final backup of databases should be retained when they're deleted.
- Make
Copy bool - Whether backups should be copied to another region.
- Monthly float64
- The number of monthly backups to retain per database.
- Yearly float64
- The number of yearly backups to retain per database.
- daily Double
- The number of daily backups to retain per database. Minimum of 1.
- keep
Final Boolean - Whether the final backup of databases should be retained when they're deleted.
- make
Copy Boolean - Whether backups should be copied to another region.
- monthly Double
- The number of monthly backups to retain per database.
- yearly Double
- The number of yearly backups to retain per database.
- daily number
- The number of daily backups to retain per database. Minimum of 1.
- keep
Final boolean - Whether the final backup of databases should be retained when they're deleted.
- make
Copy boolean - Whether backups should be copied to another region.
- monthly number
- The number of monthly backups to retain per database.
- yearly number
- The number of yearly backups to retain per database.
- daily float
- The number of daily backups to retain per database. Minimum of 1.
- keep_
final bool - Whether the final backup of databases should be retained when they're deleted.
- make_
copy bool - Whether backups should be copied to another region.
- monthly float
- The number of monthly backups to retain per database.
- yearly float
- The number of yearly backups to retain per database.
- daily Number
- The number of daily backups to retain per database. Minimum of 1.
- keep
Final Boolean - Whether the final backup of databases should be retained when they're deleted.
- make
Copy Boolean - Whether backups should be copied to another region.
- monthly Number
- The number of monthly backups to retain per database.
- yearly Number
- The number of yearly backups to retain per database.
Package Details
- Repository
- aptible aptible/terraform-provider-aptible
- License
- Notes
- This Pulumi package is based on the
aptible
Terraform Provider.