spotinst logo
Spotinst v3.24.0, Feb 3 23

spotinst.aws.Suspension

Example Usage

using System.Collections.Generic;
using Pulumi;
using SpotInst = Pulumi.SpotInst;

return await Deployment.RunAsync(() => 
{
    // Create a suspension for Elastigroup
    var resourceName = new SpotInst.Aws.Suspension("resourceName", new()
    {
        GroupId = "sig-12345678",
        Suspensions = new[]
        {
            new SpotInst.Aws.Inputs.SuspensionSuspensionArgs
            {
                Name = "OUT_OF_STRATEGY",
            },
            new SpotInst.Aws.Inputs.SuspensionSuspensionArgs
            {
                Name = "REVERT_PREFERRED",
            },
            new SpotInst.Aws.Inputs.SuspensionSuspensionArgs
            {
                Name = "PREVENTIVE_REPLACEMENT",
            },
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aws.NewSuspension(ctx, "resourceName", &aws.SuspensionArgs{
			GroupId: pulumi.String("sig-12345678"),
			Suspensions: aws.SuspensionSuspensionArray{
				&aws.SuspensionSuspensionArgs{
					Name: pulumi.String("OUT_OF_STRATEGY"),
				},
				&aws.SuspensionSuspensionArgs{
					Name: pulumi.String("REVERT_PREFERRED"),
				},
				&aws.SuspensionSuspensionArgs{
					Name: pulumi.String("PREVENTIVE_REPLACEMENT"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spotinst.aws.Suspension;
import com.pulumi.spotinst.aws.SuspensionArgs;
import com.pulumi.spotinst.aws.inputs.SuspensionSuspensionArgs;
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 resourceName = new Suspension("resourceName", SuspensionArgs.builder()        
            .groupId("sig-12345678")
            .suspensions(            
                SuspensionSuspensionArgs.builder()
                    .name("OUT_OF_STRATEGY")
                    .build(),
                SuspensionSuspensionArgs.builder()
                    .name("REVERT_PREFERRED")
                    .build(),
                SuspensionSuspensionArgs.builder()
                    .name("PREVENTIVE_REPLACEMENT")
                    .build())
            .build());

    }
}
import pulumi
import pulumi_spotinst as spotinst

# Create a suspension for Elastigroup
resource_name = spotinst.aws.Suspension("resourceName",
    group_id="sig-12345678",
    suspensions=[
        spotinst.aws.SuspensionSuspensionArgs(
            name="OUT_OF_STRATEGY",
        ),
        spotinst.aws.SuspensionSuspensionArgs(
            name="REVERT_PREFERRED",
        ),
        spotinst.aws.SuspensionSuspensionArgs(
            name="PREVENTIVE_REPLACEMENT",
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";

// Create a suspension for Elastigroup
const resourceName = new spotinst.aws.Suspension("resourceName", {
    groupId: "sig-12345678",
    suspensions: [
        {
            name: "OUT_OF_STRATEGY",
        },
        {
            name: "REVERT_PREFERRED",
        },
        {
            name: "PREVENTIVE_REPLACEMENT",
        },
    ],
});
resources:
  # Create a suspension for Elastigroup
  resourceName:
    type: spotinst:aws:Suspension
    properties:
      groupId: sig-12345678
      suspensions:
        - name: OUT_OF_STRATEGY
        - name: REVERT_PREFERRED
        - name: PREVENTIVE_REPLACEMENT

Create Suspension Resource

new Suspension(name: string, args: SuspensionArgs, opts?: CustomResourceOptions);
@overload
def Suspension(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               group_id: Optional[str] = None,
               suspensions: Optional[Sequence[SuspensionSuspensionArgs]] = None)
@overload
def Suspension(resource_name: str,
               args: SuspensionArgs,
               opts: Optional[ResourceOptions] = None)
func NewSuspension(ctx *Context, name string, args SuspensionArgs, opts ...ResourceOption) (*Suspension, error)
public Suspension(string name, SuspensionArgs args, CustomResourceOptions? opts = null)
public Suspension(String name, SuspensionArgs args)
public Suspension(String name, SuspensionArgs args, CustomResourceOptions options)
type: spotinst:aws:Suspension
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SuspensionArgs
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 SuspensionArgs
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 SuspensionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SuspensionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SuspensionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Suspension Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Suspension resource accepts the following input properties:

GroupId string

Elastigroup ID to apply the suspensions on.

Suspensions List<Pulumi.SpotInst.Aws.Inputs.SuspensionSuspensionArgs>

block of single process to suspend.

GroupId string

Elastigroup ID to apply the suspensions on.

Suspensions []SuspensionSuspensionArgs

block of single process to suspend.

groupId String

Elastigroup ID to apply the suspensions on.

suspensions List<SuspensionSuspensionArgs>

block of single process to suspend.

groupId string

Elastigroup ID to apply the suspensions on.

suspensions SuspensionSuspensionArgs[]

block of single process to suspend.

group_id str

Elastigroup ID to apply the suspensions on.

suspensions Sequence[SuspensionSuspensionArgs]

block of single process to suspend.

groupId String

Elastigroup ID to apply the suspensions on.

suspensions List<Property Map>

block of single process to suspend.

Outputs

All input properties are implicitly available as output properties. Additionally, the Suspension 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 Suspension Resource

Get an existing Suspension 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?: SuspensionState, opts?: CustomResourceOptions): Suspension
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        group_id: Optional[str] = None,
        suspensions: Optional[Sequence[SuspensionSuspensionArgs]] = None) -> Suspension
func GetSuspension(ctx *Context, name string, id IDInput, state *SuspensionState, opts ...ResourceOption) (*Suspension, error)
public static Suspension Get(string name, Input<string> id, SuspensionState? state, CustomResourceOptions? opts = null)
public static Suspension get(String name, Output<String> id, SuspensionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
GroupId string

Elastigroup ID to apply the suspensions on.

Suspensions List<Pulumi.SpotInst.Aws.Inputs.SuspensionSuspensionArgs>

block of single process to suspend.

GroupId string

Elastigroup ID to apply the suspensions on.

Suspensions []SuspensionSuspensionArgs

block of single process to suspend.

groupId String

Elastigroup ID to apply the suspensions on.

suspensions List<SuspensionSuspensionArgs>

block of single process to suspend.

groupId string

Elastigroup ID to apply the suspensions on.

suspensions SuspensionSuspensionArgs[]

block of single process to suspend.

group_id str

Elastigroup ID to apply the suspensions on.

suspensions Sequence[SuspensionSuspensionArgs]

block of single process to suspend.

groupId String

Elastigroup ID to apply the suspensions on.

suspensions List<Property Map>

block of single process to suspend.

Supporting Types

SuspensionSuspension

Name string

The name of process to suspend. Valid values: "AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING".

Name string

The name of process to suspend. Valid values: "AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING".

name String

The name of process to suspend. Valid values: "AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING".

name string

The name of process to suspend. Valid values: "AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING".

name str

The name of process to suspend. Valid values: "AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING".

name String

The name of process to suspend. Valid values: "AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING".

Package Details

Repository
Spotinst pulumi/pulumi-spotinst
License
Apache-2.0
Notes

This Pulumi package is based on the spotinst Terraform Provider.