odb_networks
Creates, updates, deletes or gets an odb_network resource or lists odb_networks in a region
Overview
| Name | odb_networks |
| Type | Resource |
| Description | The AWS::ODB::OdbNetwork resource creates an ODB Network |
| Id | awscc.odb.odb_networks |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
availability_zone | string | The AWS Availability Zone (AZ) where the ODB network is located. |
availability_zone_id | string | The AZ ID of the AZ where the ODB network is located. |
backup_subnet_cidr | string | The CIDR range of the backup subnet in the ODB network. |
client_subnet_cidr | string | The CIDR range of the client subnet in the ODB network. |
default_dns_prefix | string | The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com. |
delete_associated_resources | boolean | Specifies whether to delete associated OCI networking resources along with the ODB network. |
display_name | string | The user-friendly name of the ODB network. |
oci_network_anchor_id | string | The unique identifier of the OCI network anchor for the ODB network. |
oci_resource_anchor_name | string | The name of the OCI resource anchor that's associated with the ODB network. |
oci_vcn_url | string | The URL for the VCN that's associated with the ODB network. |
odb_network_arn | string | The Amazon Resource Name (ARN) of the ODB network. |
odb_network_id | string | The unique identifier of the ODB network. |
tags | array | Tags to assign to the Odb Network. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
odb_network_arn | string | The Amazon Resource Name (ARN) of the ODB network. |
region | string | AWS region. |
For more information, see AWS::ODB::OdbNetwork.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | odb_networks | INSERT | region |
delete_resource | odb_networks | DELETE | Identifier, region |
update_resource | odb_networks | UPDATE | Identifier, PatchDocument, region |
list_resources | odb_networks_list_only | SELECT | region |
get_resource | odb_networks | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual odb_network.
SELECT
region,
availability_zone,
availability_zone_id,
backup_subnet_cidr,
client_subnet_cidr,
default_dns_prefix,
delete_associated_resources,
display_name,
oci_network_anchor_id,
oci_resource_anchor_name,
oci_vcn_url,
odb_network_arn,
odb_network_id,
tags
FROM awscc.odb.odb_networks
WHERE
region = '{{ region }}' AND
Identifier = '{{ odb_network_arn }}';
Lists all odb_networks in a region.
SELECT
region,
odb_network_arn
FROM awscc.odb.odb_networks_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new odb_network resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.odb.odb_networks (
AvailabilityZone,
AvailabilityZoneId,
BackupSubnetCidr,
ClientSubnetCidr,
DefaultDnsPrefix,
DeleteAssociatedResources,
DisplayName,
Tags,
region
)
SELECT
'{{ availability_zone }}',
'{{ availability_zone_id }}',
'{{ backup_subnet_cidr }}',
'{{ client_subnet_cidr }}',
'{{ default_dns_prefix }}',
'{{ delete_associated_resources }}',
'{{ display_name }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.odb.odb_networks (
AvailabilityZone,
AvailabilityZoneId,
BackupSubnetCidr,
ClientSubnetCidr,
DefaultDnsPrefix,
DeleteAssociatedResources,
DisplayName,
Tags,
region
)
SELECT
'{{ availability_zone }}',
'{{ availability_zone_id }}',
'{{ backup_subnet_cidr }}',
'{{ client_subnet_cidr }}',
'{{ default_dns_prefix }}',
'{{ delete_associated_resources }}',
'{{ display_name }}',
'{{ 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: odb_network
props:
- name: availability_zone
value: '{{ availability_zone }}'
- name: availability_zone_id
value: '{{ availability_zone_id }}'
- name: backup_subnet_cidr
value: '{{ backup_subnet_cidr }}'
- name: client_subnet_cidr
value: '{{ client_subnet_cidr }}'
- name: default_dns_prefix
value: '{{ default_dns_prefix }}'
- name: delete_associated_resources
value: '{{ delete_associated_resources }}'
- name: display_name
value: '{{ display_name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a odb_network resource, using stack-deploy.
/*+ update */
UPDATE awscc.odb.odb_networks
SET PatchDocument = string('{{ {
"DeleteAssociatedResources": delete_associated_resources,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ odb_network_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.odb.odb_networks
WHERE
Identifier = '{{ odb_network_arn }}' 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 odb_networks resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
odb:CreateOdbNetwork,
odb:TagResource,
ec2:DescribeAvailabilityZones,
iam:CreateServiceLinkedRole,
ec2:DescribeVpcs,
ec2:CreateOdbNetworkPeering,
odb:ListTagsForResource,
sts:GetCallerIdentity,
odb:GetOdbNetwork,
odb:ListOdbNetworks,
odb:UpdateOdbNetwork,
vpc-lattice:CreateServiceNetwork,
vpc-lattice:GetServiceNetwork,
vpc-lattice:CreateServiceNetworkResourceAssociation,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:CreateResourceGateway,
vpc-lattice:GetResourceGateway,
vpc-lattice:CreateServiceNetworkVpcEndpointAssociation,
redshiftchannelmanagement:CreateChannel,
ec2:ModifyOdbNetworkPeering,
ec2:DescribeVpcEndpointAssociations,
ec2:CreateVpcEndpoint,
ec2:DescribeVpcEndpoints,
ec2:CreateTags
odb:GetOdbNetwork,
odb:ListOdbNetworks,
odb:ListTagsForResource,
sts:GetCallerIdentity,
vpc-lattice:GetServiceNetwork,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:GetResourceGateway,
ec2:DescribeVpcEndpointAssociations,
ec2:DescribeVpcEndpoints
odb:UpdateOdbNetwork,
odb:TagResource,
odb:UntagResource,
ec2:DescribeVpcs,
ec2:CreateOdbNetworkPeering,
ec2:DeleteOdbNetworkPeering,
odb:ListTagsForResource,
sts:GetCallerIdentity,
odb:GetOdbNetwork,
odb:ListOdbNetworks,
vpc-lattice:GetServiceNetwork,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:GetResourceGateway,
ec2:DescribeVpcEndpointAssociations,
ec2:DescribeVpcEndpoints
odb:DeleteOdbNetwork,
ec2:DeleteOdbNetworkPeering,
ec2:DescribeVpcs,
odb:ListTagsForResource,
sts:GetCallerIdentity,
odb:GetOdbNetwork,
odb:ListOdbNetworks,
vpc-lattice:DeleteServiceNetwork,
vpc-lattice:GetServiceNetwork,
vpc-lattice:DeleteServiceNetworkResourceAssociation,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:DeleteResourceGateway,
vpc-lattice:GetResourceGateway,
ec2:ModifyOdbNetworkPeering,
ec2:DescribeVpcEndpointAssociations,
ec2:DeleteVpcEndpoints,
ec2:DescribeVpcEndpoints
odb:ListOdbNetworks,
odb:ListTagsForResource,
sts:GetCallerIdentity,
vpc-lattice:GetServiceNetwork,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:GetResourceGateway,
ec2:DescribeVpcEndpointAssociations,
ec2:DescribeVpcEndpoints