CreateSubnetDetails¶
-
class
oci.core.models.
CreateSubnetDetails
(**kwargs)¶ Bases:
object
CreateSubnetDetails model.
Methods
__init__
(**kwargs)Initializes a new CreateSubnetDetails object with values from keyword arguments. Attributes
availability_domain
Gets the availability_domain of this CreateSubnetDetails. cidr_block
[Required] Gets the cidr_block of this CreateSubnetDetails. compartment_id
[Required] Gets the compartment_id of this CreateSubnetDetails. defined_tags
Gets the defined_tags of this CreateSubnetDetails. dhcp_options_id
Gets the dhcp_options_id of this CreateSubnetDetails. display_name
Gets the display_name of this CreateSubnetDetails. dns_label
Gets the dns_label of this CreateSubnetDetails. freeform_tags
Gets the freeform_tags of this CreateSubnetDetails. ipv6_cidr_block
Gets the ipv6_cidr_block of this CreateSubnetDetails. ipv6_cidr_blocks
Gets the ipv6_cidr_blocks of this CreateSubnetDetails. prohibit_internet_ingress
Gets the prohibit_internet_ingress of this CreateSubnetDetails. prohibit_public_ip_on_vnic
Gets the prohibit_public_ip_on_vnic of this CreateSubnetDetails. route_table_id
Gets the route_table_id of this CreateSubnetDetails. security_list_ids
Gets the security_list_ids of this CreateSubnetDetails. vcn_id
[Required] Gets the vcn_id of this CreateSubnetDetails. -
__init__
(**kwargs)¶ Initializes a new CreateSubnetDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - availability_domain (str) – The value to assign to the availability_domain property of this CreateSubnetDetails.
- cidr_block (str) – The value to assign to the cidr_block property of this CreateSubnetDetails.
- compartment_id (str) – The value to assign to the compartment_id property of this CreateSubnetDetails.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateSubnetDetails.
- dhcp_options_id (str) – The value to assign to the dhcp_options_id property of this CreateSubnetDetails.
- display_name (str) – The value to assign to the display_name property of this CreateSubnetDetails.
- dns_label (str) – The value to assign to the dns_label property of this CreateSubnetDetails.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateSubnetDetails.
- ipv6_cidr_block (str) – The value to assign to the ipv6_cidr_block property of this CreateSubnetDetails.
- ipv6_cidr_blocks (list[str]) – The value to assign to the ipv6_cidr_blocks property of this CreateSubnetDetails.
- prohibit_internet_ingress (bool) – The value to assign to the prohibit_internet_ingress property of this CreateSubnetDetails.
- prohibit_public_ip_on_vnic (bool) – The value to assign to the prohibit_public_ip_on_vnic property of this CreateSubnetDetails.
- route_table_id (str) – The value to assign to the route_table_id property of this CreateSubnetDetails.
- security_list_ids (list[str]) – The value to assign to the security_list_ids property of this CreateSubnetDetails.
- vcn_id (str) – The value to assign to the vcn_id property of this CreateSubnetDetails.
-
availability_domain
¶ Gets the availability_domain of this CreateSubnetDetails. Controls whether the subnet is regional or specific to an availability domain. Oracle recommends creating regional subnets because they’re more flexible and make it easier to implement failover across availability domains. Originally, AD-specific subnets were the only kind available to use.
To create a regional subnet, omit this attribute. Then any resources later created in this subnet (such as a Compute instance) can be created in any availability domain in the region.
To instead create an AD-specific subnet, set this attribute to the availability domain you want this subnet to be in. Then any resources later created in this subnet can only be created in that availability domain.
Example: Uocm:PHX-AD-1
Returns: The availability_domain of this CreateSubnetDetails. Return type: str
-
cidr_block
¶ [Required] Gets the cidr_block of this CreateSubnetDetails. The CIDR IP address range of the subnet. The CIDR must maintain the following rules -
- The CIDR block is valid and correctly formatted.
- The new range is within one of the parent VCN ranges.
Example: 10.0.1.0/24
Returns: The cidr_block of this CreateSubnetDetails. Return type: str
-
compartment_id
¶ [Required] Gets the compartment_id of this CreateSubnetDetails. The OCID of the compartment to contain the subnet.
Returns: The compartment_id of this CreateSubnetDetails. Return type: str
Gets the defined_tags of this CreateSubnetDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {“Operations”: {“CostCenter”: “42”}}
Returns: The defined_tags of this CreateSubnetDetails. Return type: dict(str, dict(str, object))
-
dhcp_options_id
¶ Gets the dhcp_options_id of this CreateSubnetDetails. The OCID of the set of DHCP options the subnet will use. If you don’t provide a value, the subnet uses the VCN’s default set of DHCP options.
Returns: The dhcp_options_id of this CreateSubnetDetails. Return type: str
-
display_name
¶ Gets the display_name of this CreateSubnetDetails. A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
Returns: The display_name of this CreateSubnetDetails. Return type: str
-
dns_label
¶ Gets the dns_label of this CreateSubnetDetails. A DNS label for the subnet, used in conjunction with the VNIC’s hostname and VCN’s DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed.
This value must be set if you want to use the Internet and VCN Resolver to resolve the hostnames of instances in the subnet. It can only be set if the VCN itself was created with a DNS label.
For more information, see DNS in Your Virtual Cloud Network.
Example: subnet123
Returns: The dns_label of this CreateSubnetDetails. Return type: str
Gets the freeform_tags of this CreateSubnetDetails. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {“Department”: “Finance”}
Returns: The freeform_tags of this CreateSubnetDetails. Return type: dict(str, str)
-
ipv6_cidr_block
¶ Gets the ipv6_cidr_block of this CreateSubnetDetails. Use this to enable IPv6 addressing for this subnet. The VCN must be enabled for IPv6. You can’t change this subnet characteristic later. All subnets are /64 in size. The subnet portion of the IPv6 address is the fourth hextet from the left (1111 in the following example).
For important details about IPv6 addressing in a VCN, see IPv6 Addresses.
Example: 2001:0db8:0123:1111::/64
Returns: The ipv6_cidr_block of this CreateSubnetDetails. Return type: str
-
ipv6_cidr_blocks
¶ Gets the ipv6_cidr_blocks of this CreateSubnetDetails. The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet that meets the following criteria: - The prefixes must be valid. - Multiple prefixes must not overlap each other or the on-premises network prefix. - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a subnet.
Returns: The ipv6_cidr_blocks of this CreateSubnetDetails. Return type: list[str]
-
prohibit_internet_ingress
¶ Gets the prohibit_internet_ingress of this CreateSubnetDetails. Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
For IPv6, if prohibitInternetIngress is set to true, internet access is not allowed for any IPv6s assigned to VNICs in the subnet. Otherwise, ingress internet traffic is allowed by default.
prohibitPublicIpOnVnic will be set to the value of prohibitInternetIngress to dictate IPv4 behavior in this subnet. Only one or the other flag should be specified.
Example: true
Returns: The prohibit_internet_ingress of this CreateSubnetDetails. Return type: bool
-
prohibit_public_ip_on_vnic
¶ Gets the prohibit_public_ip_on_vnic of this CreateSubnetDetails. Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the assignPublicIp flag in
CreateVnicDetails
). If prohibitPublicIpOnVnic is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it’s a private subnet).If you intend to use an IPv6 prefix, you should use the flag prohibitInternetIngress to specify ingress internet traffic behavior of the subnet.
Example: true
Returns: The prohibit_public_ip_on_vnic of this CreateSubnetDetails. Return type: bool
-
route_table_id
¶ Gets the route_table_id of this CreateSubnetDetails. The OCID of the route table the subnet will use. If you don’t provide a value, the subnet uses the VCN’s default route table.
Returns: The route_table_id of this CreateSubnetDetails. Return type: str
-
security_list_ids
¶ Gets the security_list_ids of this CreateSubnetDetails. The OCIDs of the security list or lists the subnet will use. If you don’t provide a value, the subnet uses the VCN’s default security list. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
Returns: The security_list_ids of this CreateSubnetDetails. Return type: list[str]
-