campaigns
Creates, updates, deletes or gets a campaign resource or lists campaigns in a region
Overview
| Name | campaigns |
| Type | Resource |
| Description | Definition of AWS::ConnectCampaignsV2::Campaign Resource Type |
| Id | awscc.connectcampaignsv2.campaigns |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Connect Campaign Arn |
name | string | Campaign name |
connect_instance_id | string | Amazon Connect Instance Id |
channel_subtype_config | object | The possible types of channel subtype config parameters |
source | object | The possible source of the campaign |
connect_campaign_flow_arn | string | Arn |
schedule | object | Campaign schedule |
communication_time_config | object | Campaign communication time config |
communication_limits_override | object | Communication limits config |
tags | array | One or more tags. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Connect Campaign Arn |
region | string | AWS region. |
For more information, see AWS::ConnectCampaignsV2::Campaign.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | campaigns | INSERT | Name, ConnectInstanceId, ChannelSubtypeConfig, region |
delete_resource | campaigns | DELETE | Identifier, region |
update_resource | campaigns | UPDATE | Identifier, PatchDocument, region |
list_resources | campaigns_list_only | SELECT | region |
get_resource | campaigns | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual campaign.
SELECT
region,
arn,
name,
connect_instance_id,
channel_subtype_config,
source,
connect_campaign_flow_arn,
schedule,
communication_time_config,
communication_limits_override,
tags
FROM awscc.connectcampaignsv2.campaigns
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all campaigns in a region.
SELECT
region,
arn
FROM awscc.connectcampaignsv2.campaigns_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new campaign resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.connectcampaignsv2.campaigns (
Name,
ConnectInstanceId,
ChannelSubtypeConfig,
region
)
SELECT
'{{ name }}',
'{{ connect_instance_id }}',
'{{ channel_subtype_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.connectcampaignsv2.campaigns (
Name,
ConnectInstanceId,
ChannelSubtypeConfig,
Source,
ConnectCampaignFlowArn,
Schedule,
CommunicationTimeConfig,
CommunicationLimitsOverride,
Tags,
region
)
SELECT
'{{ name }}',
'{{ connect_instance_id }}',
'{{ channel_subtype_config }}',
'{{ source }}',
'{{ connect_campaign_flow_arn }}',
'{{ schedule }}',
'{{ communication_time_config }}',
'{{ communication_limits_override }}',
'{{ tags }}',
'{{ 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: campaign
props:
- name: name
value: '{{ name }}'
- name: connect_instance_id
value: '{{ connect_instance_id }}'
- name: channel_subtype_config
value:
telephony:
capacity: null
connect_queue_id: '{{ connect_queue_id }}'
outbound_mode:
progressive_config:
bandwidth_allocation: null
predictive_config:
bandwidth_allocation: null
agentless_config: {}
default_outbound_config:
connect_contact_flow_id: '{{ connect_contact_flow_id }}'
connect_source_phone_number: '{{ connect_source_phone_number }}'
answer_machine_detection_config:
enable_answer_machine_detection: '{{ enable_answer_machine_detection }}'
await_answer_machine_prompt: '{{ await_answer_machine_prompt }}'
sms:
capacity: null
outbound_mode:
agentless_config: null
default_outbound_config:
connect_source_phone_number_arn: '{{ connect_source_phone_number_arn }}'
wisdom_template_arn: null
email:
capacity: null
outbound_mode:
agentless_config: null
default_outbound_config:
connect_source_email_address: '{{ connect_source_email_address }}'
source_email_address_display_name: '{{ source_email_address_display_name }}'
wisdom_template_arn: null
- name: source
value:
customer_profiles_segment_arn: null
event_trigger:
customer_profiles_domain_arn: null
- name: connect_campaign_flow_arn
value: null
- name: schedule
value:
start_time: '{{ start_time }}'
end_time: null
refresh_frequency: '{{ refresh_frequency }}'
- name: communication_time_config
value:
local_time_zone_config:
default_time_zone: '{{ default_time_zone }}'
local_time_zone_detection:
- '{{ local_time_zone_detection[0] }}'
telephony:
open_hours:
daily_hours:
- key: '{{ key }}'
value:
- start_time: '{{ start_time }}'
end_time: null
restricted_periods:
restricted_period_list:
- name: '{{ name }}'
start_date: '{{ start_date }}'
end_date: null
sms: null
email: null
- name: communication_limits_override
value:
all_channels_subtypes:
communication_limit_list:
- max_count_per_recipient: '{{ max_count_per_recipient }}'
frequency: '{{ frequency }}'
unit: '{{ unit }}'
instance_limits_handling: '{{ instance_limits_handling }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a campaign resource, using stack-deploy.
/*+ update */
UPDATE awscc.connectcampaignsv2.campaigns
SET PatchDocument = string('{{ {
"Name": name,
"ChannelSubtypeConfig": channel_subtype_config,
"Source": source,
"ConnectCampaignFlowArn": connect_campaign_flow_arn,
"Schedule": schedule,
"CommunicationTimeConfig": communication_time_config,
"CommunicationLimitsOverride": communication_limits_override,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.connectcampaignsv2.campaigns
WHERE
Identifier = '{{ 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 campaigns resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
connect-campaigns:CreateCampaign,
connect-campaigns:DescribeCampaign,
connect-campaigns:TagResource,
connect:DescribeContactFlow,
connect:DescribeEmailAddress,
connect:DescribeInstance,
connect:DescribePhoneNumber,
connect:DescribeQueue,
profile:GetSegmentDefinition,
wisdom:GetMessageTemplate
connect-campaigns:DescribeCampaign
connect-campaigns:DeleteCampaign,
connect-campaigns:DeleteCampaignChannelSubtypeConfig,
connect-campaigns:DeleteCampaignCommunicationLimits,
connect-campaigns:DeleteCampaignCommunicationTime
connect-campaigns:ListCampaigns
connect-campaigns:DeleteCampaignChannelSubtypeConfig,
connect-campaigns:DeleteCampaignCommunicationLimits,
connect-campaigns:DeleteCampaignCommunicationTime,
connect-campaigns:UpdateCampaignChannelSubtypeConfig,
connect-campaigns:UpdateCampaignCommunicationLimits,
connect-campaigns:UpdateCampaignCommunicationTime,
connect-campaigns:UpdateCampaignName,
connect-campaigns:UpdateCampaignFlowAssociation,
connect-campaigns:UpdateCampaignSchedule,
connect-campaigns:UpdateCampaignSource,
connect-campaigns:TagResource,
connect-campaigns:UntagResource,
connect-campaigns:DescribeCampaign,
connect:DescribeContactFlow,
connect:DescribeEmailAddress,
connect:DescribePhoneNumber,
connect:DescribeQueue,
profile:GetSegmentDefinition,
wisdom:GetMessageTemplate