Skip to main content

campaigns

Creates, updates, deletes or gets a campaign resource or lists campaigns in a region

Overview

Namecampaigns
TypeResource
DescriptionDefinition of AWS::ConnectCampaignsV2::Campaign Resource Type
Idawscc.connectcampaignsv2.campaigns

Fields

NameDatatypeDescription
arnstringAmazon Connect Campaign Arn
namestringCampaign name
connect_instance_idstringAmazon Connect Instance Id
channel_subtype_configobjectThe possible types of channel subtype config parameters
sourceobjectThe possible source of the campaign
connect_campaign_flow_arnstringArn
scheduleobjectCampaign schedule
communication_time_configobjectCampaign communication time config
communication_limits_overrideobjectCommunication limits config
tagsarrayOne or more tags.
regionstringAWS region.

For more information, see AWS::ConnectCampaignsV2::Campaign.

Methods

NameResourceAccessible byRequired Params
create_resourcecampaignsINSERTName, ConnectInstanceId, ChannelSubtypeConfig, region
delete_resourcecampaignsDELETEIdentifier, region
update_resourcecampaignsUPDATEIdentifier, PatchDocument, region
list_resourcescampaigns_list_onlySELECTregion
get_resourcecampaignsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new campaign resource, using stack-deploy.

/*+ 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
;

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:

ParameterDescription
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:

connect-campaigns:CreateCampaign,
connect-campaigns:DescribeCampaign,
connect-campaigns:TagResource,
connect:DescribeContactFlow,
connect:DescribeEmailAddress,
connect:DescribeInstance,
connect:DescribePhoneNumber,
connect:DescribeQueue,
profile:GetSegmentDefinition,
wisdom:GetMessageTemplate