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// LocalPeeringGateway A local peering gateway (LPG) is an object on a VCN that lets that VCN peer 20// with another VCN in the same region. *Peering* means that the two VCNs can 21// communicate using private IP addresses, but without the traffic traversing the 22// internet or routing through your on-premises network. For more information, 23// see VCN Peering (https://docs.cloud.oracle.com/Content/Network/Tasks/VCNpeering.htm). 24// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, 25// talk to an administrator. If you're an administrator who needs to write policies to give users access, see 26// Getting Started with Policies (https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). 27// **Warning:** Oracle recommends that you avoid using any confidential information when you 28// supply string values using the API. 29type LocalPeeringGateway struct { 30 31 // The OCID of the compartment containing the LPG. 32 CompartmentId *string `mandatory:"true" json:"compartmentId"` 33 34 // A user-friendly name. Does not have to be unique, and it's changeable. Avoid 35 // entering confidential information. 36 DisplayName *string `mandatory:"true" json:"displayName"` 37 38 // The LPG's Oracle ID (OCID). 39 Id *string `mandatory:"true" json:"id"` 40 41 // Whether the VCN at the other end of the peering is in a different tenancy. 42 // Example: `false` 43 IsCrossTenancyPeering *bool `mandatory:"true" json:"isCrossTenancyPeering"` 44 45 // The LPG's current lifecycle state. 46 LifecycleState LocalPeeringGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` 47 48 // Whether the LPG is peered with another LPG. `NEW` means the LPG has not yet been 49 // peered. `PENDING` means the peering is being established. `REVOKED` means the 50 // LPG at the other end of the peering has been deleted. 51 PeeringStatus LocalPeeringGatewayPeeringStatusEnum `mandatory:"true" json:"peeringStatus"` 52 53 // The date and time the LPG was created, in the format defined by RFC3339. 54 // Example: `2016-08-25T21:10:29.600Z` 55 TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` 56 57 // The OCID of the VCN the LPG belongs to. 58 VcnId *string `mandatory:"true" json:"vcnId"` 59 60 // Defined tags for this resource. Each key is predefined and scoped to a 61 // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 62 // Example: `{"Operations": {"CostCenter": "42"}}` 63 DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` 64 65 // Free-form tags for this resource. Each tag is a simple key-value pair with no 66 // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 67 // Example: `{"Department": "Finance"}` 68 FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` 69 70 // The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN 71 // at the other end of the peering from this LPG. See `peerAdvertisedCidrDetails` for 72 // the individual CIDRs. The value is `null` if the LPG is not peered. 73 // Example: `192.168.0.0/16`, or if aggregated with `172.16.0.0/24` then `128.0.0.0/1` 74 PeerAdvertisedCidr *string `mandatory:"false" json:"peerAdvertisedCidr"` 75 76 // The specific ranges of IP addresses available on or via the VCN at the other 77 // end of the peering from this LPG. The value is `null` if the LPG is not peered. 78 // You can use these as destination CIDRs for route rules to route a subnet's 79 // traffic to this LPG. 80 // Example: [`192.168.0.0/16`, `172.16.0.0/24`] 81 PeerAdvertisedCidrDetails []string `mandatory:"false" json:"peerAdvertisedCidrDetails"` 82 83 // Additional information regarding the peering status, if applicable. 84 PeeringStatusDetails *string `mandatory:"false" json:"peeringStatusDetails"` 85 86 // The OCID of the route table the LPG is using. 87 // For information about why you would associate a route table with an LPG, see 88 // Transit Routing: Access to Multiple VCNs in Same Region (https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). 89 RouteTableId *string `mandatory:"false" json:"routeTableId"` 90} 91 92func (m LocalPeeringGateway) String() string { 93 return common.PointerString(m) 94} 95 96// LocalPeeringGatewayLifecycleStateEnum Enum with underlying type: string 97type LocalPeeringGatewayLifecycleStateEnum string 98 99// Set of constants representing the allowable values for LocalPeeringGatewayLifecycleStateEnum 100const ( 101 LocalPeeringGatewayLifecycleStateProvisioning LocalPeeringGatewayLifecycleStateEnum = "PROVISIONING" 102 LocalPeeringGatewayLifecycleStateAvailable LocalPeeringGatewayLifecycleStateEnum = "AVAILABLE" 103 LocalPeeringGatewayLifecycleStateTerminating LocalPeeringGatewayLifecycleStateEnum = "TERMINATING" 104 LocalPeeringGatewayLifecycleStateTerminated LocalPeeringGatewayLifecycleStateEnum = "TERMINATED" 105) 106 107var mappingLocalPeeringGatewayLifecycleState = map[string]LocalPeeringGatewayLifecycleStateEnum{ 108 "PROVISIONING": LocalPeeringGatewayLifecycleStateProvisioning, 109 "AVAILABLE": LocalPeeringGatewayLifecycleStateAvailable, 110 "TERMINATING": LocalPeeringGatewayLifecycleStateTerminating, 111 "TERMINATED": LocalPeeringGatewayLifecycleStateTerminated, 112} 113 114// GetLocalPeeringGatewayLifecycleStateEnumValues Enumerates the set of values for LocalPeeringGatewayLifecycleStateEnum 115func GetLocalPeeringGatewayLifecycleStateEnumValues() []LocalPeeringGatewayLifecycleStateEnum { 116 values := make([]LocalPeeringGatewayLifecycleStateEnum, 0) 117 for _, v := range mappingLocalPeeringGatewayLifecycleState { 118 values = append(values, v) 119 } 120 return values 121} 122 123// LocalPeeringGatewayPeeringStatusEnum Enum with underlying type: string 124type LocalPeeringGatewayPeeringStatusEnum string 125 126// Set of constants representing the allowable values for LocalPeeringGatewayPeeringStatusEnum 127const ( 128 LocalPeeringGatewayPeeringStatusInvalid LocalPeeringGatewayPeeringStatusEnum = "INVALID" 129 LocalPeeringGatewayPeeringStatusNew LocalPeeringGatewayPeeringStatusEnum = "NEW" 130 LocalPeeringGatewayPeeringStatusPeered LocalPeeringGatewayPeeringStatusEnum = "PEERED" 131 LocalPeeringGatewayPeeringStatusPending LocalPeeringGatewayPeeringStatusEnum = "PENDING" 132 LocalPeeringGatewayPeeringStatusRevoked LocalPeeringGatewayPeeringStatusEnum = "REVOKED" 133) 134 135var mappingLocalPeeringGatewayPeeringStatus = map[string]LocalPeeringGatewayPeeringStatusEnum{ 136 "INVALID": LocalPeeringGatewayPeeringStatusInvalid, 137 "NEW": LocalPeeringGatewayPeeringStatusNew, 138 "PEERED": LocalPeeringGatewayPeeringStatusPeered, 139 "PENDING": LocalPeeringGatewayPeeringStatusPending, 140 "REVOKED": LocalPeeringGatewayPeeringStatusRevoked, 141} 142 143// GetLocalPeeringGatewayPeeringStatusEnumValues Enumerates the set of values for LocalPeeringGatewayPeeringStatusEnum 144func GetLocalPeeringGatewayPeeringStatusEnumValues() []LocalPeeringGatewayPeeringStatusEnum { 145 values := make([]LocalPeeringGatewayPeeringStatusEnum, 0) 146 for _, v := range mappingLocalPeeringGatewayPeeringStatus { 147 values = append(values, v) 148 } 149 return values 150} 151