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 | awscc.networkmanager.core_networks |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
network_function_groups | array | The network function groups 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. |
| Name | Datatype | Description |
|---|---|---|
core_network_id | string | The Id of core network |
region | string | AWS region. |
For more information, see AWS::NetworkManager::CoreNetwork.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | core_networks | INSERT | GlobalNetworkId, region |
delete_resource | core_networks | DELETE | Identifier, region |
update_resource | core_networks | UPDATE | Identifier, PatchDocument, region |
list_resources | core_networks_list_only | SELECT | region |
get_resource | core_networks | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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,
network_function_groups,
edges,
owner_account,
tags
FROM awscc.networkmanager.core_networks
WHERE
region = '{{ region }}' AND
Identifier = '{{ core_network_id }}';
Lists all core_networks in a region.
SELECT
region,
core_network_id
FROM awscc.networkmanager.core_networks_list_only
WHERE
region = '{{ region }}';
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 awscc.networkmanager.core_networks (
GlobalNetworkId,
region
)
SELECT
'{{ global_network_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.networkmanager.core_networks (
GlobalNetworkId,
PolicyDocument,
Description,
Tags,
region
)
SELECT
'{{ global_network_id }}',
'{{ policy_document }}',
'{{ description }}',
'{{ 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: core_network
props:
- name: global_network_id
value: '{{ global_network_id }}'
- name: policy_document
value: {}
- name: description
value: '{{ description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a core_network resource, using stack-deploy.
/*+ update */
UPDATE awscc.networkmanager.core_networks
SET PatchDocument = string('{{ {
"PolicyDocument": policy_document,
"Description": description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ core_network_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.networkmanager.core_networks
WHERE
Identifier = '{{ core_network_id }}' 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 core_networks resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
networkmanager:CreateCoreNetwork,
networkmanager:GetCoreNetwork,
networkmanager:GetCoreNetworkPolicy,
networkmanager:TagResource,
ec2:DescribeRegions
networkmanager:GetCoreNetwork,
networkmanager:GetCoreNetworkPolicy
networkmanager:UpdateCoreNetwork,
networkmanager:GetCoreNetwork,
networkmanager:ListTagsForResource,
networkmanager:PutCoreNetworkPolicy,
networkmanager:GetCoreNetworkPolicy,
networkmanager:ExecuteCoreNetworkChangeSet,
networkmanager:TagResource,
networkmanager:UntagResource,
ec2:DescribeRegions
networkmanager:DeleteCoreNetwork,
networkmanager:UntagResource,
networkmanager:GetCoreNetwork,
networkmanager:GetCoreNetworkPolicy,
ec2:DescribeRegions
networkmanager:ListCoreNetworks