db_proxy_endpoints
Creates, updates, deletes or gets a db_proxy_endpoint resource or lists db_proxy_endpoints in a region
Overview
| Name | db_proxy_endpoints |
| Type | Resource |
| Description | Resource schema for AWS::RDS::DBProxyEndpoint. |
| Id | awscc.rds.db_proxy_endpoints |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
db_proxy_endpoint_name | string | The identifier for the DB proxy endpoint. This name must be unique for all DB proxy endpoints owned by your AWS account in the specified AWS Region. |
db_proxy_endpoint_arn | string | The Amazon Resource Name (ARN) for the DB proxy endpoint. |
db_proxy_name | string | The identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. |
vpc_id | string | VPC ID to associate with the new DB proxy endpoint. |
vpc_security_group_ids | array | VPC security group IDs to associate with the new DB proxy endpoint. |
vpc_subnet_ids | array | VPC subnet IDs to associate with the new DB proxy endpoint. |
endpoint | string | The endpoint that you can use to connect to the DB proxy. You include the endpoint value in the connection string for a database client application. |
target_role | string | A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations. |
is_default | boolean | A value that indicates whether this endpoint is the default endpoint for the associated DB proxy. Default DB proxy endpoints always have read/write capability. Other endpoints that you associate with the DB proxy can be either read/write or read-only. |
tags | array | An optional set of key-value pairs to associate arbitrary data of your choosing with the DB proxy endpoint. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
db_proxy_endpoint_name | string | The identifier for the DB proxy endpoint. This name must be unique for all DB proxy endpoints owned by your AWS account in the specified AWS Region. |
endpoint | string | The endpoint that you can use to connect to the DB proxy. You include the endpoint value in the connection string for a database client application. |
region | string | AWS region. |
For more information, see AWS::RDS::DBProxyEndpoint.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | db_proxy_endpoints | INSERT | DBProxyName, DBProxyEndpointName, VpcSubnetIds, region |
delete_resource | db_proxy_endpoints | DELETE | Identifier, region |
update_resource | db_proxy_endpoints | UPDATE | Identifier, PatchDocument, region |
list_resources | db_proxy_endpoints_list_only | SELECT | region |
get_resource | db_proxy_endpoints | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual db_proxy_endpoint.
SELECT
region,
db_proxy_endpoint_name,
db_proxy_endpoint_arn,
db_proxy_name,
vpc_id,
vpc_security_group_ids,
vpc_subnet_ids,
endpoint,
target_role,
is_default,
tags
FROM awscc.rds.db_proxy_endpoints
WHERE
region = '{{ region }}' AND
Identifier = '{{ db_proxy_endpoint_name }}';
Lists all db_proxy_endpoints in a region.
SELECT
region,
db_proxy_endpoint_name
FROM awscc.rds.db_proxy_endpoints_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new db_proxy_endpoint resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.rds.db_proxy_endpoints (
DBProxyEndpointName,
DBProxyName,
VpcSubnetIds,
region
)
SELECT
'{{ db_proxy_endpoint_name }}',
'{{ db_proxy_name }}',
'{{ vpc_subnet_ids }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.rds.db_proxy_endpoints (
DBProxyEndpointName,
DBProxyName,
VpcSecurityGroupIds,
VpcSubnetIds,
TargetRole,
Tags,
region
)
SELECT
'{{ db_proxy_endpoint_name }}',
'{{ db_proxy_name }}',
'{{ vpc_security_group_ids }}',
'{{ vpc_subnet_ids }}',
'{{ target_role }}',
'{{ 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: db_proxy_endpoint
props:
- name: db_proxy_endpoint_name
value: '{{ db_proxy_endpoint_name }}'
- name: db_proxy_name
value: '{{ db_proxy_name }}'
- name: vpc_security_group_ids
value:
- '{{ vpc_security_group_ids[0] }}'
- name: vpc_subnet_ids
value:
- '{{ vpc_subnet_ids[0] }}'
- name: target_role
value: '{{ target_role }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a db_proxy_endpoint resource, using stack-deploy.
/*+ update */
UPDATE awscc.rds.db_proxy_endpoints
SET PatchDocument = string('{{ {
"VpcSecurityGroupIds": vpc_security_group_ids,
"TargetRole": target_role,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ db_proxy_endpoint_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.rds.db_proxy_endpoints
WHERE
Identifier = '{{ db_proxy_endpoint_name }}' 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 db_proxy_endpoints resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
rds:CreateDBProxyEndpoint,
rds:DescribeDBProxyEndpoints
rds:DescribeDBProxyEndpoints,
rds:ListTagsForResource
rds:ModifyDBProxyEndpoint,
rds:AddTagsToResource,
rds:RemoveTagsFromResource
rds:DescribeDBProxyEndpoints,
rds:DeleteDBProxyEndpoint
rds:DescribeDBProxyEndpoints