campaigns
Creates, updates, deletes or gets a campaign resource or lists campaigns in a region
Overview
| Name | campaigns |
| Type | Resource |
| Description | Definition of AWS::ConnectCampaigns::Campaign Resource Type |
| Id | awscc.connectcampaigns.campaigns |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
connect_instance_arn | string | Amazon Connect Instance Arn |
dialer_config | object | The possible types of dialer config parameters |
arn | string | Amazon Connect Campaign Arn |
name | string | Amazon Connect Campaign Name |
outbound_call_config | object | The configuration used for outbound calls. |
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::ConnectCampaigns::Campaign.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | campaigns | INSERT | ConnectInstanceArn, DialerConfig, Name, OutboundCallConfig, 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,
connect_instance_arn,
dialer_config,
arn,
name,
outbound_call_config,
tags
FROM awscc.connectcampaigns.campaigns
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all campaigns in a region.
SELECT
region,
arn
FROM awscc.connectcampaigns.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.connectcampaigns.campaigns (
ConnectInstanceArn,
DialerConfig,
Name,
OutboundCallConfig,
region
)
SELECT
'{{ connect_instance_arn }}',
'{{ dialer_config }}',
'{{ name }}',
'{{ outbound_call_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.connectcampaigns.campaigns (
ConnectInstanceArn,
DialerConfig,
Name,
OutboundCallConfig,
Tags,
region
)
SELECT
'{{ connect_instance_arn }}',
'{{ dialer_config }}',
'{{ name }}',
'{{ outbound_call_config }}',
'{{ 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: connect_instance_arn
value: '{{ connect_instance_arn }}'
- name: dialer_config
value:
progressive_dialer_config:
bandwidth_allocation: null
dialing_capacity: null
predictive_dialer_config:
bandwidth_allocation: null
dialing_capacity: null
agentless_dialer_config:
dialing_capacity: null
- name: name
value: '{{ name }}'
- name: outbound_call_config
value:
connect_contact_flow_arn: '{{ connect_contact_flow_arn }}'
connect_source_phone_number: '{{ connect_source_phone_number }}'
connect_queue_arn: '{{ connect_queue_arn }}'
answer_machine_detection_config:
enable_answer_machine_detection: '{{ enable_answer_machine_detection }}'
await_answer_machine_prompt: '{{ await_answer_machine_prompt }}'
- 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.connectcampaigns.campaigns
SET PatchDocument = string('{{ {
"DialerConfig": dialer_config,
"Name": name,
"OutboundCallConfig": outbound_call_config,
"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.connectcampaigns.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:DescribeInstance,
connect:DescribeQueue
connect-campaigns:DescribeCampaign
connect-campaigns:DeleteCampaign
connect-campaigns:ListCampaigns
connect-campaigns:UpdateCampaignDialerConfig,
connect-campaigns:UpdateCampaignName,
connect-campaigns:UpdateCampaignOutboundCallConfig,
connect-campaigns:TagResource,
connect-campaigns:UntagResource,
connect-campaigns:DescribeCampaign