Skip to content

Associate Instance Event Window

ec2_associate_instance_event_window R Documentation

Associates one or more targets with an event window

Description

Associates one or more targets with an event window. Only one type of target (instance IDs, Dedicated Host IDs, or tags) can be specified with an event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Usage

ec2_associate_instance_event_window(DryRun, InstanceEventWindowId,
  AssociationTarget)

Arguments

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

InstanceEventWindowId

[required] The ID of the event window.

AssociationTarget

[required] One or more targets associated with the specified event window.

Value

A list with the following syntax:

list(
  InstanceEventWindow = list(
    InstanceEventWindowId = "string",
    TimeRanges = list(
      list(
        StartWeekDay = "sunday"|"monday"|"tuesday"|"wednesday"|"thursday"|"friday"|"saturday",
        StartHour = 123,
        EndWeekDay = "sunday"|"monday"|"tuesday"|"wednesday"|"thursday"|"friday"|"saturday",
        EndHour = 123
      )
    ),
    Name = "string",
    CronExpression = "string",
    AssociationTarget = list(
      InstanceIds = list(
        "string"
      ),
      Tags = list(
        list(
          Key = "string",
          Value = "string"
        )
      ),
      DedicatedHostIds = list(
        "string"
      )
    ),
    State = "creating"|"deleting"|"active"|"deleted",
    Tags = list(
      list(
        Key = "string",
        Value = "string"
      )
    )
  )
)

Request syntax

svc$associate_instance_event_window(
  DryRun = TRUE|FALSE,
  InstanceEventWindowId = "string",
  AssociationTarget = list(
    InstanceIds = list(
      "string"
    ),
    InstanceTags = list(
      list(
        Key = "string",
        Value = "string"
      )
    ),
    DedicatedHostIds = list(
      "string"
    )
  )
)