Skip to content
v2.276.0

ModeProperty Struct Added in v2.276.0 ​

The configuration for the private connection.

Specify either a service-managed or a self-managed mode.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_securityagent as securityagent } from 'aws-cdk-lib';
const modeProperty: securityagent.CfnPrivateConnection.ModeProperty = {
  selfManaged: {
    resourceConfigurationId: 'resourceConfigurationId',
  },
  serviceManaged: {
    hostAddress: 'hostAddress',
    subnetIds: ['subnetIds'],
    vpcId: 'vpcId',

    // the properties below are optional
    dnsResolution: 'dnsResolution',
    ipAddressType: 'ipAddressType',
    ipv4AddressesPerEni: 123,
    portRanges: ['portRanges'],
    securityGroupIds: ['securityGroupIds'],
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_securityagent as securityagent

mode_property = securityagent.CfnPrivateConnection.ModeProperty(
    self_managed=securityagent.CfnPrivateConnection.SelfManagedProperty(
        resource_configuration_id="resourceConfigurationId"
    ),
    service_managed=securityagent.CfnPrivateConnection.ServiceManagedProperty(
        host_address="hostAddress",
        subnet_ids=["subnetIds"],
        vpc_id="vpcId",

        # the properties below are optional
        dns_resolution="dnsResolution",
        ip_address_type="ipAddressType",
        ipv4_addresses_per_eni=123,
        port_ranges=["portRanges"],
        security_group_ids=["securityGroupIds"]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.securityagent.*;

ModeProperty modeProperty = ModeProperty.builder()
        .selfManaged(SelfManagedProperty.builder()
                .resourceConfigurationId("resourceConfigurationId")
                .build())
        .serviceManaged(ServiceManagedProperty.builder()
                .hostAddress("hostAddress")
                .subnetIds(List.of("subnetIds"))
                .vpcId("vpcId")

                // the properties below are optional
                .dnsResolution("dnsResolution")
                .ipAddressType("ipAddressType")
                .ipv4AddressesPerEni(123)
                .portRanges(List.of("portRanges"))
                .securityGroupIds(List.of("securityGroupIds"))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SecurityAgent;

var modeProperty = new ModeProperty {
    SelfManaged = new SelfManagedProperty {
        ResourceConfigurationId = "resourceConfigurationId"
    },
    ServiceManaged = new ServiceManagedProperty {
        HostAddress = "hostAddress",
        SubnetIds = new [] { "subnetIds" },
        VpcId = "vpcId",

        // the properties below are optional
        DnsResolution = "dnsResolution",
        IpAddressType = "ipAddressType",
        Ipv4AddressesPerEni = 123,
        PortRanges = new [] { "portRanges" },
        SecurityGroupIds = new [] { "securityGroupIds" }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

modeProperty := &ModeProperty{
	SelfManaged: &SelfManagedProperty{
		ResourceConfigurationId: jsii.String("resourceConfigurationId"),
	},
	ServiceManaged: &ServiceManagedProperty{
		HostAddress: jsii.String("hostAddress"),
		SubnetIds: []*string{
			jsii.String("subnetIds"),
		},
		VpcId: jsii.String("vpcId"),

		// the properties below are optional
		DnsResolution: jsii.String("dnsResolution"),
		IpAddressType: jsii.String("ipAddressType"),
		Ipv4AddressesPerEni: jsii.Number(123),
		PortRanges: []*string{
			jsii.String("portRanges"),
		},
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
	},
}

Properties ​

selfManagedoptionalIResolvable | CfnPrivateConnection.SelfManagedPropertyself_managedoptionaltyping.Union[IResolvable, SelfManagedProperty]selfManagedoptionalIResolvableSelfManagedoptionalIResolvableSelfManagedoptionalinterface{}#
The configuration for a self-managed private connection, where you manage your own resource configuration.
serviceManagedoptionalIResolvable | CfnPrivateConnection.ServiceManagedPropertyservice_managedoptionaltyping.Union[IResolvable, ServiceManagedProperty]serviceManagedoptionalIResolvableServiceManagedoptionalIResolvableServiceManagedoptionalinterface{}#
The configuration for a service-managed private connection, where the service manages the resource gateway lifecycle.