1. Packages
  2. Aptible Provider
  3. API Docs
  4. Environment
aptible 0.9.12 published on Monday, Apr 14, 2025 by aptible

aptible.Environment

Explore with Pulumi AI

aptible logo
aptible 0.9.12 published on Monday, Apr 14, 2025 by aptible

    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.
    StackId double
    The id of the stack you would like the environment to be provisioned on.
    BackupRetentionPolicies List<EnvironmentBackupRetentionPolicy>
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    EnvironmentId string
    OrgId 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.
    StackId float64
    The id of the stack you would like the environment to be provisioned on.
    BackupRetentionPolicies []EnvironmentBackupRetentionPolicyArgs
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    EnvironmentId string
    OrgId 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.
    stackId Double
    The id of the stack you would like the environment to be provisioned on.
    backupRetentionPolicies List<EnvironmentBackupRetentionPolicy>
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    environmentId String
    orgId 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.
    stackId number
    The id of the stack you would like the environment to be provisioned on.
    backupRetentionPolicies EnvironmentBackupRetentionPolicy[]
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    environmentId string
    orgId 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_policies Sequence[EnvironmentBackupRetentionPolicyArgs]
    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.
    stackId Number
    The id of the stack you would like the environment to be provisioned on.
    backupRetentionPolicies List<Property Map>
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    environmentId String
    orgId 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:

    EnvId double
    The unique ID for the environment
    Id string
    The provider-assigned unique ID for this managed resource.
    EnvId float64
    The unique ID for the environment
    Id string
    The provider-assigned unique ID for this managed resource.
    envId Double
    The unique ID for the environment
    id String
    The provider-assigned unique ID for this managed resource.
    envId number
    The unique ID for the environment
    id string
    The provider-assigned unique ID for this managed resource.
    env_id float
    The unique ID for the environment
    id str
    The provider-assigned unique ID for this managed resource.
    envId Number
    The unique ID for the environment
    id String
    The provider-assigned unique ID for this managed resource.

    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.
    The following state arguments are supported:
    BackupRetentionPolicies List<EnvironmentBackupRetentionPolicy>
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    EnvId double
    The unique ID for the environment
    EnvironmentId string
    Handle string
    The handle for the environment.
    OrgId 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.
    StackId double
    The id of the stack you would like the environment to be provisioned on.
    BackupRetentionPolicies []EnvironmentBackupRetentionPolicyArgs
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    EnvId float64
    The unique ID for the environment
    EnvironmentId string
    Handle string
    The handle for the environment.
    OrgId 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.
    StackId float64
    The id of the stack you would like the environment to be provisioned on.
    backupRetentionPolicies List<EnvironmentBackupRetentionPolicy>
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    envId Double
    The unique ID for the environment
    environmentId String
    handle String
    The handle for the environment.
    orgId 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.
    stackId Double
    The id of the stack you would like the environment to be provisioned on.
    backupRetentionPolicies EnvironmentBackupRetentionPolicy[]
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    envId number
    The unique ID for the environment
    environmentId string
    handle string
    The handle for the environment.
    orgId 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.
    stackId number
    The id of the stack you would like the environment to be provisioned on.
    backup_retention_policies Sequence[EnvironmentBackupRetentionPolicyArgs]
    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.
    backupRetentionPolicies List<Property Map>
    A block defining the environment's backup retention policy. An environment may only have one policy block.
    envId Number
    The unique ID for the environment
    environmentId String
    handle String
    The handle for the environment.
    orgId 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.
    stackId 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.
    KeepFinal bool
    Whether the final backup of databases should be retained when they're deleted.
    MakeCopy 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.
    KeepFinal bool
    Whether the final backup of databases should be retained when they're deleted.
    MakeCopy 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.
    keepFinal Boolean
    Whether the final backup of databases should be retained when they're deleted.
    makeCopy 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.
    keepFinal boolean
    Whether the final backup of databases should be retained when they're deleted.
    makeCopy 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.
    keepFinal Boolean
    Whether the final backup of databases should be retained when they're deleted.
    makeCopy 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.
    aptible logo
    aptible 0.9.12 published on Monday, Apr 14, 2025 by aptible