rotations
Creates, updates, deletes or gets a rotation
resource or lists rotations
in a region
Overview
Name | rotations |
Type | Resource |
Description | Resource Type definition for AWS::SSMContacts::Rotation. |
Id | aws.ssmcontacts.rotations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Name of the Rotation |
contact_ids | array | Members of the rotation |
start_time | string | Start time of the first shift of Oncall Schedule |
time_zone_id | string | TimeZone Identifier for the Oncall Schedule |
recurrence | object | Information about when an on-call rotation is in effect and how long the rotation period lasts. |
tags | array | |
arn | string | The Amazon Resource Name (ARN) of the rotation. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, ContactIds, StartTime, TimeZoneId, Recurrence, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all rotations
in a region.
SELECT
region,
name,
contact_ids,
start_time,
time_zone_id,
recurrence,
tags,
arn
FROM aws.ssmcontacts.rotations
WHERE region = 'us-east-1';
Gets all properties from an individual rotation
.
SELECT
region,
name,
contact_ids,
start_time,
time_zone_id,
recurrence,
tags,
arn
FROM aws.ssmcontacts.rotations
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new rotation
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ssmcontacts.rotations (
Name,
ContactIds,
StartTime,
TimeZoneId,
Recurrence,
region
)
SELECT
'{{ Name }}',
'{{ ContactIds }}',
'{{ StartTime }}',
'{{ TimeZoneId }}',
'{{ Recurrence }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ssmcontacts.rotations (
Name,
ContactIds,
StartTime,
TimeZoneId,
Recurrence,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ ContactIds }}',
'{{ StartTime }}',
'{{ TimeZoneId }}',
'{{ Recurrence }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: rotation
props:
- name: Name
value: '{{ Name }}'
- name: ContactIds
value:
- '{{ ContactIds[0] }}'
- name: StartTime
value: '{{ StartTime }}'
- name: TimeZoneId
value: '{{ TimeZoneId }}'
- name: Recurrence
value:
MonthlySettings:
- DayOfMonth: '{{ DayOfMonth }}'
HandOffTime: '{{ HandOffTime }}'
WeeklySettings:
- DayOfWeek: '{{ DayOfWeek }}'
HandOffTime: null
DailySettings:
- null
NumberOfOnCalls: '{{ NumberOfOnCalls }}'
RecurrenceMultiplier: '{{ RecurrenceMultiplier }}'
ShiftCoverages:
- DayOfWeek: null
CoverageTimes:
- StartTime: null
EndTime: null
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ssmcontacts.rotations
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the rotations
resource, the following permissions are required:
Create
ssm-contacts:CreateRotation,
ssm-contacts:GetRotation,
ssm-contacts:TagResource,
ssm-contacts:ListTagsForResource,
ssm-contacts:UntagResource
Read
ssm-contacts:GetRotation,
ssm-contacts:TagResource,
ssm-contacts:ListTagsForResource,
ssm-contacts:UntagResource
Update
ssm-contacts:UpdateRotation,
ssm-contacts:GetRotation,
ssm-contacts:TagResource,
ssm-contacts:ListTagsForResource,
ssm-contacts:UntagResource
Delete
ssm-contacts:DeleteRotation,
ssm-contacts:GetRotation,
ssm-contacts:ListTagsForResource,
ssm-contacts:UntagResource
List
ssm-contacts:ListRotations,
ssm-contacts:GetRotation,
ssm-contacts:ListTagsForResource