monitoring_subscriptions
Creates, updates, deletes or gets a monitoring_subscription
resource or lists monitoring_subscriptions
in a region
Overview
Name | monitoring_subscriptions |
Type | Resource |
Description | Resource Type definition for AWS::CloudFront::MonitoringSubscription |
Id | aws.cloudfront.monitoring_subscriptions |
Fields
Name | Datatype | Description |
---|---|---|
distribution_id | string | |
monitoring_subscription | object | Resource Type definition for AWS::CloudFront::MonitoringSubscription |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DistributionId, MonitoringSubscription, region |
delete_resource | DELETE | data__Identifier, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual monitoring_subscription
.
SELECT
region,
distribution_id,
monitoring_subscription
FROM aws.cloudfront.monitoring_subscriptions
WHERE data__Identifier = '<DistributionId>';
INSERT
example
Use the following StackQL query and manifest file to create a new monitoring_subscription
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cloudfront.monitoring_subscriptions (
DistributionId,
MonitoringSubscription,
region
)
SELECT
'{{ DistributionId }}',
'{{ MonitoringSubscription }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudfront.monitoring_subscriptions (
DistributionId,
MonitoringSubscription,
region
)
SELECT
'{{ DistributionId }}',
'{{ MonitoringSubscription }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: monitoring_subscription
props:
- name: DistributionId
value: '{{ DistributionId }}'
- name: MonitoringSubscription
value:
DistributionId: '{{ DistributionId }}'
MonitoringSubscription: null
DELETE
example
/*+ delete */
DELETE FROM aws.cloudfront.monitoring_subscriptions
WHERE data__Identifier = '<DistributionId>'
AND region = 'us-east-1';
Permissions
To operate on the monitoring_subscriptions
resource, the following permissions are required:
Create
cloudfront:CreateMonitoringSubscription
Delete
cloudfront:DeleteMonitoringSubscription
Read
cloudfront:GetMonitoringSubscription