core_networks
Creates, updates, deletes or gets a core_network
resource or lists core_networks
in a region
Overview
Name | core_networks |
Type | Resource |
Description | AWS::NetworkManager::CoreNetwork Resource Type Definition. |
Id | aws.networkmanager.core_networks |
Fields
Name | Datatype | Description |
---|---|---|
global_network_id | string | The ID of the global network that your core network is a part of. |
core_network_id | string | The Id of core network |
core_network_arn | string | The ARN (Amazon resource name) of core network |
policy_document | object | Live policy document for the core network, you must provide PolicyDocument in Json Format |
description | string | The description of core network |
created_at | string | The creation time of core network |
state | string | The state of core network |
segments | array | The segments within a core network. |
edges | array | The edges within a core network. |
owner_account | string | Owner of the core network |
tags | array | The tags for the global network. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | GlobalNetworkId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all core_networks
in a region.
SELECT
region,
global_network_id,
core_network_id,
core_network_arn,
policy_document,
description,
created_at,
state,
segments,
edges,
owner_account,
tags
FROM aws.networkmanager.core_networks
WHERE region = 'us-east-1';
Gets all properties from an individual core_network
.
SELECT
region,
global_network_id,
core_network_id,
core_network_arn,
policy_document,
description,
created_at,
state,
segments,
edges,
owner_account,
tags
FROM aws.networkmanager.core_networks
WHERE region = 'us-east-1' AND data__Identifier = '<CoreNetworkId>';
INSERT
example
Use the following StackQL query and manifest file to create a new core_network
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.networkmanager.core_networks (
GlobalNetworkId,
region
)
SELECT
'{{ GlobalNetworkId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.networkmanager.core_networks (
GlobalNetworkId,
PolicyDocument,
Description,
Tags,
region
)
SELECT
'{{ GlobalNetworkId }}',
'{{ PolicyDocument }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: core_network
props:
- name: GlobalNetworkId
value: '{{ GlobalNetworkId }}'
- name: PolicyDocument
value: {}
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.networkmanager.core_networks
WHERE data__Identifier = '<CoreNetworkId>'
AND region = 'us-east-1';
Permissions
To operate on the core_networks
resource, the following permissions are required:
Create
networkmanager:CreateCoreNetwork,
networkmanager:GetCoreNetwork,
networkmanager:GetCoreNetworkPolicy,
networkmanager:TagResource,
ec2:DescribeRegions
Read
networkmanager:GetCoreNetwork,
networkmanager:GetCoreNetworkPolicy
Update
networkmanager:UpdateCoreNetwork,
networkmanager:GetCoreNetwork,
networkmanager:ListTagsForResource,
networkmanager:PutCoreNetworkPolicy,
networkmanager:GetCoreNetworkPolicy,
networkmanager:ExecuteCoreNetworkChangeSet,
networkmanager:TagResource,
networkmanager:UntagResource,
ec2:DescribeRegions
Delete
networkmanager:DeleteCoreNetwork,
networkmanager:UntagResource,
networkmanager:GetCoreNetwork,
networkmanager:GetCoreNetworkPolicy,
ec2:DescribeRegions
List
networkmanager:ListCoreNetworks