network_performance_metric_subscriptions
Creates, updates, deletes or gets a network_performance_metric_subscription
resource or lists network_performance_metric_subscriptions
in a region
Overview
Name | network_performance_metric_subscriptions |
Type | Resource |
Description | Resource Type definition for AWS::EC2::NetworkPerformanceMetricSubscription |
Id | aws.ec2.network_performance_metric_subscriptions |
Fields
Name | Datatype | Description |
---|---|---|
source | string | The starting Region or Availability Zone for metric to subscribe to. |
destination | string | The target Region or Availability Zone for the metric to subscribe to. |
metric | string | The metric type to subscribe to. |
statistic | string | The statistic to subscribe to. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Source, Destination, Metric, Statistic, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all network_performance_metric_subscriptions
in a region.
SELECT
region,
source,
destination,
metric,
statistic
FROM aws.ec2.network_performance_metric_subscriptions
WHERE region = 'us-east-1';
Gets all properties from an individual network_performance_metric_subscription
.
SELECT
region,
source,
destination,
metric,
statistic
FROM aws.ec2.network_performance_metric_subscriptions
WHERE region = 'us-east-1' AND data__Identifier = '<Source>|<Destination>|<Metric>|<Statistic>';
INSERT
example
Use the following StackQL query and manifest file to create a new network_performance_metric_subscription
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.network_performance_metric_subscriptions (
Source,
Destination,
Metric,
Statistic,
region
)
SELECT
'{{ Source }}',
'{{ Destination }}',
'{{ Metric }}',
'{{ Statistic }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.network_performance_metric_subscriptions (
Source,
Destination,
Metric,
Statistic,
region
)
SELECT
'{{ Source }}',
'{{ Destination }}',
'{{ Metric }}',
'{{ Statistic }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: network_performance_metric_subscription
props:
- name: Source
value: '{{ Source }}'
- name: Destination
value: '{{ Destination }}'
- name: Metric
value: '{{ Metric }}'
- name: Statistic
value: '{{ Statistic }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.network_performance_metric_subscriptions
WHERE data__Identifier = '<Source|Destination|Metric|Statistic>'
AND region = 'us-east-1';
Permissions
To operate on the network_performance_metric_subscriptions
resource, the following permissions are required:
Create
ec2:DescribeAwsNetworkPerformanceMetricSubscriptions,
ec2:EnableAwsNetworkPerformanceMetricSubscription
Read
ec2:DescribeAwsNetworkPerformanceMetricSubscriptions
Delete
ec2:DescribeAwsNetworkPerformanceMetricSubscriptions,
ec2:DisableAwsNetworkPerformanceMetricSubscription
List
ec2:DescribeAwsNetworkPerformanceMetricSubscriptions