1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2// Code generated. DO NOT EDIT.
3
4// Core Services API
5//
6// API covering the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm),
7// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and
8// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. Use this API
9// to manage resources such as virtual cloud networks (VCNs), compute instances, and
10// block storage volumes.
11//
12
13package core
14
15import (
16	"github.com/oracle/oci-go-sdk/common"
17)
18
19// CreateVnicDetails Contains properties for a VNIC. You use this object when creating the
20// primary VNIC during instance launch or when creating a secondary VNIC.
21// For more information about VNICs, see
22// Virtual Network Interface Cards (VNICs) (https://docs.cloud.oracle.com/Content/Network/Tasks/managingVNICs.htm).
23type CreateVnicDetails struct {
24
25	// The OCID of the subnet to create the VNIC in. When launching an instance,
26	// use this `subnetId` instead of the deprecated `subnetId` in
27	// LaunchInstanceDetails.
28	// At least one of them is required; if you provide both, the values must match.
29	SubnetId *string `mandatory:"true" json:"subnetId"`
30
31	// Whether the VNIC should be assigned a public IP address. Defaults to whether
32	// the subnet is public or private. If not set and the VNIC is being created
33	// in a private subnet (that is, where `prohibitPublicIpOnVnic` = true in the
34	// Subnet), then no public IP address is assigned.
35	// If not set and the subnet is public (`prohibitPublicIpOnVnic` = false), then
36	// a public IP address is assigned. If set to true and
37	// `prohibitPublicIpOnVnic` = true, an error is returned.
38	// **Note:** This public IP address is associated with the primary private IP
39	// on the VNIC. For more information, see
40	// IP Addresses (https://docs.cloud.oracle.com/Content/Network/Tasks/managingIPaddresses.htm).
41	// **Note:** There's a limit to the number of PublicIp
42	// a VNIC or instance can have. If you try to create a secondary VNIC
43	// with an assigned public IP for an instance that has already
44	// reached its public IP limit, an error is returned. For information
45	// about the public IP limits, see
46	// Public IP Addresses (https://docs.cloud.oracle.com/Content/Network/Tasks/managingpublicIPs.htm).
47	// Example: `false`
48	AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"`
49
50	// Defined tags for this resource. Each key is predefined and scoped to a
51	// namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
52	// Example: `{"Operations": {"CostCenter": "42"}}`
53	DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
54
55	// A user-friendly name for the VNIC. Does not have to be unique.
56	// Avoid entering confidential information.
57	DisplayName *string `mandatory:"false" json:"displayName"`
58
59	// Free-form tags for this resource. Each tag is a simple key-value pair with no
60	// predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
61	// Example: `{"Department": "Finance"}`
62	FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
63
64	// The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname
65	// portion of the primary private IP's fully qualified domain name (FQDN)
66	// (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`).
67	// Must be unique across all VNICs in the subnet and comply with
68	// RFC 952 (https://tools.ietf.org/html/rfc952) and
69	// RFC 1123 (https://tools.ietf.org/html/rfc1123).
70	// The value appears in the Vnic object and also the
71	// PrivateIp object returned by
72	// ListPrivateIps and
73	// GetPrivateIp.
74	// For more information, see
75	// DNS in Your Virtual Cloud Network (https://docs.cloud.oracle.com/Content/Network/Concepts/dns.htm).
76	// When launching an instance, use this `hostnameLabel` instead
77	// of the deprecated `hostnameLabel` in
78	// LaunchInstanceDetails.
79	// If you provide both, the values must match.
80	// Example: `bminstance-1`
81	HostnameLabel *string `mandatory:"false" json:"hostnameLabel"`
82
83	// A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more
84	// information about NSGs, see
85	// NetworkSecurityGroup.
86	NsgIds []string `mandatory:"false" json:"nsgIds"`
87
88	// A private IP address of your choice to assign to the VNIC. Must be an
89	// available IP address within the subnet's CIDR. If you don't specify a
90	// value, Oracle automatically assigns a private IP address from the subnet.
91	// This is the VNIC's *primary* private IP address. The value appears in
92	// the Vnic object and also the
93	// PrivateIp object returned by
94	// ListPrivateIps and
95	// GetPrivateIp.
96	// Example: `10.0.3.3`
97	PrivateIp *string `mandatory:"false" json:"privateIp"`
98
99	// Whether the source/destination check is disabled on the VNIC.
100	// Defaults to `false`, which means the check is performed. For information
101	// about why you would skip the source/destination check, see
102	// Using a Private IP as a Route Target (https://docs.cloud.oracle.com/Content/Network/Tasks/managingroutetables.htm#privateip).
103	// Example: `true`
104	SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"`
105}
106
107func (m CreateVnicDetails) String() string {
108	return common.PointerString(m)
109}
110