1. Packages
  2. AWS Classic
  3. API Docs
  4. redshift
  5. ScheduledAction

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.redshift.ScheduledAction

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Example Usage

    Pause Cluster Action

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const assumeRole = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            principals: [{
                type: "Service",
                identifiers: ["scheduler.redshift.amazonaws.com"],
            }],
            actions: ["sts:AssumeRole"],
        }],
    });
    const exampleRole = new aws.iam.Role("example", {
        name: "redshift_scheduled_action",
        assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json),
    });
    const example = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            actions: [
                "redshift:PauseCluster",
                "redshift:ResumeCluster",
                "redshift:ResizeCluster",
            ],
            resources: ["*"],
        }],
    });
    const examplePolicy = new aws.iam.Policy("example", {
        name: "redshift_scheduled_action",
        policy: example.then(example => example.json),
    });
    const exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment("example", {
        policyArn: examplePolicy.arn,
        role: exampleRole.name,
    });
    const exampleScheduledAction = new aws.redshift.ScheduledAction("example", {
        name: "tf-redshift-scheduled-action",
        schedule: "cron(00 23 * * ? *)",
        iamRole: exampleRole.arn,
        targetAction: {
            pauseCluster: {
                clusterIdentifier: "tf-redshift001",
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    assume_role = aws.iam.get_policy_document(statements=[{
        "effect": "Allow",
        "principals": [{
            "type": "Service",
            "identifiers": ["scheduler.redshift.amazonaws.com"],
        }],
        "actions": ["sts:AssumeRole"],
    }])
    example_role = aws.iam.Role("example",
        name="redshift_scheduled_action",
        assume_role_policy=assume_role.json)
    example = aws.iam.get_policy_document(statements=[{
        "effect": "Allow",
        "actions": [
            "redshift:PauseCluster",
            "redshift:ResumeCluster",
            "redshift:ResizeCluster",
        ],
        "resources": ["*"],
    }])
    example_policy = aws.iam.Policy("example",
        name="redshift_scheduled_action",
        policy=example.json)
    example_role_policy_attachment = aws.iam.RolePolicyAttachment("example",
        policy_arn=example_policy.arn,
        role=example_role.name)
    example_scheduled_action = aws.redshift.ScheduledAction("example",
        name="tf-redshift-scheduled-action",
        schedule="cron(00 23 * * ? *)",
        iam_role=example_role.arn,
        target_action={
            "pauseCluster": {
                "clusterIdentifier": "tf-redshift001",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Principals: []iam.GetPolicyDocumentStatementPrincipal{
    						{
    							Type: "Service",
    							Identifiers: []string{
    								"scheduler.redshift.amazonaws.com",
    							},
    						},
    					},
    					Actions: []string{
    						"sts:AssumeRole",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
    			Name:             pulumi.String("redshift_scheduled_action"),
    			AssumeRolePolicy: pulumi.String(assumeRole.Json),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Actions: []string{
    						"redshift:PauseCluster",
    						"redshift:ResumeCluster",
    						"redshift:ResizeCluster",
    					},
    					Resources: []string{
    						"*",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		examplePolicy, err := iam.NewPolicy(ctx, "example", &iam.PolicyArgs{
    			Name:   pulumi.String("redshift_scheduled_action"),
    			Policy: pulumi.String(example.Json),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewRolePolicyAttachment(ctx, "example", &iam.RolePolicyAttachmentArgs{
    			PolicyArn: examplePolicy.Arn,
    			Role:      exampleRole.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = redshift.NewScheduledAction(ctx, "example", &redshift.ScheduledActionArgs{
    			Name:     pulumi.String("tf-redshift-scheduled-action"),
    			Schedule: pulumi.String("cron(00 23 * * ? *)"),
    			IamRole:  exampleRole.Arn,
    			TargetAction: &redshift.ScheduledActionTargetActionArgs{
    				PauseCluster: &redshift.ScheduledActionTargetActionPauseClusterArgs{
    					ClusterIdentifier: pulumi.String("tf-redshift001"),
    				},
    			},
    		})
    		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 assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "scheduler.redshift.amazonaws.com",
                            },
                        },
                    },
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                },
            },
        });
    
        var exampleRole = new Aws.Iam.Role("example", new()
        {
            Name = "redshift_scheduled_action",
            AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var example = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Actions = new[]
                    {
                        "redshift:PauseCluster",
                        "redshift:ResumeCluster",
                        "redshift:ResizeCluster",
                    },
                    Resources = new[]
                    {
                        "*",
                    },
                },
            },
        });
    
        var examplePolicy = new Aws.Iam.Policy("example", new()
        {
            Name = "redshift_scheduled_action",
            PolicyDocument = example.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("example", new()
        {
            PolicyArn = examplePolicy.Arn,
            Role = exampleRole.Name,
        });
    
        var exampleScheduledAction = new Aws.RedShift.ScheduledAction("example", new()
        {
            Name = "tf-redshift-scheduled-action",
            Schedule = "cron(00 23 * * ? *)",
            IamRole = exampleRole.Arn,
            TargetAction = new Aws.RedShift.Inputs.ScheduledActionTargetActionArgs
            {
                PauseCluster = new Aws.RedShift.Inputs.ScheduledActionTargetActionPauseClusterArgs
                {
                    ClusterIdentifier = "tf-redshift001",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
    import com.pulumi.aws.iam.Role;
    import com.pulumi.aws.iam.RoleArgs;
    import com.pulumi.aws.iam.Policy;
    import com.pulumi.aws.iam.PolicyArgs;
    import com.pulumi.aws.iam.RolePolicyAttachment;
    import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
    import com.pulumi.aws.redshift.ScheduledAction;
    import com.pulumi.aws.redshift.ScheduledActionArgs;
    import com.pulumi.aws.redshift.inputs.ScheduledActionTargetActionArgs;
    import com.pulumi.aws.redshift.inputs.ScheduledActionTargetActionPauseClusterArgs;
    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) {
            final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("scheduler.redshift.amazonaws.com")
                        .build())
                    .actions("sts:AssumeRole")
                    .build())
                .build());
    
            var exampleRole = new Role("exampleRole", RoleArgs.builder()
                .name("redshift_scheduled_action")
                .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .actions(                
                        "redshift:PauseCluster",
                        "redshift:ResumeCluster",
                        "redshift:ResizeCluster")
                    .resources("*")
                    .build())
                .build());
    
            var examplePolicy = new Policy("examplePolicy", PolicyArgs.builder()
                .name("redshift_scheduled_action")
                .policy(example.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var exampleRolePolicyAttachment = new RolePolicyAttachment("exampleRolePolicyAttachment", RolePolicyAttachmentArgs.builder()
                .policyArn(examplePolicy.arn())
                .role(exampleRole.name())
                .build());
    
            var exampleScheduledAction = new ScheduledAction("exampleScheduledAction", ScheduledActionArgs.builder()
                .name("tf-redshift-scheduled-action")
                .schedule("cron(00 23 * * ? *)")
                .iamRole(exampleRole.arn())
                .targetAction(ScheduledActionTargetActionArgs.builder()
                    .pauseCluster(ScheduledActionTargetActionPauseClusterArgs.builder()
                        .clusterIdentifier("tf-redshift001")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleRole:
        type: aws:iam:Role
        name: example
        properties:
          name: redshift_scheduled_action
          assumeRolePolicy: ${assumeRole.json}
      examplePolicy:
        type: aws:iam:Policy
        name: example
        properties:
          name: redshift_scheduled_action
          policy: ${example.json}
      exampleRolePolicyAttachment:
        type: aws:iam:RolePolicyAttachment
        name: example
        properties:
          policyArn: ${examplePolicy.arn}
          role: ${exampleRole.name}
      exampleScheduledAction:
        type: aws:redshift:ScheduledAction
        name: example
        properties:
          name: tf-redshift-scheduled-action
          schedule: cron(00 23 * * ? *)
          iamRole: ${exampleRole.arn}
          targetAction:
            pauseCluster:
              clusterIdentifier: tf-redshift001
    variables:
      assumeRole:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                principals:
                  - type: Service
                    identifiers:
                      - scheduler.redshift.amazonaws.com
                actions:
                  - sts:AssumeRole
      example:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                actions:
                  - redshift:PauseCluster
                  - redshift:ResumeCluster
                  - redshift:ResizeCluster
                resources:
                  - '*'
    

    Resize Cluster Action

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshift.ScheduledAction("example", {
        name: "tf-redshift-scheduled-action",
        schedule: "cron(00 23 * * ? *)",
        iamRole: exampleAwsIamRole.arn,
        targetAction: {
            resizeCluster: {
                clusterIdentifier: "tf-redshift001",
                clusterType: "multi-node",
                nodeType: "dc1.large",
                numberOfNodes: 2,
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshift.ScheduledAction("example",
        name="tf-redshift-scheduled-action",
        schedule="cron(00 23 * * ? *)",
        iam_role=example_aws_iam_role["arn"],
        target_action={
            "resizeCluster": {
                "clusterIdentifier": "tf-redshift001",
                "clusterType": "multi-node",
                "nodeType": "dc1.large",
                "numberOfNodes": 2,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshift.NewScheduledAction(ctx, "example", &redshift.ScheduledActionArgs{
    			Name:     pulumi.String("tf-redshift-scheduled-action"),
    			Schedule: pulumi.String("cron(00 23 * * ? *)"),
    			IamRole:  pulumi.Any(exampleAwsIamRole.Arn),
    			TargetAction: &redshift.ScheduledActionTargetActionArgs{
    				ResizeCluster: &redshift.ScheduledActionTargetActionResizeClusterArgs{
    					ClusterIdentifier: pulumi.String("tf-redshift001"),
    					ClusterType:       pulumi.String("multi-node"),
    					NodeType:          pulumi.String("dc1.large"),
    					NumberOfNodes:     pulumi.Int(2),
    				},
    			},
    		})
    		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.RedShift.ScheduledAction("example", new()
        {
            Name = "tf-redshift-scheduled-action",
            Schedule = "cron(00 23 * * ? *)",
            IamRole = exampleAwsIamRole.Arn,
            TargetAction = new Aws.RedShift.Inputs.ScheduledActionTargetActionArgs
            {
                ResizeCluster = new Aws.RedShift.Inputs.ScheduledActionTargetActionResizeClusterArgs
                {
                    ClusterIdentifier = "tf-redshift001",
                    ClusterType = "multi-node",
                    NodeType = "dc1.large",
                    NumberOfNodes = 2,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.ScheduledAction;
    import com.pulumi.aws.redshift.ScheduledActionArgs;
    import com.pulumi.aws.redshift.inputs.ScheduledActionTargetActionArgs;
    import com.pulumi.aws.redshift.inputs.ScheduledActionTargetActionResizeClusterArgs;
    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 example = new ScheduledAction("example", ScheduledActionArgs.builder()
                .name("tf-redshift-scheduled-action")
                .schedule("cron(00 23 * * ? *)")
                .iamRole(exampleAwsIamRole.arn())
                .targetAction(ScheduledActionTargetActionArgs.builder()
                    .resizeCluster(ScheduledActionTargetActionResizeClusterArgs.builder()
                        .clusterIdentifier("tf-redshift001")
                        .clusterType("multi-node")
                        .nodeType("dc1.large")
                        .numberOfNodes(2)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshift:ScheduledAction
        properties:
          name: tf-redshift-scheduled-action
          schedule: cron(00 23 * * ? *)
          iamRole: ${exampleAwsIamRole.arn}
          targetAction:
            resizeCluster:
              clusterIdentifier: tf-redshift001
              clusterType: multi-node
              nodeType: dc1.large
              numberOfNodes: 2
    

    Create ScheduledAction Resource

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

    Constructor syntax

    new ScheduledAction(name: string, args: ScheduledActionArgs, opts?: CustomResourceOptions);
    @overload
    def ScheduledAction(resource_name: str,
                        args: ScheduledActionArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScheduledAction(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        iam_role: Optional[str] = None,
                        schedule: Optional[str] = None,
                        target_action: Optional[ScheduledActionTargetActionArgs] = None,
                        description: Optional[str] = None,
                        enable: Optional[bool] = None,
                        end_time: Optional[str] = None,
                        name: Optional[str] = None,
                        start_time: Optional[str] = None)
    func NewScheduledAction(ctx *Context, name string, args ScheduledActionArgs, opts ...ResourceOption) (*ScheduledAction, error)
    public ScheduledAction(string name, ScheduledActionArgs args, CustomResourceOptions? opts = null)
    public ScheduledAction(String name, ScheduledActionArgs args)
    public ScheduledAction(String name, ScheduledActionArgs args, CustomResourceOptions options)
    
    type: aws:redshift:ScheduledAction
    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 ScheduledActionArgs
    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 ScheduledActionArgs
    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 ScheduledActionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduledActionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduledActionArgs
    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 awsScheduledActionResource = new Aws.RedShift.ScheduledAction("awsScheduledActionResource", new()
    {
        IamRole = "string",
        Schedule = "string",
        TargetAction = new Aws.RedShift.Inputs.ScheduledActionTargetActionArgs
        {
            PauseCluster = new Aws.RedShift.Inputs.ScheduledActionTargetActionPauseClusterArgs
            {
                ClusterIdentifier = "string",
            },
            ResizeCluster = new Aws.RedShift.Inputs.ScheduledActionTargetActionResizeClusterArgs
            {
                ClusterIdentifier = "string",
                Classic = false,
                ClusterType = "string",
                NodeType = "string",
                NumberOfNodes = 0,
            },
            ResumeCluster = new Aws.RedShift.Inputs.ScheduledActionTargetActionResumeClusterArgs
            {
                ClusterIdentifier = "string",
            },
        },
        Description = "string",
        Enable = false,
        EndTime = "string",
        Name = "string",
        StartTime = "string",
    });
    
    example, err := redshift.NewScheduledAction(ctx, "awsScheduledActionResource", &redshift.ScheduledActionArgs{
    	IamRole:  pulumi.String("string"),
    	Schedule: pulumi.String("string"),
    	TargetAction: &redshift.ScheduledActionTargetActionArgs{
    		PauseCluster: &redshift.ScheduledActionTargetActionPauseClusterArgs{
    			ClusterIdentifier: pulumi.String("string"),
    		},
    		ResizeCluster: &redshift.ScheduledActionTargetActionResizeClusterArgs{
    			ClusterIdentifier: pulumi.String("string"),
    			Classic:           pulumi.Bool(false),
    			ClusterType:       pulumi.String("string"),
    			NodeType:          pulumi.String("string"),
    			NumberOfNodes:     pulumi.Int(0),
    		},
    		ResumeCluster: &redshift.ScheduledActionTargetActionResumeClusterArgs{
    			ClusterIdentifier: pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    	Enable:      pulumi.Bool(false),
    	EndTime:     pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	StartTime:   pulumi.String("string"),
    })
    
    var awsScheduledActionResource = new ScheduledAction("awsScheduledActionResource", ScheduledActionArgs.builder()
        .iamRole("string")
        .schedule("string")
        .targetAction(ScheduledActionTargetActionArgs.builder()
            .pauseCluster(ScheduledActionTargetActionPauseClusterArgs.builder()
                .clusterIdentifier("string")
                .build())
            .resizeCluster(ScheduledActionTargetActionResizeClusterArgs.builder()
                .clusterIdentifier("string")
                .classic(false)
                .clusterType("string")
                .nodeType("string")
                .numberOfNodes(0)
                .build())
            .resumeCluster(ScheduledActionTargetActionResumeClusterArgs.builder()
                .clusterIdentifier("string")
                .build())
            .build())
        .description("string")
        .enable(false)
        .endTime("string")
        .name("string")
        .startTime("string")
        .build());
    
    aws_scheduled_action_resource = aws.redshift.ScheduledAction("awsScheduledActionResource",
        iam_role="string",
        schedule="string",
        target_action={
            "pauseCluster": {
                "clusterIdentifier": "string",
            },
            "resizeCluster": {
                "clusterIdentifier": "string",
                "classic": False,
                "clusterType": "string",
                "nodeType": "string",
                "numberOfNodes": 0,
            },
            "resumeCluster": {
                "clusterIdentifier": "string",
            },
        },
        description="string",
        enable=False,
        end_time="string",
        name="string",
        start_time="string")
    
    const awsScheduledActionResource = new aws.redshift.ScheduledAction("awsScheduledActionResource", {
        iamRole: "string",
        schedule: "string",
        targetAction: {
            pauseCluster: {
                clusterIdentifier: "string",
            },
            resizeCluster: {
                clusterIdentifier: "string",
                classic: false,
                clusterType: "string",
                nodeType: "string",
                numberOfNodes: 0,
            },
            resumeCluster: {
                clusterIdentifier: "string",
            },
        },
        description: "string",
        enable: false,
        endTime: "string",
        name: "string",
        startTime: "string",
    });
    
    type: aws:redshift:ScheduledAction
    properties:
        description: string
        enable: false
        endTime: string
        iamRole: string
        name: string
        schedule: string
        startTime: string
        targetAction:
            pauseCluster:
                clusterIdentifier: string
            resizeCluster:
                classic: false
                clusterIdentifier: string
                clusterType: string
                nodeType: string
                numberOfNodes: 0
            resumeCluster:
                clusterIdentifier: string
    

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

    IamRole string
    The IAM role to assume to run the scheduled action.
    Schedule string
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    TargetAction Pulumi.Aws.RedShift.Inputs.ScheduledActionTargetAction
    Target action. Documented below.
    Description string
    The description of the scheduled action.
    Enable bool
    Whether to enable the scheduled action. Default is true .
    EndTime string
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    Name string
    The scheduled action name.
    StartTime string
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    IamRole string
    The IAM role to assume to run the scheduled action.
    Schedule string
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    TargetAction ScheduledActionTargetActionArgs
    Target action. Documented below.
    Description string
    The description of the scheduled action.
    Enable bool
    Whether to enable the scheduled action. Default is true .
    EndTime string
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    Name string
    The scheduled action name.
    StartTime string
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iamRole String
    The IAM role to assume to run the scheduled action.
    schedule String
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    targetAction ScheduledActionTargetAction
    Target action. Documented below.
    description String
    The description of the scheduled action.
    enable Boolean
    Whether to enable the scheduled action. Default is true .
    endTime String
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    name String
    The scheduled action name.
    startTime String
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iamRole string
    The IAM role to assume to run the scheduled action.
    schedule string
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    targetAction ScheduledActionTargetAction
    Target action. Documented below.
    description string
    The description of the scheduled action.
    enable boolean
    Whether to enable the scheduled action. Default is true .
    endTime string
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    name string
    The scheduled action name.
    startTime string
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iam_role str
    The IAM role to assume to run the scheduled action.
    schedule str
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    target_action ScheduledActionTargetActionArgs
    Target action. Documented below.
    description str
    The description of the scheduled action.
    enable bool
    Whether to enable the scheduled action. Default is true .
    end_time str
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    name str
    The scheduled action name.
    start_time str
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iamRole String
    The IAM role to assume to run the scheduled action.
    schedule String
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    targetAction Property Map
    Target action. Documented below.
    description String
    The description of the scheduled action.
    enable Boolean
    Whether to enable the scheduled action. Default is true .
    endTime String
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    name String
    The scheduled action name.
    startTime String
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).

    Outputs

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

    Get an existing ScheduledAction 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?: ScheduledActionState, opts?: CustomResourceOptions): ScheduledAction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            enable: Optional[bool] = None,
            end_time: Optional[str] = None,
            iam_role: Optional[str] = None,
            name: Optional[str] = None,
            schedule: Optional[str] = None,
            start_time: Optional[str] = None,
            target_action: Optional[ScheduledActionTargetActionArgs] = None) -> ScheduledAction
    func GetScheduledAction(ctx *Context, name string, id IDInput, state *ScheduledActionState, opts ...ResourceOption) (*ScheduledAction, error)
    public static ScheduledAction Get(string name, Input<string> id, ScheduledActionState? state, CustomResourceOptions? opts = null)
    public static ScheduledAction get(String name, Output<String> id, ScheduledActionState 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:
    Description string
    The description of the scheduled action.
    Enable bool
    Whether to enable the scheduled action. Default is true .
    EndTime string
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    IamRole string
    The IAM role to assume to run the scheduled action.
    Name string
    The scheduled action name.
    Schedule string
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    StartTime string
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    TargetAction Pulumi.Aws.RedShift.Inputs.ScheduledActionTargetAction
    Target action. Documented below.
    Description string
    The description of the scheduled action.
    Enable bool
    Whether to enable the scheduled action. Default is true .
    EndTime string
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    IamRole string
    The IAM role to assume to run the scheduled action.
    Name string
    The scheduled action name.
    Schedule string
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    StartTime string
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    TargetAction ScheduledActionTargetActionArgs
    Target action. Documented below.
    description String
    The description of the scheduled action.
    enable Boolean
    Whether to enable the scheduled action. Default is true .
    endTime String
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iamRole String
    The IAM role to assume to run the scheduled action.
    name String
    The scheduled action name.
    schedule String
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    startTime String
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    targetAction ScheduledActionTargetAction
    Target action. Documented below.
    description string
    The description of the scheduled action.
    enable boolean
    Whether to enable the scheduled action. Default is true .
    endTime string
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iamRole string
    The IAM role to assume to run the scheduled action.
    name string
    The scheduled action name.
    schedule string
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    startTime string
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    targetAction ScheduledActionTargetAction
    Target action. Documented below.
    description str
    The description of the scheduled action.
    enable bool
    Whether to enable the scheduled action. Default is true .
    end_time str
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iam_role str
    The IAM role to assume to run the scheduled action.
    name str
    The scheduled action name.
    schedule str
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    start_time str
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    target_action ScheduledActionTargetActionArgs
    Target action. Documented below.
    description String
    The description of the scheduled action.
    enable Boolean
    Whether to enable the scheduled action. Default is true .
    endTime String
    The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    iamRole String
    The IAM role to assume to run the scheduled action.
    name String
    The scheduled action name.
    schedule String
    The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example at(2016-03-04T17:27:00) or cron(0 10 ? * MON *). See Scheduled Action for more information.
    startTime String
    The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ).
    targetAction Property Map
    Target action. Documented below.

    Supporting Types

    ScheduledActionTargetAction, ScheduledActionTargetActionArgs

    PauseCluster Pulumi.Aws.RedShift.Inputs.ScheduledActionTargetActionPauseCluster
    An action that runs a PauseCluster API operation. Documented below.
    ResizeCluster Pulumi.Aws.RedShift.Inputs.ScheduledActionTargetActionResizeCluster
    An action that runs a ResizeCluster API operation. Documented below.
    ResumeCluster Pulumi.Aws.RedShift.Inputs.ScheduledActionTargetActionResumeCluster
    An action that runs a ResumeCluster API operation. Documented below.
    PauseCluster ScheduledActionTargetActionPauseCluster
    An action that runs a PauseCluster API operation. Documented below.
    ResizeCluster ScheduledActionTargetActionResizeCluster
    An action that runs a ResizeCluster API operation. Documented below.
    ResumeCluster ScheduledActionTargetActionResumeCluster
    An action that runs a ResumeCluster API operation. Documented below.
    pauseCluster ScheduledActionTargetActionPauseCluster
    An action that runs a PauseCluster API operation. Documented below.
    resizeCluster ScheduledActionTargetActionResizeCluster
    An action that runs a ResizeCluster API operation. Documented below.
    resumeCluster ScheduledActionTargetActionResumeCluster
    An action that runs a ResumeCluster API operation. Documented below.
    pauseCluster ScheduledActionTargetActionPauseCluster
    An action that runs a PauseCluster API operation. Documented below.
    resizeCluster ScheduledActionTargetActionResizeCluster
    An action that runs a ResizeCluster API operation. Documented below.
    resumeCluster ScheduledActionTargetActionResumeCluster
    An action that runs a ResumeCluster API operation. Documented below.
    pause_cluster ScheduledActionTargetActionPauseCluster
    An action that runs a PauseCluster API operation. Documented below.
    resize_cluster ScheduledActionTargetActionResizeCluster
    An action that runs a ResizeCluster API operation. Documented below.
    resume_cluster ScheduledActionTargetActionResumeCluster
    An action that runs a ResumeCluster API operation. Documented below.
    pauseCluster Property Map
    An action that runs a PauseCluster API operation. Documented below.
    resizeCluster Property Map
    An action that runs a ResizeCluster API operation. Documented below.
    resumeCluster Property Map
    An action that runs a ResumeCluster API operation. Documented below.

    ScheduledActionTargetActionPauseCluster, ScheduledActionTargetActionPauseClusterArgs

    ClusterIdentifier string
    The identifier of the cluster to be paused.
    ClusterIdentifier string
    The identifier of the cluster to be paused.
    clusterIdentifier String
    The identifier of the cluster to be paused.
    clusterIdentifier string
    The identifier of the cluster to be paused.
    cluster_identifier str
    The identifier of the cluster to be paused.
    clusterIdentifier String
    The identifier of the cluster to be paused.

    ScheduledActionTargetActionResizeCluster, ScheduledActionTargetActionResizeClusterArgs

    ClusterIdentifier string
    The unique identifier for the cluster to resize.
    Classic bool
    A boolean value indicating whether the resize operation is using the classic resize process. Default: false.
    ClusterType string
    The new cluster type for the specified cluster.
    NodeType string
    The new node type for the nodes you are adding.
    NumberOfNodes int
    The new number of nodes for the cluster.
    ClusterIdentifier string
    The unique identifier for the cluster to resize.
    Classic bool
    A boolean value indicating whether the resize operation is using the classic resize process. Default: false.
    ClusterType string
    The new cluster type for the specified cluster.
    NodeType string
    The new node type for the nodes you are adding.
    NumberOfNodes int
    The new number of nodes for the cluster.
    clusterIdentifier String
    The unique identifier for the cluster to resize.
    classic Boolean
    A boolean value indicating whether the resize operation is using the classic resize process. Default: false.
    clusterType String
    The new cluster type for the specified cluster.
    nodeType String
    The new node type for the nodes you are adding.
    numberOfNodes Integer
    The new number of nodes for the cluster.
    clusterIdentifier string
    The unique identifier for the cluster to resize.
    classic boolean
    A boolean value indicating whether the resize operation is using the classic resize process. Default: false.
    clusterType string
    The new cluster type for the specified cluster.
    nodeType string
    The new node type for the nodes you are adding.
    numberOfNodes number
    The new number of nodes for the cluster.
    cluster_identifier str
    The unique identifier for the cluster to resize.
    classic bool
    A boolean value indicating whether the resize operation is using the classic resize process. Default: false.
    cluster_type str
    The new cluster type for the specified cluster.
    node_type str
    The new node type for the nodes you are adding.
    number_of_nodes int
    The new number of nodes for the cluster.
    clusterIdentifier String
    The unique identifier for the cluster to resize.
    classic Boolean
    A boolean value indicating whether the resize operation is using the classic resize process. Default: false.
    clusterType String
    The new cluster type for the specified cluster.
    nodeType String
    The new node type for the nodes you are adding.
    numberOfNodes Number
    The new number of nodes for the cluster.

    ScheduledActionTargetActionResumeCluster, ScheduledActionTargetActionResumeClusterArgs

    ClusterIdentifier string
    The identifier of the cluster to be resumed.
    ClusterIdentifier string
    The identifier of the cluster to be resumed.
    clusterIdentifier String
    The identifier of the cluster to be resumed.
    clusterIdentifier string
    The identifier of the cluster to be resumed.
    cluster_identifier str
    The identifier of the cluster to be resumed.
    clusterIdentifier String
    The identifier of the cluster to be resumed.

    Import

    Using pulumi import, import Redshift Scheduled Action using the name. For example:

    $ pulumi import aws:redshift/scheduledAction:ScheduledAction example tf-redshift-scheduled-action
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi