From bc848a8a59b995b3b81790ece9e6c61b6ac6aba8 Mon Sep 17 00:00:00 2001 From: Jason Yin Date: Thu, 17 May 2018 12:59:46 -0700 Subject: [PATCH] Releasing version 1 5 0 (#110) thanks for review --- CHANGELOG.md | 8 ++ Makefile | 7 ++ common/auth/federation_client.go | 6 +- common/configuration.go | 23 +++++- common/configuration_test.go | 79 +++++++++++++++++++- common/http.go | 25 +++++-- common/http_test.go | 18 +++-- common/version.go | 2 +- core/core_compute_client.go | 6 +- core/core_virtualnetwork_client.go | 12 +-- core/cpe.go | 11 +++ core/create_cpe_details.go | 11 +++ core/create_drg_details.go | 11 +++ core/create_internet_gateway_details.go | 11 +++ core/create_ip_sec_connection_details.go | 11 +++ core/create_local_peering_gateway_details.go | 11 +++ core/create_public_ip_details.go | 11 +++ core/create_vnic_details.go | 11 +++ core/drg.go | 11 +++ core/internet_gateway.go | 11 +++ core/ip_sec_connection.go | 11 +++ core/launch_options.go | 38 ++++++---- core/local_peering_gateway.go | 11 +++ core/public_ip.go | 11 +++ core/update_cpe_details.go | 11 +++ core/update_drg_details.go | 11 +++ core/update_internet_gateway_details.go | 11 +++ core/update_ip_sec_connection_details.go | 11 +++ core/update_local_peering_gateway_details.go | 11 +++ core/update_public_ip_details.go | 11 +++ core/update_vnic_details.go | 11 +++ core/vnic.go | 11 +++ filestorage/export.go | 11 +-- filestorage/file_system_summary.go | 3 +- filestorage/filestorage_client.go | 5 +- filestorage/list_exports_request_response.go | 2 +- 36 files changed, 415 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fe979b98a..9391db5967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 1.5.0 - 2018-05-17 +### Added +- Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service +- Support for the ability to optionally specify a compartment filter when listing exports in the File Storage service +- Support for tagging virtual cloud network resources in the Networking service +- Support for specifying the PARAVIRTUALIZED remote volume type when creating a virtual image or launching a new instance in the Compute service +- Support for tilde in private key path in configuration files + ## 1.4.0 - 2018-05-03 ### Added - Support for ``event_name`` in Audit Service diff --git a/Makefile b/Makefile index 6380962262..4b93ba0cab 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,13 @@ $(TARGETS_CLEAN): clean-%:% @echo "cleaning $<" @-rm -rf $< +# clean all generated code under GEN_TARGETS folder +clean-generate: + for target in ${GEN_TARGETS}; do \ + echo "cleaning $$target"; \ + rm -rf $$target; \ + done + pre-doc: @echo "Rendering doc server to ${DOC_SERVER_URL}" find . -name \*.go |xargs sed -i '' 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL}/g' diff --git a/common/auth/federation_client.go b/common/auth/federation_client.go index f15aff82d3..1aa258e838 100644 --- a/common/auth/federation_client.go +++ b/common/auth/federation_client.go @@ -53,7 +53,11 @@ var ( func newAuthClient(region common.Region, provider common.KeyProvider) *common.BaseClient { signer := common.RequestSigner(provider, genericHeaders, bodyHeaders) client := common.DefaultBaseClientWithSigner(signer) - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "auth", string(region)) + if region == common.RegionSEA { + client.Host = "https://auth.r1.oracleiaas.com" + } else { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "auth", string(region)) + } client.BasePath = "v1/x509" return &client } diff --git a/common/configuration.go b/common/configuration.go index 3681dac09d..2e4c92b641 100644 --- a/common/configuration.go +++ b/common/configuration.go @@ -8,6 +8,7 @@ import ( "fmt" "io/ioutil" "os" + "path" "regexp" "strings" ) @@ -120,7 +121,8 @@ func (p environmentConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, return nil, fmt.Errorf("can not read PrivateKey from env variable: %s", environmentVariable) } - pemFileContent, err := ioutil.ReadFile(value) + expandedPath := expandPath(value) + pemFileContent, err := ioutil.ReadFile(expandedPath) if err != nil { Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable) return @@ -303,8 +305,21 @@ func parseConfigAtLine(start int, content []string) (info *configFileInfo, err e } +// cleans and expands the path if it contains a tilde , returns the expanded path or the input path as is if not expansion +// was performed +func expandPath(filepath string) (expandedPath string) { + cleanedPath := path.Clean(filepath) + expandedPath = cleanedPath + if strings.HasPrefix(cleanedPath, "~/") { + rest := cleanedPath[2:] + expandedPath = path.Join(getHomeFolder(), rest) + } + return +} + func openConfigFile(configFilePath string) (data []byte, err error) { - data, err = ioutil.ReadFile(configFilePath) + expandedPath := expandPath(configFilePath) + data, err = ioutil.ReadFile(expandedPath) if err != nil { err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error()) } @@ -395,7 +410,9 @@ func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err err if err != nil { return } - pemFileContent, err := ioutil.ReadFile(filePath) + + expandedPath := expandPath(filePath) + pemFileContent, err := ioutil.ReadFile(expandedPath) if err != nil { err = fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error()) return diff --git a/common/configuration_test.go b/common/configuration_test.go index e7457634d4..f175770b12 100644 --- a/common/configuration_test.go +++ b/common/configuration_test.go @@ -9,6 +9,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + "path" + "strings" ) var ( @@ -65,10 +67,8 @@ ufFtnLEj/5G9a8A//MFrXsXePUeBDEzjtEcjPGNxe0ZkuOgYx11Zc0R4oLI7LoHO testKeyPassphrase = "goisfun" ) -func removeFileFn(filename string) func() { - return func() { - os.Remove(filename) - } +func removeFileFn(filename string) { + os.Remove(filename) } func writeTempFile(data string) (filename string) { @@ -651,3 +651,74 @@ region=someregion assert.NoError(t, err) assert.NotNil(t, key) } + +func TestConfigurationWithTilde(t *testing.T) { + dataTpl := `[DEFAULT] +user=someuser +fingerprint=somefingerprint +key_file=%s +tenancy=sometenancy +compartment = somecompartment +region=someregion +` + + tmpKeyLocation := path.Join(getHomeFolder(), "testKey") + e := ioutil.WriteFile(tmpKeyLocation, []byte(testEncryptedPrivateKeyConf), 777) + if e != nil { + assert.FailNow(t, e.Error()) + } + + newlocation := strings.Replace(tmpKeyLocation, getHomeFolder(), "~/", 1) + data := fmt.Sprintf(dataTpl, newlocation) + tmpConfFile := writeTempFile(data) + + defer removeFileFn(tmpConfFile) + defer removeFileFn(tmpKeyLocation) + + provider, err := ConfigurationProviderFromFile(tmpConfFile, testKeyPassphrase) + assert.NoError(t, err) + ok, err := IsConfigurationProviderValid(provider) + assert.NoError(t, err) + assert.True(t, ok) + + fns := []func() (string, error){provider.TenancyOCID, provider.UserOCID, provider.KeyFingerprint} + + for _, fn := range fns { + val, e := fn() + assert.NoError(t, e) + assert.NotEmpty(t, val) + } + + key, err := provider.PrivateRSAKey() + assert.NoError(t, err) + assert.NotNil(t, key) +} + +func TestExpandPath(t *testing.T) { + home := getHomeFolder() + testIO := []struct { + name, inPath, expectedPath string + }{ + { + name: "should expand tilde and return appended home dir", + inPath: "~/somepath", + expectedPath: path.Join(home, "somepath"), + }, + { + name: "should not do anything", + inPath: "/somepath/some/dir/~/file", + expectedPath: "/somepath/some/dir/~/file", + }, + { + name: "should replace one tilde only", + inPath: "~/~/some/path", + expectedPath: path.Join(home, "~/some/path"), + }, + } + for _, tio := range testIO { + t.Run(tio.name, func(t *testing.T) { + p := expandPath(tio.inPath) + assert.Equal(t, tio.expectedPath, p) + }) + } +} diff --git a/common/http.go b/common/http.go index e19da81763..4ed754478e 100644 --- a/common/http.go +++ b/common/http.go @@ -274,22 +274,23 @@ func addToQuery(request *http.Request, value reflect.Value, field reflect.Struct } encoding := strings.ToLower(field.Tag.Get("collectionFormat")) + var collectionFormatStringValues []string switch encoding { - case "csv": + case "csv", "multi": if value.Kind() != reflect.Slice && value.Kind() != reflect.Array { - e = fmt.Errorf("query paramater is tagged as csv yet its type is neither an Array nor a Slice: %s", field.Name) + e = fmt.Errorf("query parameter is tagged as csv or multi yet its type is neither an Array nor a Slice: %s", field.Name) break } numOfElements := value.Len() - stringValues := make([]string, numOfElements) + collectionFormatStringValues = make([]string, numOfElements) for i := 0; i < numOfElements; i++ { - stringValues[i], e = toStringValue(value.Index(i), field) + collectionFormatStringValues[i], e = toStringValue(value.Index(i), field) if e != nil { break } } - queryParameterValue = strings.Join(stringValues, ",") + queryParameterValue = strings.Join(collectionFormatStringValues, ",") case "": queryParameterValue, e = toStringValue(value, field) default: @@ -305,18 +306,28 @@ func addToQuery(request *http.Request, value reflect.Value, field reflect.Struct if omitEmpty, present := field.Tag.Lookup("omitEmpty"); present { omitEmptyBool, _ := strconv.ParseBool(strings.ToLower(omitEmpty)) if queryParameterValue != "" || !omitEmptyBool { - query.Set(queryParameterName, queryParameterValue) + addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues) } else { Debugf("Omitting %s, is empty and omitEmpty tag is set", field.Name) } } else { - query.Set(queryParameterName, queryParameterValue) + addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues) } request.URL.RawQuery = query.Encode() return } +func addToQueryForEncoding(query *url.Values, encoding string, queryParameterName string, queryParameterValue string, collectionFormatStringValues []string) { + if encoding == "multi" { + for _, stringValue := range collectionFormatStringValues { + query.Add(queryParameterName, stringValue) + } + } else { + query.Set(queryParameterName, queryParameterValue) + } +} + // Adds to the path of the url in the order they appear in the structure func addToPath(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { var additionalURLPathPart string diff --git a/common/http_test.go b/common/http_test.go index d05718934c..db9f117eb1 100644 --- a/common/http_test.go +++ b/common/http_test.go @@ -176,15 +176,16 @@ func TestHttpMarshalerAll(t *testing.T) { includes := []inc{inc("One"), inc("Two")} s := struct { - ID string `contributesTo:"path"` - Name string `contributesTo:"query" name:"name"` - When *SDKTime `contributesTo:"query" name:"when"` - Income float32 `contributesTo:"query" name:"income"` - Include []inc `contributesTo:"query" name:"includes" collectionFormat:"csv"` - Male bool `contributesTo:"header" name:"male"` - Details TestupdateUserDetails `contributesTo:"body"` + ID string `contributesTo:"path"` + Name string `contributesTo:"query" name:"name"` + When *SDKTime `contributesTo:"query" name:"when"` + Income float32 `contributesTo:"query" name:"income"` + Include []inc `contributesTo:"query" name:"includes" collectionFormat:"csv"` + IncludeMulti []inc `contributesTo:"query" name:"includesMulti" collectionFormat:"multi"` + Male bool `contributesTo:"header" name:"male"` + Details TestupdateUserDetails `contributesTo:"body"` }{ - "101", "tapir", now(), 3.23, includes, true, TestupdateUserDetails{Description: desc}, + "101", "tapir", now(), 3.23, includes, includes, true, TestupdateUserDetails{Description: desc}, } request := MakeDefaultHTTPRequest(http.MethodPost, "/") e := HTTPRequestMarshaller(s, &request) @@ -198,6 +199,7 @@ func TestHttpMarshalerAll(t *testing.T) { assert.True(t, request.URL.Query().Get("income") == strconv.FormatFloat(float64(s.Income), 'f', 6, 32)) assert.True(t, request.URL.Query().Get("when") == when) assert.True(t, request.URL.Query().Get("includes") == "One,Two") + assert.True(t, reflect.DeepEqual(request.URL.Query()["includesMulti"], []string{"One", "Two"})) assert.Contains(t, content, "description") assert.Equal(t, request.Header.Get(requestHeaderContentType), "application/json") if val, ok := content["description"]; !ok || val != desc { diff --git a/common/version.go b/common/version.go index 38e4aceebe..ae426eb12c 100644 --- a/common/version.go +++ b/common/version.go @@ -11,7 +11,7 @@ import ( const ( major = "1" - minor = "4" + minor = "5" patch = "0" tag = "" ) diff --git a/core/core_compute_client.go b/core/core_compute_client.go index b7b680c54a..f311668ce0 100644 --- a/core/core_compute_client.go +++ b/core/core_compute_client.go @@ -980,11 +980,7 @@ func (client ComputeClient) getWindowsInstanceInitialCredentials(ctx context.Con // **stop** - power off // **softreset** - ACPI shutdown and power on // **reset** - power off and power on -// Note that the **stop** state has no effect on the resources you consume. -// Billing continues for instances that you stop, and related resources continue -// to apply against any relevant quotas. You must terminate an instance -// (TerminateInstance) -// to remove its resources from billing and quotas. +// For more information see Stopping and Starting an Instance (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/restartinginstance.htm). func (client ComputeClient) InstanceAction(ctx context.Context, request InstanceActionRequest) (response InstanceActionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() diff --git a/core/core_virtualnetwork_client.go b/core/core_virtualnetwork_client.go index 46a8174440..d4cbff1062 100644 --- a/core/core_virtualnetwork_client.go +++ b/core/core_virtualnetwork_client.go @@ -3774,7 +3774,7 @@ func (client VirtualNetworkClient) listVirtualCircuits(ctx context.Context, requ return response, err } -// UpdateCpe Updates the specified CPE's display name. +// UpdateCpe Updates the specified CPE's display name or tags. // Avoid entering confidential information. func (client VirtualNetworkClient) UpdateCpe(ctx context.Context, request UpdateCpeRequest) (response UpdateCpeResponse, err error) { var ociResponse common.OCIResponse @@ -3934,7 +3934,7 @@ func (client VirtualNetworkClient) updateDhcpOptions(ctx context.Context, reques return response, err } -// UpdateDrg Updates the specified DRG's display name. Avoid entering confidential information. +// UpdateDrg Updates the specified DRG's display name or tags. Avoid entering confidential information. func (client VirtualNetworkClient) UpdateDrg(ctx context.Context, request UpdateDrgRequest) (response UpdateDrgResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() @@ -4013,7 +4013,7 @@ func (client VirtualNetworkClient) updateDrgAttachment(ctx context.Context, requ return response, err } -// UpdateIPSecConnection Updates the display name for the specified IPSec connection. +// UpdateIPSecConnection Updates the display name or tags for the specified IPSec connection. // Avoid entering confidential information. func (client VirtualNetworkClient) UpdateIPSecConnection(ctx context.Context, request UpdateIPSecConnectionRequest) (response UpdateIPSecConnectionResponse, err error) { var ociResponse common.OCIResponse @@ -4053,8 +4053,8 @@ func (client VirtualNetworkClient) updateIPSecConnection(ctx context.Context, re return response, err } -// UpdateInternetGateway Updates the specified Internet Gateway. You can disable/enable it, or change its display name. -// Avoid entering confidential information. +// UpdateInternetGateway Updates the specified Internet Gateway. You can disable/enable it, or change its display name +// or tags. Avoid entering confidential information. // If the gateway is disabled, that means no traffic will flow to/from the internet even if there's // a route rule that enables that traffic. func (client VirtualNetworkClient) UpdateInternetGateway(ctx context.Context, request UpdateInternetGatewayRequest) (response UpdateInternetGatewayResponse, err error) { @@ -4185,7 +4185,7 @@ func (client VirtualNetworkClient) updatePrivateIp(ctx context.Context, request // * Move a reserved public IP to a different private IP. // * Unassign a reserved public IP from a private IP (which returns it to your pool // of reserved public IPs). -// * Change the display name for a public IP. +// * Change the display name or tags for a public IP. // Assigning, moving, and unassigning a reserved public IP are asynchronous // operations. Poll the public IP's `lifecycleState` to determine if the operation // succeeded. diff --git a/core/cpe.go b/core/cpe.go index 9759c8cbff..71e74a4846 100644 --- a/core/cpe.go +++ b/core/cpe.go @@ -31,10 +31,21 @@ type Cpe struct { // The public IP address of the on-premises router. IpAddress *string `mandatory:"true" json:"ipAddress"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the CPE was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/core/create_cpe_details.go b/core/create_cpe_details.go index 0dff34734b..fba20b88d5 100644 --- a/core/create_cpe_details.go +++ b/core/create_cpe_details.go @@ -22,8 +22,19 @@ type CreateCpeDetails struct { // Example: `143.19.23.16` IpAddress *string `mandatory:"true" json:"ipAddress"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateCpeDetails) String() string { diff --git a/core/create_drg_details.go b/core/create_drg_details.go index a4a7d6f65a..2ed622d88a 100644 --- a/core/create_drg_details.go +++ b/core/create_drg_details.go @@ -18,8 +18,19 @@ type CreateDrgDetails struct { // The OCID of the compartment to contain the DRG. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateDrgDetails) String() string { diff --git a/core/create_internet_gateway_details.go b/core/create_internet_gateway_details.go index df49670c67..f936a13512 100644 --- a/core/create_internet_gateway_details.go +++ b/core/create_internet_gateway_details.go @@ -24,8 +24,19 @@ type CreateInternetGatewayDetails struct { // The OCID of the VCN the Internet Gateway is attached to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateInternetGatewayDetails) String() string { diff --git a/core/create_ip_sec_connection_details.go b/core/create_ip_sec_connection_details.go index 31cf23fa82..969352b0ae 100644 --- a/core/create_ip_sec_connection_details.go +++ b/core/create_ip_sec_connection_details.go @@ -29,8 +29,19 @@ type CreateIpSecConnectionDetails struct { // Example: `10.0.1.0/24` StaticRoutes []string `mandatory:"true" json:"staticRoutes"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateIpSecConnectionDetails) String() string { diff --git a/core/create_local_peering_gateway_details.go b/core/create_local_peering_gateway_details.go index 6e0b454396..aa5d056e9b 100644 --- a/core/create_local_peering_gateway_details.go +++ b/core/create_local_peering_gateway_details.go @@ -21,9 +21,20 @@ type CreateLocalPeeringGatewayDetails struct { // The OCID of the VCN the LPG belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m CreateLocalPeeringGatewayDetails) String() string { diff --git a/core/create_public_ip_details.go b/core/create_public_ip_details.go index 31600cc95d..c86ec67e90 100644 --- a/core/create_public_ip_details.go +++ b/core/create_public_ip_details.go @@ -24,10 +24,21 @@ type CreatePublicIpDetails struct { // Public IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). Lifetime CreatePublicIpDetailsLifetimeEnum `mandatory:"true" json:"lifetime"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The OCID of the private IP to assign the public IP to. // Required for an ephemeral public IP because it must always be assigned to a private IP // (specifically a *primary* private IP). diff --git a/core/create_vnic_details.go b/core/create_vnic_details.go index d652d4c935..a3b7d5b471 100644 --- a/core/create_vnic_details.go +++ b/core/create_vnic_details.go @@ -43,10 +43,21 @@ type CreateVnicDetails struct { // Example: `false` AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name for the VNIC. Does not have to be unique. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname // portion of the primary private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/core/drg.go b/core/drg.go index b87673bbab..224faec55a 100644 --- a/core/drg.go +++ b/core/drg.go @@ -31,10 +31,21 @@ type Drg struct { // The DRG's current state. LifecycleState DrgLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the DRG was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/core/internet_gateway.go b/core/internet_gateway.go index a9b8f1c0b0..062cb0ac8d 100644 --- a/core/internet_gateway.go +++ b/core/internet_gateway.go @@ -32,10 +32,21 @@ type InternetGateway struct { // The OCID of the VCN the Internet Gateway belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Whether the gateway is enabled. When the gateway is disabled, traffic is not // routed to/from the Internet, regardless of route rules. IsEnabled *bool `mandatory:"false" json:"isEnabled"` diff --git a/core/ip_sec_connection.go b/core/ip_sec_connection.go index c57e745591..db9e71f2df 100644 --- a/core/ip_sec_connection.go +++ b/core/ip_sec_connection.go @@ -41,10 +41,21 @@ type IpSecConnection struct { // Example: `10.0.1.0/24` StaticRoutes []string `mandatory:"true" json:"staticRoutes"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The date and time the IPSec connection was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/core/launch_options.go b/core/launch_options.go index c842a7c12a..267a591b9d 100644 --- a/core/launch_options.go +++ b/core/launch_options.go @@ -22,6 +22,7 @@ type LaunchOptions struct { // * `IDE` - Emulated IDE disk. // * `VFIO` - Direct attached Virtual Function storage. This is the default option for Local data // volumes on Oracle provided images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. BootVolumeType LaunchOptionsBootVolumeTypeEnum `mandatory:"true" json:"bootVolumeType"` // Firmware used to boot VM. Select the option that matches your operating system. @@ -43,6 +44,7 @@ type LaunchOptions struct { // * `IDE` - Emulated IDE disk. // * `VFIO` - Direct attached Virtual Function storage. This is the default option for Local data // volumes on Oracle provided images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. RemoteDataVolumeType LaunchOptionsRemoteDataVolumeTypeEnum `mandatory:"true" json:"remoteDataVolumeType"` } @@ -55,17 +57,19 @@ type LaunchOptionsBootVolumeTypeEnum string // Set of constants representing the allowable values for LaunchOptionsBootVolumeType const ( - LaunchOptionsBootVolumeTypeIscsi LaunchOptionsBootVolumeTypeEnum = "ISCSI" - LaunchOptionsBootVolumeTypeScsi LaunchOptionsBootVolumeTypeEnum = "SCSI" - LaunchOptionsBootVolumeTypeIde LaunchOptionsBootVolumeTypeEnum = "IDE" - LaunchOptionsBootVolumeTypeVfio LaunchOptionsBootVolumeTypeEnum = "VFIO" + LaunchOptionsBootVolumeTypeIscsi LaunchOptionsBootVolumeTypeEnum = "ISCSI" + LaunchOptionsBootVolumeTypeScsi LaunchOptionsBootVolumeTypeEnum = "SCSI" + LaunchOptionsBootVolumeTypeIde LaunchOptionsBootVolumeTypeEnum = "IDE" + LaunchOptionsBootVolumeTypeVfio LaunchOptionsBootVolumeTypeEnum = "VFIO" + LaunchOptionsBootVolumeTypeParavirtualized LaunchOptionsBootVolumeTypeEnum = "PARAVIRTUALIZED" ) var mappingLaunchOptionsBootVolumeType = map[string]LaunchOptionsBootVolumeTypeEnum{ - "ISCSI": LaunchOptionsBootVolumeTypeIscsi, - "SCSI": LaunchOptionsBootVolumeTypeScsi, - "IDE": LaunchOptionsBootVolumeTypeIde, - "VFIO": LaunchOptionsBootVolumeTypeVfio, + "ISCSI": LaunchOptionsBootVolumeTypeIscsi, + "SCSI": LaunchOptionsBootVolumeTypeScsi, + "IDE": LaunchOptionsBootVolumeTypeIde, + "VFIO": LaunchOptionsBootVolumeTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsBootVolumeTypeParavirtualized, } // GetLaunchOptionsBootVolumeTypeEnumValues Enumerates the set of values for LaunchOptionsBootVolumeType @@ -128,17 +132,19 @@ type LaunchOptionsRemoteDataVolumeTypeEnum string // Set of constants representing the allowable values for LaunchOptionsRemoteDataVolumeType const ( - LaunchOptionsRemoteDataVolumeTypeIscsi LaunchOptionsRemoteDataVolumeTypeEnum = "ISCSI" - LaunchOptionsRemoteDataVolumeTypeScsi LaunchOptionsRemoteDataVolumeTypeEnum = "SCSI" - LaunchOptionsRemoteDataVolumeTypeIde LaunchOptionsRemoteDataVolumeTypeEnum = "IDE" - LaunchOptionsRemoteDataVolumeTypeVfio LaunchOptionsRemoteDataVolumeTypeEnum = "VFIO" + LaunchOptionsRemoteDataVolumeTypeIscsi LaunchOptionsRemoteDataVolumeTypeEnum = "ISCSI" + LaunchOptionsRemoteDataVolumeTypeScsi LaunchOptionsRemoteDataVolumeTypeEnum = "SCSI" + LaunchOptionsRemoteDataVolumeTypeIde LaunchOptionsRemoteDataVolumeTypeEnum = "IDE" + LaunchOptionsRemoteDataVolumeTypeVfio LaunchOptionsRemoteDataVolumeTypeEnum = "VFIO" + LaunchOptionsRemoteDataVolumeTypeParavirtualized LaunchOptionsRemoteDataVolumeTypeEnum = "PARAVIRTUALIZED" ) var mappingLaunchOptionsRemoteDataVolumeType = map[string]LaunchOptionsRemoteDataVolumeTypeEnum{ - "ISCSI": LaunchOptionsRemoteDataVolumeTypeIscsi, - "SCSI": LaunchOptionsRemoteDataVolumeTypeScsi, - "IDE": LaunchOptionsRemoteDataVolumeTypeIde, - "VFIO": LaunchOptionsRemoteDataVolumeTypeVfio, + "ISCSI": LaunchOptionsRemoteDataVolumeTypeIscsi, + "SCSI": LaunchOptionsRemoteDataVolumeTypeScsi, + "IDE": LaunchOptionsRemoteDataVolumeTypeIde, + "VFIO": LaunchOptionsRemoteDataVolumeTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsRemoteDataVolumeTypeParavirtualized, } // GetLaunchOptionsRemoteDataVolumeTypeEnumValues Enumerates the set of values for LaunchOptionsRemoteDataVolumeType diff --git a/core/local_peering_gateway.go b/core/local_peering_gateway.go index 61242c6672..0f6417ef34 100644 --- a/core/local_peering_gateway.go +++ b/core/local_peering_gateway.go @@ -51,6 +51,17 @@ type LocalPeeringGateway struct { // The OCID of the VCN the LPG belongs to. VcnId *string `mandatory:"true" json:"vcnId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The range of IP addresses available on the VCN at the other // end of the peering from this LPG. The value is `null` if the LPG is not peered. // You can use this as the destination CIDR for a route rule to route a subnet's diff --git a/core/public_ip.go b/core/public_ip.go index acd026e94d..536a45f645 100644 --- a/core/public_ip.go +++ b/core/public_ip.go @@ -32,10 +32,21 @@ type PublicIp struct { // this can be a different compartment than the assigned private IP's. CompartmentId *string `mandatory:"false" json:"compartmentId"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The public IP's Oracle ID (OCID). Id *string `mandatory:"false" json:"id"` diff --git a/core/update_cpe_details.go b/core/update_cpe_details.go index bd0daa6ef6..aae63aed2f 100644 --- a/core/update_cpe_details.go +++ b/core/update_cpe_details.go @@ -15,9 +15,20 @@ import ( // UpdateCpeDetails The representation of UpdateCpeDetails type UpdateCpeDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateCpeDetails) String() string { diff --git a/core/update_drg_details.go b/core/update_drg_details.go index 2e64240b5b..edc35e8d69 100644 --- a/core/update_drg_details.go +++ b/core/update_drg_details.go @@ -15,9 +15,20 @@ import ( // UpdateDrgDetails The representation of UpdateDrgDetails type UpdateDrgDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateDrgDetails) String() string { diff --git a/core/update_internet_gateway_details.go b/core/update_internet_gateway_details.go index 9410eeef1f..45f4933685 100644 --- a/core/update_internet_gateway_details.go +++ b/core/update_internet_gateway_details.go @@ -15,10 +15,21 @@ import ( // UpdateInternetGatewayDetails The representation of UpdateInternetGatewayDetails type UpdateInternetGatewayDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // Whether the gateway is enabled. IsEnabled *bool `mandatory:"false" json:"isEnabled"` } diff --git a/core/update_ip_sec_connection_details.go b/core/update_ip_sec_connection_details.go index b6834690b0..b017ebe0d4 100644 --- a/core/update_ip_sec_connection_details.go +++ b/core/update_ip_sec_connection_details.go @@ -15,9 +15,20 @@ import ( // UpdateIpSecConnectionDetails The representation of UpdateIpSecConnectionDetails type UpdateIpSecConnectionDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateIpSecConnectionDetails) String() string { diff --git a/core/update_local_peering_gateway_details.go b/core/update_local_peering_gateway_details.go index 7b9d100838..28ff46b827 100644 --- a/core/update_local_peering_gateway_details.go +++ b/core/update_local_peering_gateway_details.go @@ -15,9 +15,20 @@ import ( // UpdateLocalPeeringGatewayDetails The representation of UpdateLocalPeeringGatewayDetails type UpdateLocalPeeringGatewayDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } func (m UpdateLocalPeeringGatewayDetails) String() string { diff --git a/core/update_public_ip_details.go b/core/update_public_ip_details.go index 06a0f3dbd2..b70ff3e508 100644 --- a/core/update_public_ip_details.go +++ b/core/update_public_ip_details.go @@ -15,10 +15,21 @@ import ( // UpdatePublicIpDetails The representation of UpdatePublicIpDetails type UpdatePublicIpDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid // entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The OCID of the private IP to assign the public IP to. // * If the public IP is already assigned to a different private IP, it will be unassigned // and then reassigned to the specified private IP. diff --git a/core/update_vnic_details.go b/core/update_vnic_details.go index 6eb74fde76..46da4890df 100644 --- a/core/update_vnic_details.go +++ b/core/update_vnic_details.go @@ -15,9 +15,20 @@ import ( // UpdateVnicDetails The representation of UpdateVnicDetails type UpdateVnicDetails struct { + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique, and it's changeable. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname // portion of the primary private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/core/vnic.go b/core/vnic.go index d7eb9d0531..28f33810b4 100644 --- a/core/vnic.go +++ b/core/vnic.go @@ -52,10 +52,21 @@ type Vnic struct { // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // A user-friendly name. Does not have to be unique. // Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` + // 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 (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname // portion of the primary private IP's fully qualified domain name (FQDN) // (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). diff --git a/filestorage/export.go b/filestorage/export.go index 2fa22f2445..f0065824b6 100644 --- a/filestorage/export.go +++ b/filestorage/export.go @@ -23,13 +23,14 @@ import ( // the same export set, except those in a 'DELETED' state, the path element // sequence for the first export resource can't contain the // complete path element sequence of the second export resource. +// // For example, the following are acceptable: -// * /foo and /bar -// * /foo1 and /foo2 -// * /foo and /foo1 +// * /example and /path +// * /example1 and /example2 +// * /example and /example1 // The following examples are not acceptable: -// * /foo and /foo/bar -// * / and /foo +// * /example and /example/path +// * / and /example // Paths may not end in a slash (/). No path element can be a period (.) // or two periods in sequence (..). All path elements must be 255 bytes or less. // No two non-'DELETED' export resources in the same export set can diff --git a/filestorage/file_system_summary.go b/filestorage/file_system_summary.go index 8fa608088d..e4f36b816a 100644 --- a/filestorage/file_system_summary.go +++ b/filestorage/file_system_summary.go @@ -18,8 +18,7 @@ type FileSystemSummary struct { // The number of bytes consumed by the file system, including // any snapshots. This number reflects the metered size of the file // system and is updated asynchronously with respect to - // updates to the file system. For details on file system - // metering see File System Metering (https://docs.us-phoenix-1.oraclecloud.com/Content/File/Concepts/metering.htm). + // updates to the file system. MeteredBytes *int `mandatory:"true" json:"meteredBytes"` // The OCID of the compartment that contains the file system. diff --git a/filestorage/filestorage_client.go b/filestorage/filestorage_client.go index 0a80bb93ad..4439b13e51 100644 --- a/filestorage/filestorage_client.go +++ b/filestorage/filestorage_client.go @@ -657,8 +657,9 @@ func (client FileStorageClient) listExportSets(ctx context.Context, request comm return response, err } -// ListExports Lists the export resources in the specified compartment. You must -// also specify an export set, a file system, or both. +// ListExports Lists export resources by compartment, file system, or export +// set. You must specify an export set ID, a file system ID, and +// / or a compartment ID. func (client FileStorageClient) ListExports(ctx context.Context, request ListExportsRequest) (response ListExportsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() diff --git a/filestorage/list_exports_request_response.go b/filestorage/list_exports_request_response.go index e1a419a85e..681e3c23a8 100644 --- a/filestorage/list_exports_request_response.go +++ b/filestorage/list_exports_request_response.go @@ -12,7 +12,7 @@ import ( type ListExportsRequest struct { // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` // The maximum number of items to return in a paginated "List" call. // Example: `500`