aws.rds.ProxyEndpoint
Explore with Pulumi AI
Provides an RDS DB proxy endpoint resource. For additional information, see the RDS User Guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.ProxyEndpoint("example", {
dbProxyName: test.name,
dbProxyEndpointName: "example",
vpcSubnetIds: testAwsSubnet.map(__item => __item.id),
targetRole: "READ_ONLY",
});
import pulumi
import pulumi_aws as aws
example = aws.rds.ProxyEndpoint("example",
db_proxy_name=test["name"],
db_proxy_endpoint_name="example",
vpc_subnet_ids=[__item["id"] for __item in test_aws_subnet],
target_role="READ_ONLY")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
var splat0 []interface{}
for _, val0 := range testAwsSubnet {
splat0 = append(splat0, val0.Id)
}
_, err := rds.NewProxyEndpoint(ctx, "example", &rds.ProxyEndpointArgs{
DbProxyName: pulumi.Any(test.Name),
DbProxyEndpointName: pulumi.String("example"),
VpcSubnetIds: toPulumiArray(splat0),
TargetRole: pulumi.String("READ_ONLY"),
})
if err != nil {
return err
}
return nil
})
}
func toPulumiArray(arr []) pulumi.Array {
var pulumiArr pulumi.Array
for _, v := range arr {
pulumiArr = append(pulumiArr, pulumi.(v))
}
return pulumiArr
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rds.ProxyEndpoint("example", new()
{
DbProxyName = test.Name,
DbProxyEndpointName = "example",
VpcSubnetIds = testAwsSubnet.Select(__item => __item.Id).ToList(),
TargetRole = "READ_ONLY",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.ProxyEndpoint;
import com.pulumi.aws.rds.ProxyEndpointArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ProxyEndpoint("example", ProxyEndpointArgs.builder()
.dbProxyName(test.name())
.dbProxyEndpointName("example")
.vpcSubnetIds(testAwsSubnet.stream().map(element -> element.id()).collect(toList()))
.targetRole("READ_ONLY")
.build());
}
}
Coming soon!
Create ProxyEndpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProxyEndpoint(name: string, args: ProxyEndpointArgs, opts?: CustomResourceOptions);
@overload
def ProxyEndpoint(resource_name: str,
args: ProxyEndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProxyEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_proxy_endpoint_name: Optional[str] = None,
db_proxy_name: Optional[str] = None,
vpc_subnet_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
target_role: Optional[str] = None,
vpc_security_group_ids: Optional[Sequence[str]] = None)
func NewProxyEndpoint(ctx *Context, name string, args ProxyEndpointArgs, opts ...ResourceOption) (*ProxyEndpoint, error)
public ProxyEndpoint(string name, ProxyEndpointArgs args, CustomResourceOptions? opts = null)
public ProxyEndpoint(String name, ProxyEndpointArgs args)
public ProxyEndpoint(String name, ProxyEndpointArgs args, CustomResourceOptions options)
type: aws:rds:ProxyEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProxyEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProxyEndpointArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProxyEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProxyEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProxyEndpointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var proxyEndpointResource = new Aws.Rds.ProxyEndpoint("proxyEndpointResource", new()
{
DbProxyEndpointName = "string",
DbProxyName = "string",
VpcSubnetIds = new[]
{
"string",
},
Tags =
{
{ "string", "string" },
},
TargetRole = "string",
VpcSecurityGroupIds = new[]
{
"string",
},
});
example, err := rds.NewProxyEndpoint(ctx, "proxyEndpointResource", &rds.ProxyEndpointArgs{
DbProxyEndpointName: pulumi.String("string"),
DbProxyName: pulumi.String("string"),
VpcSubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetRole: pulumi.String("string"),
VpcSecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var proxyEndpointResource = new ProxyEndpoint("proxyEndpointResource", ProxyEndpointArgs.builder()
.dbProxyEndpointName("string")
.dbProxyName("string")
.vpcSubnetIds("string")
.tags(Map.of("string", "string"))
.targetRole("string")
.vpcSecurityGroupIds("string")
.build());
proxy_endpoint_resource = aws.rds.ProxyEndpoint("proxyEndpointResource",
db_proxy_endpoint_name="string",
db_proxy_name="string",
vpc_subnet_ids=["string"],
tags={
"string": "string",
},
target_role="string",
vpc_security_group_ids=["string"])
const proxyEndpointResource = new aws.rds.ProxyEndpoint("proxyEndpointResource", {
dbProxyEndpointName: "string",
dbProxyName: "string",
vpcSubnetIds: ["string"],
tags: {
string: "string",
},
targetRole: "string",
vpcSecurityGroupIds: ["string"],
});
type: aws:rds:ProxyEndpoint
properties:
dbProxyEndpointName: string
dbProxyName: string
tags:
string: string
targetRole: string
vpcSecurityGroupIds:
- string
vpcSubnetIds:
- string
ProxyEndpoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ProxyEndpoint resource accepts the following input properties:
- Db
Proxy stringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- Db
Proxy stringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- Vpc
Subnet List<string>Ids - One or more VPC subnet IDs to associate with the new proxy.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Target
Role string - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - Vpc
Security List<string>Group Ids - One or more VPC security group IDs to associate with the new proxy.
- Db
Proxy stringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- Db
Proxy stringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- Vpc
Subnet []stringIds - One or more VPC subnet IDs to associate with the new proxy.
- map[string]string
- A mapping of tags to assign to the resource.
- Target
Role string - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - Vpc
Security []stringGroup Ids - One or more VPC security group IDs to associate with the new proxy.
- db
Proxy StringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db
Proxy StringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- vpc
Subnet List<String>Ids - One or more VPC subnet IDs to associate with the new proxy.
- Map<String,String>
- A mapping of tags to assign to the resource.
- target
Role String - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc
Security List<String>Group Ids - One or more VPC security group IDs to associate with the new proxy.
- db
Proxy stringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db
Proxy stringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- vpc
Subnet string[]Ids - One or more VPC subnet IDs to associate with the new proxy.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- target
Role string - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc
Security string[]Group Ids - One or more VPC security group IDs to associate with the new proxy.
- db_
proxy_ strendpoint_ name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db_
proxy_ strname - The name of the DB proxy associated with the DB proxy endpoint that you create.
- vpc_
subnet_ Sequence[str]ids - One or more VPC subnet IDs to associate with the new proxy.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- target_
role str - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc_
security_ Sequence[str]group_ ids - One or more VPC security group IDs to associate with the new proxy.
- db
Proxy StringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db
Proxy StringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- vpc
Subnet List<String>Ids - One or more VPC subnet IDs to associate with the new proxy.
- Map<String>
- A mapping of tags to assign to the resource.
- target
Role String - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc
Security List<String>Group Ids - One or more VPC security group IDs to associate with the new proxy.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProxyEndpoint resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) for the proxy endpoint.
- Endpoint string
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Dictionary<string, string>
- Vpc
Id string - The VPC ID of the DB proxy endpoint.
- Arn string
- The Amazon Resource Name (ARN) for the proxy endpoint.
- Endpoint string
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- map[string]string
- Vpc
Id string - The VPC ID of the DB proxy endpoint.
- arn String
- The Amazon Resource Name (ARN) for the proxy endpoint.
- endpoint String
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Map<String,String>
- vpc
Id String - The VPC ID of the DB proxy endpoint.
- arn string
- The Amazon Resource Name (ARN) for the proxy endpoint.
- endpoint string
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default boolean - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- {[key: string]: string}
- vpc
Id string - The VPC ID of the DB proxy endpoint.
- arn str
- The Amazon Resource Name (ARN) for the proxy endpoint.
- endpoint str
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default bool - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Mapping[str, str]
- vpc_
id str - The VPC ID of the DB proxy endpoint.
- arn String
- The Amazon Resource Name (ARN) for the proxy endpoint.
- endpoint String
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Map<String>
- vpc
Id String - The VPC ID of the DB proxy endpoint.
Look up Existing ProxyEndpoint Resource
Get an existing ProxyEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProxyEndpointState, opts?: CustomResourceOptions): ProxyEndpoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
db_proxy_endpoint_name: Optional[str] = None,
db_proxy_name: Optional[str] = None,
endpoint: Optional[str] = None,
is_default: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
target_role: Optional[str] = None,
vpc_id: Optional[str] = None,
vpc_security_group_ids: Optional[Sequence[str]] = None,
vpc_subnet_ids: Optional[Sequence[str]] = None) -> ProxyEndpoint
func GetProxyEndpoint(ctx *Context, name string, id IDInput, state *ProxyEndpointState, opts ...ResourceOption) (*ProxyEndpoint, error)
public static ProxyEndpoint Get(string name, Input<string> id, ProxyEndpointState? state, CustomResourceOptions? opts = null)
public static ProxyEndpoint get(String name, Output<String> id, ProxyEndpointState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The Amazon Resource Name (ARN) for the proxy endpoint.
- Db
Proxy stringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- Db
Proxy stringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- Endpoint string
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- Is
Default bool - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Dictionary<string, string>
- Target
Role string - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - Vpc
Id string - The VPC ID of the DB proxy endpoint.
- Vpc
Security List<string>Group Ids - One or more VPC security group IDs to associate with the new proxy.
- Vpc
Subnet List<string>Ids - One or more VPC subnet IDs to associate with the new proxy.
- Arn string
- The Amazon Resource Name (ARN) for the proxy endpoint.
- Db
Proxy stringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- Db
Proxy stringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- Endpoint string
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- Is
Default bool - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- map[string]string
- A mapping of tags to assign to the resource.
- map[string]string
- Target
Role string - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - Vpc
Id string - The VPC ID of the DB proxy endpoint.
- Vpc
Security []stringGroup Ids - One or more VPC security group IDs to associate with the new proxy.
- Vpc
Subnet []stringIds - One or more VPC subnet IDs to associate with the new proxy.
- arn String
- The Amazon Resource Name (ARN) for the proxy endpoint.
- db
Proxy StringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db
Proxy StringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- endpoint String
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- is
Default Boolean - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Map<String,String>
- A mapping of tags to assign to the resource.
- Map<String,String>
- target
Role String - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc
Id String - The VPC ID of the DB proxy endpoint.
- vpc
Security List<String>Group Ids - One or more VPC security group IDs to associate with the new proxy.
- vpc
Subnet List<String>Ids - One or more VPC subnet IDs to associate with the new proxy.
- arn string
- The Amazon Resource Name (ARN) for the proxy endpoint.
- db
Proxy stringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db
Proxy stringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- endpoint string
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- is
Default boolean - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- {[key: string]: string}
- target
Role string - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc
Id string - The VPC ID of the DB proxy endpoint.
- vpc
Security string[]Group Ids - One or more VPC security group IDs to associate with the new proxy.
- vpc
Subnet string[]Ids - One or more VPC subnet IDs to associate with the new proxy.
- arn str
- The Amazon Resource Name (ARN) for the proxy endpoint.
- db_
proxy_ strendpoint_ name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db_
proxy_ strname - The name of the DB proxy associated with the DB proxy endpoint that you create.
- endpoint str
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- is_
default bool - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- Mapping[str, str]
- target_
role str - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc_
id str - The VPC ID of the DB proxy endpoint.
- vpc_
security_ Sequence[str]group_ ids - One or more VPC security group IDs to associate with the new proxy.
- vpc_
subnet_ Sequence[str]ids - One or more VPC subnet IDs to associate with the new proxy.
- arn String
- The Amazon Resource Name (ARN) for the proxy endpoint.
- db
Proxy StringEndpoint Name - The identifier for the proxy endpoint. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
- db
Proxy StringName - The name of the DB proxy associated with the DB proxy endpoint that you create.
- endpoint String
- The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.
- is
Default Boolean - Indicates whether this endpoint is the default endpoint for the associated DB proxy.
- Map<String>
- A mapping of tags to assign to the resource.
- Map<String>
- target
Role String - Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is
READ_WRITE
. Valid values areREAD_WRITE
andREAD_ONLY
. - vpc
Id String - The VPC ID of the DB proxy endpoint.
- vpc
Security List<String>Group Ids - One or more VPC security group IDs to associate with the new proxy.
- vpc
Subnet List<String>Ids - One or more VPC subnet IDs to associate with the new proxy.
Import
Using pulumi import
, import DB proxy endpoints using the DB-PROXY-NAME/DB-PROXY-ENDPOINT-NAME
. For example:
$ pulumi import aws:rds/proxyEndpoint:ProxyEndpoint example example/example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.