hours_of_operations
Creates, updates, deletes or gets a hours_of_operation resource or lists hours_of_operations in a region
Overview
| Name | hours_of_operations |
| Type | Resource |
| Description | Resource Type definition for AWS::Connect::HoursOfOperation |
| Id | awscc.connect.hours_of_operations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
instance_arn | string | The identifier of the Amazon Connect instance. |
name | string | The name of the hours of operation. |
description | string | The description of the hours of operation. |
time_zone | string | The time zone of the hours of operation. |
config | array | Configuration information for the hours of operation: day, start time, and end time. |
hours_of_operation_arn | string | The Amazon Resource Name (ARN) for the hours of operation. |
tags | array | One or more tags. |
hours_of_operation_overrides | array | One or more hours of operation overrides assigned to an hour of operation. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
hours_of_operation_arn | string | The Amazon Resource Name (ARN) for the hours of operation. |
region | string | AWS region. |
For more information, see AWS::Connect::HoursOfOperation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | hours_of_operations | INSERT | InstanceArn, Name, TimeZone, Config, region |
delete_resource | hours_of_operations | DELETE | Identifier, region |
update_resource | hours_of_operations | UPDATE | Identifier, PatchDocument, region |
list_resources | hours_of_operations_list_only | SELECT | region |
get_resource | hours_of_operations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual hours_of_operation.
SELECT
region,
instance_arn,
name,
description,
time_zone,
config,
hours_of_operation_arn,
tags,
hours_of_operation_overrides
FROM awscc.connect.hours_of_operations
WHERE
region = '{{ region }}' AND
Identifier = '{{ hours_of_operation_arn }}';
Lists all hours_of_operations in a region.
SELECT
region,
hours_of_operation_arn
FROM awscc.connect.hours_of_operations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new hours_of_operation resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.connect.hours_of_operations (
InstanceArn,
Name,
TimeZone,
Config,
region
)
SELECT
'{{ instance_arn }}',
'{{ name }}',
'{{ time_zone }}',
'{{ config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.connect.hours_of_operations (
InstanceArn,
Name,
Description,
TimeZone,
Config,
Tags,
HoursOfOperationOverrides,
region
)
SELECT
'{{ instance_arn }}',
'{{ name }}',
'{{ description }}',
'{{ time_zone }}',
'{{ config }}',
'{{ tags }}',
'{{ hours_of_operation_overrides }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: hours_of_operation
props:
- name: instance_arn
value: '{{ instance_arn }}'
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: time_zone
value: '{{ time_zone }}'
- name: config
value:
- day: '{{ day }}'
start_time:
hours: '{{ hours }}'
minutes: '{{ minutes }}'
end_time: null
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: hours_of_operation_overrides
value:
- override_name: '{{ override_name }}'
override_description: '{{ override_description }}'
effective_from: '{{ effective_from }}'
effective_till: '{{ effective_till }}'
override_config:
- day: '{{ day }}'
start_time:
hours: '{{ hours }}'
minutes: '{{ minutes }}'
end_time: null
hours_of_operation_override_id: '{{ hours_of_operation_override_id }}'
UPDATE example
Use the following StackQL query and manifest file to update a hours_of_operation resource, using stack-deploy.
/*+ update */
UPDATE awscc.connect.hours_of_operations
SET PatchDocument = string('{{ {
"InstanceArn": instance_arn,
"Name": name,
"Description": description,
"TimeZone": time_zone,
"Config": config,
"Tags": tags,
"HoursOfOperationOverrides": hours_of_operation_overrides
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ hours_of_operation_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.connect.hours_of_operations
WHERE
Identifier = '{{ hours_of_operation_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the hours_of_operations resource, the following permissions are required:
- Create
- Read
- Delete
- Update
- List
connect:CreateHoursOfOperation,
connect:TagResource,
connect:CreateHoursOfOperationOverride
connect:DescribeHoursOfOperation,
connect:ListHoursOfOperationOverrides
connect:DeleteHoursOfOperation,
connect:UntagResource
connect:UpdateHoursOfOperation,
connect:CreateHoursOfOperationOverride,
connect:UpdateHoursOfOperationOverride,
connect:DeleteHoursOfOperationOverride,
connect:ListHoursOfOperationOverrides,
connect:TagResource,
connect:UntagResource
connect:ListHoursOfOperations