CfnSubnetCidrReservationProps
Struct External
Properties for defining a CfnSubnetCidrReservation.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnSubnetCidrReservationProps: ec2.CfnSubnetCidrReservationProps = {
cidr: 'cidr',
reservationType: 'reservationType',
subnetId: 'subnetId',
// the properties below are optional
description: 'description',
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cfn_subnet_cidr_reservation_props = ec2.CfnSubnetCidrReservationProps(
cidr="cidr",
reservation_type="reservationType",
subnet_id="subnetId",
# the properties below are optional
description="description",
tags=[CfnTag(
key="key",
value="value"
)]
)
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.ec2.*;
CfnSubnetCidrReservationProps cfnSubnetCidrReservationProps = CfnSubnetCidrReservationProps.builder()
.cidr("cidr")
.reservationType("reservationType")
.subnetId("subnetId")
// the properties below are optional
.description("description")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.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.EC2;
var cfnSubnetCidrReservationProps = new CfnSubnetCidrReservationProps {
Cidr = "cidr",
ReservationType = "reservationType",
SubnetId = "subnetId",
// the properties below are optional
Description = "description",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
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"
cfnSubnetCidrReservationProps := &CfnSubnetCidrReservationProps{
Cidr: jsii.String("cidr"),
ReservationType: jsii.String("reservationType"),
SubnetId: jsii.String("subnetId"),
// the properties below are optional
Description: jsii.String("description"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
The IPv4 or IPv6 CIDR range to reserve.
notes
Must lie inside the subnet's CIDR block and must not overlap an existing reservation. Supply an IPv6 range exactly as the service returns it: Amazon EC2 stores an IPv6 CIDR in RFC 5952 compressed form, and a noncanonical spelling of the same range is reported as drift because this property is create-only and read back.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of the subnet CIDR reservation.
reservationTypestringreservation_typestrreservationTypeStringReservationTypestringReservationType*string required #The type of reservation.
A prefix reservation is used for an IPv6 prefix delegated to a network interface; an explicit reservation is used for a range that Amazon EC2 must not assign automatically.
The identifier of the subnet the CIDR range is reserved in.