1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. fis
  6. SafetyLeverState
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi

    Manages the state of the AWS FIS (Fault Injection Simulator) safety lever for the account and Region. The safety lever is a single, account/Region-wide emergency stop: engaging it immediately stops all running experiments and blocks new ones from starting.

    There is exactly one safety lever per account and Region, and it always exists — AWS does not provide APIs to create or delete it. Because of this, deleting this resource only removes it from Terraform state; it does not change the live value in AWS, so it never risks silently disengaging a safety control.

    Note: AWS rejects a reason change unless status is also actually transitioning (for example, engaged to disengaged). Creating or updating this resource with a status that already matches the live safety lever succeeds only if the configured reason also matches the live reason; otherwise it fails at apply time. Pair a reason change with an actual status change.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.fis.SafetyLeverState("example", {state: {
        status: "disengaged",
        reason: "Managed by Pulumi",
    }});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.fis.SafetyLeverState("example", state={
        "status": "disengaged",
        "reason": "Managed by Pulumi",
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/fis"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := fis.NewSafetyLeverState(ctx, "example", &fis.SafetyLeverStateArgs{
    			State: &fis.SafetyLeverStateStateTypeArgs{
    				Status: pulumi.String("disengaged"),
    				Reason: pulumi.String("Managed by Pulumi"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Fis.SafetyLeverState("example", new()
        {
            State = new Aws.Fis.Inputs.SafetyLeverStateStateArgs
            {
                Status = "disengaged",
                Reason = "Managed by Pulumi",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.fis.SafetyLeverState;
    import com.pulumi.aws.fis.SafetyLeverStateArgs;
    import com.pulumi.aws.fis.inputs.SafetyLeverStateStateArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new SafetyLeverState("example", SafetyLeverStateArgs.builder()
                .state(SafetyLeverStateStateArgs.builder()
                    .status("disengaged")
                    .reason("Managed by Pulumi")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:fis:SafetyLeverState
        properties:
          state:
            status: disengaged
            reason: Managed by Pulumi
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_fis_safetyleverstate" "example" {
      state = {
        status = "disengaged"
        reason = "Managed by Pulumi"
      }
    }
    

    Create SafetyLeverState Resource

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

    Constructor syntax

    new SafetyLeverState(name: string, args?: SafetyLeverStateArgs, opts?: CustomResourceOptions);
    @overload
    def SafetyLeverState(resource_name: str,
                         args: Optional[SafetyLeverStateArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def SafetyLeverState(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         region: Optional[str] = None,
                         state: Optional[SafetyLeverStateStateArgs] = None,
                         timeouts: Optional[SafetyLeverStateTimeoutsArgs] = None)
    func NewSafetyLeverState(ctx *Context, name string, args *SafetyLeverStateArgs, opts ...ResourceOption) (*SafetyLeverState, error)
    public SafetyLeverState(string name, SafetyLeverStateArgs? args = null, CustomResourceOptions? opts = null)
    public SafetyLeverState(String name, SafetyLeverStateArgs args)
    public SafetyLeverState(String name, SafetyLeverStateArgs args, CustomResourceOptions options)
    
    type: aws:fis:SafetyLeverState
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_fis_safety_lever_state" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SafetyLeverStateArgs
    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 SafetyLeverStateArgs
    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 SafetyLeverStateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SafetyLeverStateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SafetyLeverStateArgs
    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 safetyLeverStateResource = new Aws.Fis.SafetyLeverState("safetyLeverStateResource", new()
    {
        Region = "string",
        State = new Aws.Fis.Inputs.SafetyLeverStateStateArgs
        {
            Reason = "string",
            Status = "string",
        },
        Timeouts = new Aws.Fis.Inputs.SafetyLeverStateTimeoutsArgs
        {
            Create = "string",
            Update = "string",
        },
    });
    
    example, err := fis.NewSafetyLeverState(ctx, "safetyLeverStateResource", &fis.SafetyLeverStateArgs{
    	Region: pulumi.String("string"),
    	State: &fis.SafetyLeverStateStateTypeArgs{
    		Reason: pulumi.String("string"),
    		Status: pulumi.String("string"),
    	},
    	Timeouts: &fis.SafetyLeverStateTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "aws_fis_safety_lever_state" "safetyLeverStateResource" {
      lifecycle {
        create_before_destroy = true
      }
      region = "string"
      state = {
        reason = "string"
        status = "string"
      }
      timeouts = {
        create = "string"
        update = "string"
      }
    }
    
    var safetyLeverStateResource = new SafetyLeverState("safetyLeverStateResource", SafetyLeverStateArgs.builder()
        .region("string")
        .state(SafetyLeverStateStateArgs.builder()
            .reason("string")
            .status("string")
            .build())
        .timeouts(SafetyLeverStateTimeoutsArgs.builder()
            .create("string")
            .update("string")
            .build())
        .build());
    
    safety_lever_state_resource = aws.fis.SafetyLeverState("safetyLeverStateResource",
        region="string",
        state={
            "reason": "string",
            "status": "string",
        },
        timeouts={
            "create": "string",
            "update": "string",
        })
    
    const safetyLeverStateResource = new aws.fis.SafetyLeverState("safetyLeverStateResource", {
        region: "string",
        state: {
            reason: "string",
            status: "string",
        },
        timeouts: {
            create: "string",
            update: "string",
        },
    });
    
    type: aws:fis:SafetyLeverState
    properties:
        region: string
        state:
            reason: string
            status: string
        timeouts:
            create: string
            update: string
    

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

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    State SafetyLeverStateState

    State of the safety lever. See below.

    The following arguments are optional:

    Timeouts SafetyLeverStateTimeouts
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    State SafetyLeverStateStateTypeArgs

    State of the safety lever. See below.

    The following arguments are optional:

    Timeouts SafetyLeverStateTimeoutsArgs
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state object

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts object
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state SafetyLeverStateState

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts SafetyLeverStateTimeouts
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state SafetyLeverStateState

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts SafetyLeverStateTimeouts
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state SafetyLeverStateStateArgs

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts SafetyLeverStateTimeoutsArgs
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state Property Map

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts Property Map

    Outputs

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

    Arn string
    ARN of the safety lever.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    ARN of the safety lever.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn string
    ARN of the safety lever.
    id string
    The provider-assigned unique ID for this managed resource.
    arn String
    ARN of the safety lever.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    ARN of the safety lever.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    ARN of the safety lever.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    ARN of the safety lever.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SafetyLeverState Resource

    Get an existing SafetyLeverState 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?: SafetyLeverStateState, opts?: CustomResourceOptions): SafetyLeverState
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            region: Optional[str] = None,
            state: Optional[SafetyLeverStateStateArgs] = None,
            timeouts: Optional[SafetyLeverStateTimeoutsArgs] = None) -> SafetyLeverState
    func GetSafetyLeverState(ctx *Context, name string, id IDInput, state *SafetyLeverStateState, opts ...ResourceOption) (*SafetyLeverState, error)
    public static SafetyLeverState Get(string name, Input<string> id, SafetyLeverStateState? state, CustomResourceOptions? opts = null)
    public static SafetyLeverState get(String name, Output<String> id, SafetyLeverStateState state, CustomResourceOptions options)
    resources:  _:    type: aws:fis:SafetyLeverState    get:      id: ${id}
    import {
      to = aws_fis_safety_lever_state.example
      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:
    Arn string
    ARN of the safety lever.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    State SafetyLeverStateState

    State of the safety lever. See below.

    The following arguments are optional:

    Timeouts SafetyLeverStateTimeouts
    Arn string
    ARN of the safety lever.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    State SafetyLeverStateStateTypeArgs

    State of the safety lever. See below.

    The following arguments are optional:

    Timeouts SafetyLeverStateTimeoutsArgs
    arn string
    ARN of the safety lever.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state object

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts object
    arn String
    ARN of the safety lever.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state SafetyLeverStateState

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts SafetyLeverStateTimeouts
    arn string
    ARN of the safety lever.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state SafetyLeverStateState

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts SafetyLeverStateTimeouts
    arn str
    ARN of the safety lever.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state SafetyLeverStateStateArgs

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts SafetyLeverStateTimeoutsArgs
    arn String
    ARN of the safety lever.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state Property Map

    State of the safety lever. See below.

    The following arguments are optional:

    timeouts Property Map

    Supporting Types

    SafetyLeverStateState, SafetyLeverStateStateArgs

    Reason string
    Reason for the current status of the safety lever.
    Status string
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.
    Reason string
    Reason for the current status of the safety lever.
    Status string
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.
    reason string
    Reason for the current status of the safety lever.
    status string
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.
    reason String
    Reason for the current status of the safety lever.
    status String
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.
    reason string
    Reason for the current status of the safety lever.
    status string
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.
    reason str
    Reason for the current status of the safety lever.
    status str
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.
    reason String
    Reason for the current status of the safety lever.
    status String
    Status of the safety lever. Valid values: engaged, disengaged. Engaging the lever immediately stops all running experiments in the account and Region, and prevents new ones from starting.

    SafetyLeverStateTimeouts, SafetyLeverStateTimeoutsArgs

    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).
    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).
    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).
    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).
    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).
    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).
    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).
    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

    Identity Schema

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

    Using pulumi import, import the FIS safety lever state using the Region. For example:

    $ pulumi import aws:fis/safetyLeverState:SafetyLeverState example us-west-2
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo aws logo
    Viewing docs for AWS v7.46.0
    published on Thursday, Sep 10, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial