1. Packages
  2. Genesis Cloud
  3. API Docs
  4. InstanceStatus
Genesis Cloud v0.0.33 published on Thursday, Feb 27, 2025 by Genesiscloud

genesiscloud.InstanceStatus

Explore with Pulumi AI

InstanceStatus resource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as genesiscloud from "@genesiscloud/pulumi-genesiscloud";

const exampleInstance = new genesiscloud.Instance("exampleInstance", {
    region: "NORD-NO-KRS-1",
    image: "ubuntu:22.04",
    type: "vcpu-2_memory-4g",
    sshKeyIds: ["my-ssh-key-id"],
});
const exampleInstanceStatus = new genesiscloud.InstanceStatus("exampleInstanceStatus", {
    instanceId: exampleInstance.id,
    status: "active",
});
Copy
import pulumi
import pulumi_genesiscloud as genesiscloud

example_instance = genesiscloud.Instance("exampleInstance",
    region="NORD-NO-KRS-1",
    image="ubuntu:22.04",
    type="vcpu-2_memory-4g",
    ssh_key_ids=["my-ssh-key-id"])
example_instance_status = genesiscloud.InstanceStatus("exampleInstanceStatus",
    instance_id=example_instance.id,
    status="active")
Copy
package main

import (
	"github.com/genesiscloud/pulumi-genesiscloud/sdk/go/genesiscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleInstance, err := genesiscloud.NewInstance(ctx, "exampleInstance", &genesiscloud.InstanceArgs{
			Region: pulumi.String("NORD-NO-KRS-1"),
			Image:  pulumi.String("ubuntu:22.04"),
			Type:   pulumi.String("vcpu-2_memory-4g"),
			SshKeyIds: pulumi.StringArray{
				pulumi.String("my-ssh-key-id"),
			},
		})
		if err != nil {
			return err
		}
		_, err = genesiscloud.NewInstanceStatus(ctx, "exampleInstanceStatus", &genesiscloud.InstanceStatusArgs{
			InstanceId: exampleInstance.ID(),
			Status:     pulumi.String("active"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Genesiscloud = GenesisCloud.PulumiPackage.Genesiscloud;

return await Deployment.RunAsync(() => 
{
    var exampleInstance = new Genesiscloud.Instance("exampleInstance", new()
    {
        Region = "NORD-NO-KRS-1",
        Image = "ubuntu:22.04",
        Type = "vcpu-2_memory-4g",
        SshKeyIds = new[]
        {
            "my-ssh-key-id",
        },
    });

    var exampleInstanceStatus = new Genesiscloud.InstanceStatus("exampleInstanceStatus", new()
    {
        InstanceId = exampleInstance.Id,
        Status = "active",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.genesiscloud.Instance;
import com.pulumi.genesiscloud.InstanceArgs;
import com.pulumi.genesiscloud.InstanceStatus;
import com.pulumi.genesiscloud.InstanceStatusArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
            .region("NORD-NO-KRS-1")
            .image("ubuntu:22.04")
            .type("vcpu-2_memory-4g")
            .sshKeyIds("my-ssh-key-id")
            .build());

        var exampleInstanceStatus = new InstanceStatus("exampleInstanceStatus", InstanceStatusArgs.builder()
            .instanceId(exampleInstance.id())
            .status("active")
            .build());

    }
}
Copy
resources:
  exampleInstance:
    type: genesiscloud:Instance
    properties:
      region: NORD-NO-KRS-1
      image: ubuntu:22.04
      type: vcpu-2_memory-4g
      sshKeyIds:
        - my-ssh-key-id
  exampleInstanceStatus:
    type: genesiscloud:InstanceStatus
    properties:
      instanceId: ${exampleInstance.id}
      status: active
Copy

Create InstanceStatus Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new InstanceStatus(name: string, args: InstanceStatusArgs, opts?: CustomResourceOptions);
@overload
def InstanceStatus(resource_name: str,
                   args: InstanceStatusArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def InstanceStatus(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   instance_id: Optional[str] = None,
                   status: Optional[str] = None,
                   timeouts: Optional[InstanceStatusTimeoutsArgs] = None)
func NewInstanceStatus(ctx *Context, name string, args InstanceStatusArgs, opts ...ResourceOption) (*InstanceStatus, error)
public InstanceStatus(string name, InstanceStatusArgs args, CustomResourceOptions? opts = null)
public InstanceStatus(String name, InstanceStatusArgs args)
public InstanceStatus(String name, InstanceStatusArgs args, CustomResourceOptions options)
type: genesiscloud:InstanceStatus
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InstanceStatusArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InstanceStatusArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceStatusArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceStatusArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InstanceStatusArgs
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 instanceStatusResource = new Genesiscloud.InstanceStatus("instanceStatusResource", new()
{
    InstanceId = "string",
    Status = "string",
    Timeouts = new Genesiscloud.Inputs.InstanceStatusTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
Copy
example, err := genesiscloud.NewInstanceStatus(ctx, "instanceStatusResource", &genesiscloud.InstanceStatusArgs{
	InstanceId: pulumi.String("string"),
	Status:     pulumi.String("string"),
	Timeouts: &genesiscloud.InstanceStatusTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Read:   pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var instanceStatusResource = new InstanceStatus("instanceStatusResource", InstanceStatusArgs.builder()
    .instanceId("string")
    .status("string")
    .timeouts(InstanceStatusTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
Copy
instance_status_resource = genesiscloud.InstanceStatus("instanceStatusResource",
    instance_id="string",
    status="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
Copy
const instanceStatusResource = new genesiscloud.InstanceStatus("instanceStatusResource", {
    instanceId: "string",
    status: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
Copy
type: genesiscloud:InstanceStatus
properties:
    instanceId: string
    status: string
    timeouts:
        create: string
        delete: string
        read: string
        update: string
Copy

InstanceStatus 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 InstanceStatus resource accepts the following input properties:

InstanceId This property is required. string
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
Status This property is required. string
The target instance status. - The value must be one of: ["active" "stopped"].
Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.InstanceStatusTimeouts
InstanceId This property is required. string
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
Status This property is required. string
The target instance status. - The value must be one of: ["active" "stopped"].
Timeouts InstanceStatusTimeoutsArgs
instanceId This property is required. String
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status This property is required. String
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts InstanceStatusTimeouts
instanceId This property is required. string
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status This property is required. string
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts InstanceStatusTimeouts
instance_id This property is required. str
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status This property is required. str
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts InstanceStatusTimeoutsArgs
instanceId This property is required. String
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status This property is required. String
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the InstanceStatus resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing InstanceStatus Resource

Get an existing InstanceStatus 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?: InstanceStatusState, opts?: CustomResourceOptions): InstanceStatus
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        instance_id: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[InstanceStatusTimeoutsArgs] = None) -> InstanceStatus
func GetInstanceStatus(ctx *Context, name string, id IDInput, state *InstanceStatusState, opts ...ResourceOption) (*InstanceStatus, error)
public static InstanceStatus Get(string name, Input<string> id, InstanceStatusState? state, CustomResourceOptions? opts = null)
public static InstanceStatus get(String name, Output<String> id, InstanceStatusState state, CustomResourceOptions options)
resources:  _:    type: genesiscloud:InstanceStatus    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
InstanceId string
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
Status string
The target instance status. - The value must be one of: ["active" "stopped"].
Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.InstanceStatusTimeouts
InstanceId string
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
Status string
The target instance status. - The value must be one of: ["active" "stopped"].
Timeouts InstanceStatusTimeoutsArgs
instanceId String
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status String
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts InstanceStatusTimeouts
instanceId string
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status string
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts InstanceStatusTimeouts
instance_id str
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status str
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts InstanceStatusTimeoutsArgs
instanceId String
The id of the instance this refers to. - If the value of this attribute changes, the resource will be replaced.
status String
The target instance status. - The value must be one of: ["active" "stopped"].
timeouts Property Map

Supporting Types

InstanceStatusTimeouts
, InstanceStatusTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

$ pulumi import genesiscloud:index/instanceStatus:InstanceStatus example 18efeec8-94f0-4776-8ff2-5e9b49c74608
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
genesiscloud genesiscloud/pulumi-genesiscloud
License
Apache-2.0
Notes
This Pulumi package is based on the genesiscloud Terraform Provider.