Package com.pulumi.aws.fis
Class SafetyLeverState
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.fis.SafetyLeverState
-
public class SafetyLeverState extends com.pulumi.resources.CustomResourceManages 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 ### 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: ```sh $ pulumi import aws:fis/safetyLeverState:SafetyLeverState example us-west-2 ```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()); } }
-
-
Constructor Summary
Constructors Constructor Description SafetyLeverState(java.lang.String name)SafetyLeverState(java.lang.String name, SafetyLeverStateArgs args)SafetyLeverState(java.lang.String name, SafetyLeverStateArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()static SafetyLeverStateget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SafetyLeverStateState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<SafetyLeverStateState>>state()com.pulumi.core.Output<java.util.Optional<SafetyLeverStateTimeouts>>timeouts()
-
-
-
Constructor Detail
-
SafetyLeverState
public SafetyLeverState(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
SafetyLeverState
public SafetyLeverState(java.lang.String name, @Nullable SafetyLeverStateArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
SafetyLeverState
public SafetyLeverState(java.lang.String name, @Nullable SafetyLeverStateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the safety lever.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
state
public com.pulumi.core.Output<java.util.Optional<SafetyLeverStateState>> state()
- Returns:
- State of the safety lever. See below. The following arguments are optional:
-
timeouts
public com.pulumi.core.Output<java.util.Optional<SafetyLeverStateTimeouts>> timeouts()
-
get
public static SafetyLeverState get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SafetyLeverStateState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-