SafetyRule class

Provides an AWS Route 53 Recovery Control Config Safety Rule

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.route53recoverycontrol.SafetyRule("example", {
    ruleConfig: {
        inverted: false,
        threshold: 1,
        type: "ATLEAST",
    },
    assertedControls: [exampleAwsRoute53recoverycontrolconfigRoutingControl.arn],
    controlPanelArn: "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
    name: "daisyguttridge",
    waitPeriodMs: 5000,
});
import pulumi
import pulumi_aws as aws

example = aws.route53recoverycontrol.SafetyRule("example",
    rule_config={
        "inverted": False,
        "threshold": 1,
        "type": "ATLEAST",
    },
    asserted_controls=[example_aws_route53recoverycontrolconfig_routing_control["arn"]],
    control_panel_arn="arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
    name="daisyguttridge",
    wait_period_ms=5000)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Route53RecoveryControl.SafetyRule("example", new()
    {
        RuleConfig = new Aws.Route53RecoveryControl.Inputs.SafetyRuleRuleConfigArgs
        {
            Inverted = false,
            Threshold = 1,
            Type = "ATLEAST",
        },
        AssertedControls = new[]
        {
            exampleAwsRoute53recoverycontrolconfigRoutingControl.Arn,
        },
        ControlPanelArn = "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
        Name = "daisyguttridge",
        WaitPeriodMs = 5000,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := route53recoverycontrol.NewSafetyRule(ctx, "example", &route53recoverycontrol.SafetyRuleArgs{
			RuleConfig: &route53recoverycontrol.SafetyRuleRuleConfigArgs{
				Inverted:  pulumi.Bool(false),
				Threshold: pulumi.Int(1),
				Type:      pulumi.String("ATLEAST"),
			},
			AssertedControls: pulumi.StringArray{
				exampleAwsRoute53recoverycontrolconfigRoutingControl.Arn,
			},
			ControlPanelArn: pulumi.String("arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8"),
			Name:            pulumi.String("daisyguttridge"),
			WaitPeriodMs:    pulumi.Int(5000),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_route53recoverycontrol_safetyrule" "example" {
  rule_config = {
    inverted  = false
    threshold = 1
    type      = "ATLEAST"
  }
  asserted_controls = [exampleAwsRoute53recoverycontrolconfigRoutingControl.arn]
  control_panel_arn = "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8"
  name              = "daisyguttridge"
  wait_period_ms    = 5000
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53recoverycontrol.SafetyRule;
import com.pulumi.aws.route53recoverycontrol.SafetyRuleArgs;
import com.pulumi.aws.route53recoverycontrol.inputs.SafetyRuleRuleConfigArgs;
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 SafetyRule("example", SafetyRuleArgs.builder()
            .ruleConfig(SafetyRuleRuleConfigArgs.builder()
                .inverted(false)
                .threshold(1)
                .type("ATLEAST")
                .build())
            .assertedControls(exampleAwsRoute53recoverycontrolconfigRoutingControl.arn())
            .controlPanelArn("arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8")
            .name("daisyguttridge")
            .waitPeriodMs(5000)
            .build());

    }
}
resources:
  example:
    type: aws:route53recoverycontrol:SafetyRule
    properties:
      ruleConfig:
        inverted: false
        threshold: 1
        type: ATLEAST
      assertedControls:
        - ${exampleAwsRoute53recoverycontrolconfigRoutingControl.arn}
      controlPanelArn: arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8
      name: daisyguttridge
      waitPeriodMs: 5000
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.route53recoverycontrol.SafetyRule("example", {
    ruleConfig: {
        inverted: false,
        threshold: 1,
        type: "ATLEAST",
    },
    name: "i_o",
    controlPanelArn: "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
    waitPeriodMs: 5000,
    gatingControls: [exampleAwsRoute53recoverycontrolconfigRoutingControl.arn],
    targetControls: [exampleAwsRoute53recoverycontrolconfigRoutingControl.arn],
});
import pulumi
import pulumi_aws as aws

example = aws.route53recoverycontrol.SafetyRule("example",
    rule_config={
        "inverted": False,
        "threshold": 1,
        "type": "ATLEAST",
    },
    name="i_o",
    control_panel_arn="arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
    wait_period_ms=5000,
    gating_controls=[example_aws_route53recoverycontrolconfig_routing_control["arn"]],
    target_controls=[example_aws_route53recoverycontrolconfig_routing_control["arn"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Route53RecoveryControl.SafetyRule("example", new()
    {
        RuleConfig = new Aws.Route53RecoveryControl.Inputs.SafetyRuleRuleConfigArgs
        {
            Inverted = false,
            Threshold = 1,
            Type = "ATLEAST",
        },
        Name = "i_o",
        ControlPanelArn = "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
        WaitPeriodMs = 5000,
        GatingControls = new[]
        {
            exampleAwsRoute53recoverycontrolconfigRoutingControl.Arn,
        },
        TargetControls = new[]
        {
            exampleAwsRoute53recoverycontrolconfigRoutingControl.Arn,
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := route53recoverycontrol.NewSafetyRule(ctx, "example", &route53recoverycontrol.SafetyRuleArgs{
			RuleConfig: &route53recoverycontrol.SafetyRuleRuleConfigArgs{
				Inverted:  pulumi.Bool(false),
				Threshold: pulumi.Int(1),
				Type:      pulumi.String("ATLEAST"),
			},
			Name:            pulumi.String("i_o"),
			ControlPanelArn: pulumi.String("arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8"),
			WaitPeriodMs:    pulumi.Int(5000),
			GatingControls: pulumi.StringArray{
				exampleAwsRoute53recoverycontrolconfigRoutingControl.Arn,
			},
			TargetControls: pulumi.StringArray{
				exampleAwsRoute53recoverycontrolconfigRoutingControl.Arn,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_route53recoverycontrol_safetyrule" "example" {
  rule_config = {
    inverted  = false
    threshold = 1
    type      = "ATLEAST"
  }
  name              = "i_o"
  control_panel_arn = "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8"
  wait_period_ms    = 5000
  gating_controls   = [exampleAwsRoute53recoverycontrolconfigRoutingControl.arn]
  target_controls   = [exampleAwsRoute53recoverycontrolconfigRoutingControl.arn]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53recoverycontrol.SafetyRule;
import com.pulumi.aws.route53recoverycontrol.SafetyRuleArgs;
import com.pulumi.aws.route53recoverycontrol.inputs.SafetyRuleRuleConfigArgs;
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 SafetyRule("example", SafetyRuleArgs.builder()
            .ruleConfig(SafetyRuleRuleConfigArgs.builder()
                .inverted(false)
                .threshold(1)
                .type("ATLEAST")
                .build())
            .name("i_o")
            .controlPanelArn("arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8")
            .waitPeriodMs(5000)
            .gatingControls(exampleAwsRoute53recoverycontrolconfigRoutingControl.arn())
            .targetControls(exampleAwsRoute53recoverycontrolconfigRoutingControl.arn())
            .build());

    }
}
resources:
  example:
    type: aws:route53recoverycontrol:SafetyRule
    properties:
      ruleConfig:
        inverted: false
        threshold: 1
        type: ATLEAST
      name: i_o
      controlPanelArn: arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8
      waitPeriodMs: 5000
      gatingControls:
        - ${exampleAwsRoute53recoverycontrolconfigRoutingControl.arn}
      targetControls:
        - ${exampleAwsRoute53recoverycontrolconfigRoutingControl.arn}

Import

Using pulumi import, import Route53 Recovery Control Config Safety Rule using the safety rule ARN. For example:

$ pulumi import aws:route53recoverycontrol/safetyRule:SafetyRule myrule arn:aws:route53-recovery-control::313517334327:controlpanel/1bfba17df8684f5dab0467b71424f7e8/safetyrule/3bacc77003364c0f

Constructors

SafetyRule(String name, {SafetyRuleArgs? args, CustomResourceOptions? options})
Creates a new SafetyRule. name The Pulumi resource name. args Arguments used to configure this SafetyRule. The set of arguments for SafetyRule. options Resource options controlling this resource's behavior.
SafetyRule.reference(String urn)
Creates a typed reference to an existing SafetyRule resource.

Properties

arn ↔ Output<String>
ARN of the safety rule.
latefinal
assertedControls ↔ Output<List<String>?>
Routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
controlPanelArn ↔ Output<String>
ARN of the control panel in which this safety rule will reside.
latefinal
gatingControls ↔ Output<List<String>?>
Gating controls for the new gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
Name describing the safety rule.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
ruleConfig ↔ Output<SafetyRuleRuleConfig>
Configuration block for safety rule criteria. See below.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status ↔ Output<String>
Status of the safety rule. PENDING when it is being created/updated, PENDING_DELETION when it is being deleted, and DEPLOYED otherwise.
latefinal
tags ↔ Output<Map<String, String>?>
A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
targetControls ↔ Output<List<String>?>
Routing controls that can only be set or unset if the specified ruleConfig evaluates to true for the specified gatingControls.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
waitPeriodMs ↔ Output<int>
Evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {SafetyRuleState? state, CustomResourceOptions? options}) → SafetyRule
Gets an existing SafetyRule resource's state with the given name and id.