Spotinst v3.94.0 published on Friday, Sep 20, 2024 by Pulumi
spotinst.aws.Suspension
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";
// Create a suspension for Elastigroup
const resourceName = new spotinst.aws.Suspension("resource_name", {
groupId: "sig-12345678",
suspensions: [
{
name: "OUT_OF_STRATEGY",
},
{
name: "REVERT_PREFERRED",
},
{
name: "PREVENTIVE_REPLACEMENT",
},
],
});
import pulumi
import pulumi_spotinst as spotinst
# Create a suspension for Elastigroup
resource_name = spotinst.aws.Suspension("resource_name",
group_id="sig-12345678",
suspensions=[
{
"name": "OUT_OF_STRATEGY",
},
{
"name": "REVERT_PREFERRED",
},
{
"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 {
// Create a suspension for Elastigroup
_, err := aws.NewSuspension(ctx, "resource_name", &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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SpotInst = Pulumi.SpotInst;
return await Deployment.RunAsync(() =>
{
// Create a suspension for Elastigroup
var resourceName = new SpotInst.Aws.Suspension("resource_name", 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 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) {
// Create a suspension for Elastigroup
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());
}
}
resources:
# Create a suspension for Elastigroup
resourceName:
type: spotinst:aws:Suspension
name: resource_name
properties:
groupId: sig-12345678
suspensions:
- name: OUT_OF_STRATEGY
- name: REVERT_PREFERRED
- name: PREVENTIVE_REPLACEMENT
Create Suspension Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Suspension(name: string, args: SuspensionArgs, opts?: CustomResourceOptions);
@overload
def Suspension(resource_name: str,
args: SuspensionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Suspension(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
suspensions: Optional[Sequence[SuspensionSuspensionArgs]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var suspensionResource = new SpotInst.Aws.Suspension("suspensionResource", new()
{
GroupId = "string",
Suspensions = new[]
{
new SpotInst.Aws.Inputs.SuspensionSuspensionArgs
{
Name = "string",
},
},
});
example, err := aws.NewSuspension(ctx, "suspensionResource", &aws.SuspensionArgs{
GroupId: pulumi.String("string"),
Suspensions: aws.SuspensionSuspensionArray{
&aws.SuspensionSuspensionArgs{
Name: pulumi.String("string"),
},
},
})
var suspensionResource = new Suspension("suspensionResource", SuspensionArgs.builder()
.groupId("string")
.suspensions(SuspensionSuspensionArgs.builder()
.name("string")
.build())
.build());
suspension_resource = spotinst.aws.Suspension("suspensionResource",
group_id="string",
suspensions=[spotinst.aws.SuspensionSuspensionArgs(
name="string",
)])
const suspensionResource = new spotinst.aws.Suspension("suspensionResource", {
groupId: "string",
suspensions: [{
name: "string",
}],
});
type: spotinst:aws:Suspension
properties:
groupId: string
suspensions:
- name: string
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:
- Group
Id string - Elastigroup ID to apply the suspensions on.
- Suspensions
List<Pulumi.
Spot Inst. Aws. Inputs. Suspension Suspension> - block of single process to suspend.
- Group
Id string - Elastigroup ID to apply the suspensions on.
- Suspensions
[]Suspension
Suspension Args - block of single process to suspend.
- group
Id String - Elastigroup ID to apply the suspensions on.
- suspensions
List<Suspension
Suspension> - block of single process to suspend.
- group
Id string - Elastigroup ID to apply the suspensions on.
- suspensions
Suspension
Suspension[] - block of single process to suspend.
- group_
id str - Elastigroup ID to apply the suspensions on.
- suspensions
Sequence[Suspension
Suspension Args] - block of single process to suspend.
- group
Id 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.
- Group
Id string - Elastigroup ID to apply the suspensions on.
- Suspensions
List<Pulumi.
Spot Inst. Aws. Inputs. Suspension Suspension> - block of single process to suspend.
- Group
Id string - Elastigroup ID to apply the suspensions on.
- Suspensions
[]Suspension
Suspension Args - block of single process to suspend.
- group
Id String - Elastigroup ID to apply the suspensions on.
- suspensions
List<Suspension
Suspension> - block of single process to suspend.
- group
Id string - Elastigroup ID to apply the suspensions on.
- suspensions
Suspension
Suspension[] - block of single process to suspend.
- group_
id str - Elastigroup ID to apply the suspensions on.
- suspensions
Sequence[Suspension
Suspension Args] - block of single process to suspend.
- group
Id String - Elastigroup ID to apply the suspensions on.
- suspensions List<Property Map>
- block of single process to suspend.
Supporting Types
SuspensionSuspension, SuspensionSuspensionArgs
- 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.