global_networks
Creates, updates, deletes or gets a global_network resource or lists global_networks in a region
Overview
| Name | global_networks |
| Type | Resource |
| Description | The AWS::NetworkManager::GlobalNetwork type specifies a global network of the user's account |
| Id | awscc.networkmanager.global_networks |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the global network. |
id | string | The ID of the global network. |
description | string | The description of the global network. |
tags | array | The tags for the global network. |
created_at | string | The date and time that the global network was created. |
state | string | The state of the global network. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the global network. |
region | string | AWS region. |
For more information, see AWS::NetworkManager::GlobalNetwork.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | global_networks | INSERT | region |
delete_resource | global_networks | DELETE | Identifier, region |
update_resource | global_networks | UPDATE | Identifier, PatchDocument, region |
list_resources | global_networks_list_only | SELECT | region |
get_resource | global_networks | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual global_network.
SELECT
region,
arn,
id,
description,
tags,
created_at,
state
FROM awscc.networkmanager.global_networks
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all global_networks in a region.
SELECT
region,
id
FROM awscc.networkmanager.global_networks_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new global_network resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.networkmanager.global_networks (
Description,
Tags,
CreatedAt,
State,
region
)
SELECT
'{{ description }}',
'{{ tags }}',
'{{ created_at }}',
'{{ state }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.networkmanager.global_networks (
Description,
Tags,
CreatedAt,
State,
region
)
SELECT
'{{ description }}',
'{{ tags }}',
'{{ created_at }}',
'{{ state }}',
'{{ 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: global_network
props:
- name: description
value: '{{ description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: created_at
value: '{{ created_at }}'
- name: state
value: '{{ state }}'
UPDATE example
Use the following StackQL query and manifest file to update a global_network resource, using stack-deploy.
/*+ update */
UPDATE awscc.networkmanager.global_networks
SET PatchDocument = string('{{ {
"Description": description,
"Tags": tags,
"CreatedAt": created_at,
"State": state
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.networkmanager.global_networks
WHERE
Identifier = '{{ 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 global_networks resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
networkmanager:CreateGlobalNetwork,
networkmanager:DescribeGlobalNetworks,
networkmanager:TagResource,
iam:CreateServiceLinkedRole
networkmanager:DescribeGlobalNetworks
networkmanager:UpdateGlobalNetwork,
networkmanager:DescribeGlobalNetworks,
networkmanager:TagResource,
networkmanager:UntagResource,
networkmanager:ListTagsForResource
networkmanager:DeleteGlobalNetwork,
networkmanager:DescribeGlobalNetworks
networkmanager:DescribeGlobalNetworks