Skip to content

Commit c370ab2

Browse files
authored
Releasing version 11.0.0
Releasing version 11.0.0
2 parents f727ac6 + d80d011 commit c370ab2

File tree

68 files changed

+1860
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1860
-67
lines changed

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,52 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66

7+
## 11.0.0 - 2019-10-01
8+
### Added
9+
- Support for required tags in the Identity service
10+
- Support for work requests on tagging operations in the Identity service
11+
- Support for enumerated tag values in the Identity service
12+
- Support for moving dynamic routing gateway resources across compartments in the Networking service
13+
- Support for migrating zones from Dyn managed DNS to OCI in the DNS service
14+
- Support for fast provisioning for virtual machine databases in the Database service
15+
16+
### Breaking changes
17+
- The field``CreateZoneDetails`` is no longer an anonymous field and the type changed from struct to interface in struct ``CreateZoneRequest``. Here is sample code that shows how to update your code to incorporate this change.
18+
19+
20+
- Before
21+
22+
```golang
23+
// There were two ways to initialize the CreateZoneRequest struct.
24+
// This breaking change only impact option #2
25+
request := dns.CreateZoneRequest{}
26+
27+
// #1. Instantiate CreateZoneDetails directly: no impact
28+
details := dns.CreateZoneDetails{}
29+
details.Name = common.String('some name')
30+
// ... other properties
31+
// Set it to the request class
32+
request.CreateZoneDetails = details
33+
34+
// #2. Instantiate CreateZoneDetails through anonymous fields: will break
35+
request.Name = common.String('some name')
36+
// ... other properties
37+
```
38+
39+
- After
40+
41+
```golang
42+
// #2 no longer supported. Create CreateZoneDetails directly
43+
details := dns.CreateZoneDetails{}
44+
details.Name = common.String('some name')
45+
// ... other properties
46+
47+
request := dns.CreateZoneRequest{
48+
CreateZoneDetails: details
49+
}
50+
// ...
51+
```
52+
753
## 10.1.0 - 2019-09-24
854
### Added
955
- Support for selecting the Terraform version to use in the Resource Manager service

common/common.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ func StringToRegion(stringRegion string) (r Region) {
134134
r = RegionEUZurich1
135135
case "gru", "sa-saopaulo-1":
136136
r = RegionSASaopaulo1
137+
case "syd", "ap-sydney-1":
138+
r = RegionAPSydney1
137139
case "us-langley-1":
138140
r = RegionUSLangley1
139141
case "us-luke-1":

common/common_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ func TestEndpointForTemplate(t *testing.T) {
5555
endpointTemplate: "https://foo.region.{secondLevelDomain}",
5656
expected: "https://foo.region.oraclecloud.com",
5757
},
58+
{
59+
// template with second level domain
60+
region: StringToRegion("ap-sydney-1"),
61+
service: "test",
62+
endpointTemplate: "https://foo.region.{secondLevelDomain}",
63+
expected: "https://foo.region.oraclecloud.com",
64+
},
5865
{
5966
// template with everything for OC2
6067
region: StringToRegion("us-langley-1"),
@@ -86,4 +93,7 @@ func TestStringToRegion(t *testing.T) {
8693

8794
region = StringToRegion("gru")
8895
assert.Equal(t, RegionSASaopaulo1, region)
96+
97+
region = StringToRegion("syd")
98+
assert.Equal(t, RegionAPSydney1, region)
8999
}

common/version.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/change_dedicated_vm_host_compartment_details.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616
"github.com/oracle/oci-go-sdk/common"
1717
)
1818

19-
// ChangeDedicatedVmHostCompartmentDetails Contains details indicating which compartment the resource should move to
19+
// ChangeDedicatedVmHostCompartmentDetails Specifies the compartment to move the dedicated virtual machine host to.
2020
type ChangeDedicatedVmHostCompartmentDetails struct {
2121

2222
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment
23-
// into which the resource should be moved.
23+
// to move the dedicated virtual machine host to.
2424
CompartmentId *string `mandatory:"true" json:"compartmentId"`
2525
}
2626

core/change_dedicated_vm_host_compartment_request_response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type ChangeDedicatedVmHostCompartmentRequest struct {
1414
// The OCID of the dedicated VM host.
1515
DedicatedVmHostId *string `mandatory:"true" contributesTo:"path" name:"dedicatedVmHostId"`
1616

17-
// Request to change the compartment of a given dedicated vm host.
17+
// The request to move the dedicated virtual machine host to a different compartment.
1818
ChangeDedicatedVmHostCompartmentDetails `contributesTo:"body"`
1919

2020
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
13+
package core
14+
15+
import (
16+
"github.com/oracle/oci-go-sdk/common"
17+
)
18+
19+
// ChangeDrgCompartmentDetails The configuration details for the move operation.
20+
type ChangeDrgCompartmentDetails struct {
21+
22+
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the
23+
// DRG to.
24+
CompartmentId *string `mandatory:"true" json:"compartmentId"`
25+
}
26+
27+
func (m ChangeDrgCompartmentDetails) String() string {
28+
return common.PointerString(m)
29+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
package core
5+
6+
import (
7+
"github.com/oracle/oci-go-sdk/common"
8+
"net/http"
9+
)
10+
11+
// ChangeDrgCompartmentRequest wrapper for the ChangeDrgCompartment operation
12+
type ChangeDrgCompartmentRequest struct {
13+
14+
// The OCID of the DRG.
15+
DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"`
16+
17+
// Request to change the compartment of a DRG.
18+
ChangeDrgCompartmentDetails `contributesTo:"body"`
19+
20+
// Unique identifier for the request.
21+
// If you need to contact Oracle about a particular request, please provide the request ID.
22+
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
23+
24+
// A token that uniquely identifies a request so it can be retried in case of a timeout or
25+
// server error without risk of executing that same action again. Retry tokens expire after 24
26+
// hours, but can be invalidated before then due to conflicting operations (for example, if a resource
27+
// has been deleted and purged from the system, then a retry of the original creation request
28+
// may be rejected).
29+
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
30+
31+
// Metadata about the request. This information will not be transmitted to the service, but
32+
// represents information that the SDK will consume to drive retry behavior.
33+
RequestMetadata common.RequestMetadata
34+
}
35+
36+
func (request ChangeDrgCompartmentRequest) String() string {
37+
return common.PointerString(request)
38+
}
39+
40+
// HTTPRequest implements the OCIRequest interface
41+
func (request ChangeDrgCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) {
42+
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
43+
}
44+
45+
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
46+
func (request ChangeDrgCompartmentRequest) RetryPolicy() *common.RetryPolicy {
47+
return request.RequestMetadata.RetryPolicy
48+
}
49+
50+
// ChangeDrgCompartmentResponse wrapper for the ChangeDrgCompartment operation
51+
type ChangeDrgCompartmentResponse struct {
52+
53+
// The underlying http response
54+
RawResponse *http.Response
55+
56+
// For optimistic concurrency control. See `if-match`.
57+
Etag *string `presentIn:"header" name:"etag"`
58+
59+
// Unique Oracle-assigned identifier for the request. If you need to contact
60+
// Oracle about a particular request, please provide the request ID.
61+
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
62+
63+
// The OCID of the work request. Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest)
64+
// with this ID to track the status of the request.
65+
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
66+
}
67+
68+
func (response ChangeDrgCompartmentResponse) String() string {
69+
return common.PointerString(response)
70+
}
71+
72+
// HTTPResponse implements the OCIResponse interface
73+
func (response ChangeDrgCompartmentResponse) HTTPResponse() *http.Response {
74+
return response.RawResponse
75+
}

core/core_compute_client.go

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func (client ComputeClient) captureConsoleHistory(ctx context.Context, request c
266266
return response, err
267267
}
268268

269-
// ChangeDedicatedVmHostCompartment Moves a dedicated vm host from one compartment to another
269+
// ChangeDedicatedVmHostCompartment Moves a dedicated virtual machine host from one compartment to another.
270270
func (client ComputeClient) ChangeDedicatedVmHostCompartment(ctx context.Context, request ChangeDedicatedVmHostCompartmentRequest) (response ChangeDedicatedVmHostCompartmentResponse, err error) {
271271
var ociResponse common.OCIResponse
272272
policy := common.NoRetryPolicy()
@@ -460,7 +460,10 @@ func (client ComputeClient) createAppCatalogSubscription(ctx context.Context, re
460460
return response, err
461461
}
462462

463-
// CreateDedicatedVmHost Creates a new dedicated virtual machine (VM) host in the specified compartment and the specified availability domain.
463+
// CreateDedicatedVmHost Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain.
464+
// Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers
465+
// that are a single tenant and not shared with other customers.
466+
// For more information, see Dedicated Virtual Machine Hosts (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/dedicatedvmhosts.htm).
464467
func (client ComputeClient) CreateDedicatedVmHost(ctx context.Context, request CreateDedicatedVmHostRequest) (response CreateDedicatedVmHostResponse, err error) {
465468
var ociResponse common.OCIResponse
466469
policy := common.NoRetryPolicy()
@@ -704,8 +707,9 @@ func (client ComputeClient) deleteConsoleHistory(ctx context.Context, request co
704707
return response, err
705708
}
706709

707-
// DeleteDedicatedVmHost Deletes the specified dedicated virtual machine (VM) host.
708-
// If any VM instances are assigned to the dedicated VM host, it will not be deleted and the service will return a 409 response code.
710+
// DeleteDedicatedVmHost Deletes the specified dedicated virtual machine host.
711+
// If any VM instances are assigned to the dedicated virtual machine host,
712+
// the delete operation will fail and the service will return a 409 response code.
709713
func (client ComputeClient) DeleteDedicatedVmHost(ctx context.Context, request DeleteDedicatedVmHostRequest) (response DeleteDedicatedVmHostResponse, err error) {
710714
var ociResponse common.OCIResponse
711715
policy := common.NoRetryPolicy()
@@ -1278,7 +1282,7 @@ func (client ComputeClient) getConsoleHistoryContent(ctx context.Context, reques
12781282
return response, err
12791283
}
12801284

1281-
// GetDedicatedVmHost Gets information about the specified dedicated virtual machine (VM) host.
1285+
// GetDedicatedVmHost Gets information about the specified dedicated virtual machine host.
12821286
func (client ComputeClient) GetDedicatedVmHost(ctx context.Context, request GetDedicatedVmHostRequest) (response GetDedicatedVmHostResponse, err error) {
12831287
var ociResponse common.OCIResponse
12841288
policy := common.NoRetryPolicy()
@@ -1908,8 +1912,8 @@ func (client ComputeClient) listConsoleHistories(ctx context.Context, request co
19081912
return response, err
19091913
}
19101914

1911-
// ListDedicatedVmHostInstanceShapes Lists the shapes that can be used to launch a virtual machine (VM) instance on a dedicated VM host within the specified compartment.
1912-
// You can filter the list by compatibility with a specific dedicated VM host shape.
1915+
// ListDedicatedVmHostInstanceShapes Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment.
1916+
// You can filter the list by compatibility with a specific dedicated virtual machine host shape.
19131917
func (client ComputeClient) ListDedicatedVmHostInstanceShapes(ctx context.Context, request ListDedicatedVmHostInstanceShapesRequest) (response ListDedicatedVmHostInstanceShapesResponse, err error) {
19141918
var ociResponse common.OCIResponse
19151919
policy := common.NoRetryPolicy()
@@ -1951,7 +1955,7 @@ func (client ComputeClient) listDedicatedVmHostInstanceShapes(ctx context.Contex
19511955
return response, err
19521956
}
19531957

1954-
// ListDedicatedVmHostInstances Returns the list of instances on the dedicated virtual machine (VM) hosts that match the specified criteria.
1958+
// ListDedicatedVmHostInstances Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria.
19551959
func (client ComputeClient) ListDedicatedVmHostInstances(ctx context.Context, request ListDedicatedVmHostInstancesRequest) (response ListDedicatedVmHostInstancesResponse, err error) {
19561960
var ociResponse common.OCIResponse
19571961
policy := common.NoRetryPolicy()
@@ -1993,7 +1997,7 @@ func (client ComputeClient) listDedicatedVmHostInstances(ctx context.Context, re
19931997
return response, err
19941998
}
19951999

1996-
// ListDedicatedVmHostShapes Lists the shapes that can be used to launch a dedicated virtual machine (VM) host within the specified compartment.
2000+
// ListDedicatedVmHostShapes Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment.
19972001
func (client ComputeClient) ListDedicatedVmHostShapes(ctx context.Context, request ListDedicatedVmHostShapesRequest) (response ListDedicatedVmHostShapesResponse, err error) {
19982002
var ociResponse common.OCIResponse
19992003
policy := common.NoRetryPolicy()
@@ -2035,9 +2039,9 @@ func (client ComputeClient) listDedicatedVmHostShapes(ctx context.Context, reque
20352039
return response, err
20362040
}
20372041

2038-
// ListDedicatedVmHosts Returns the list of dedicated virtual machine (VM) hosts that match the specified criteria from the specified compartment.
2039-
// You can limit the list by specifying a dedicated VM host display name. The list will include all the identically-named
2040-
// dedicated VM hosts in the compartment.
2042+
// ListDedicatedVmHosts Returns the list of dedicated virtual machine hosts that match the specified criteria in the specified compartment.
2043+
// You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named
2044+
// dedicated virtual machine hosts in the compartment.
20412045
func (client ComputeClient) ListDedicatedVmHosts(ctx context.Context, request ListDedicatedVmHostsRequest) (response ListDedicatedVmHostsResponse, err error) {
20422046
var ociResponse common.OCIResponse
20432047
policy := common.NoRetryPolicy()
@@ -2492,7 +2496,7 @@ func (client ComputeClient) updateConsoleHistory(ctx context.Context, request co
24922496
return response, err
24932497
}
24942498

2495-
// UpdateDedicatedVmHost Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine (VM) host.
2499+
// UpdateDedicatedVmHost Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host.
24962500
// If an attribute value is not included, it will not be updated.
24972501
func (client ComputeClient) UpdateDedicatedVmHost(ctx context.Context, request UpdateDedicatedVmHostRequest) (response UpdateDedicatedVmHostResponse, err error) {
24982502
var ociResponse common.OCIResponse

core/core_virtualnetwork_client.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,55 @@ func (client VirtualNetworkClient) changeDhcpOptionsCompartment(ctx context.Cont
416416
return response, err
417417
}
418418

419+
// ChangeDrgCompartment Moves a DRG into a different compartment within the same tenancy. For information
420+
// about moving resources between compartments, see
421+
// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
422+
func (client VirtualNetworkClient) ChangeDrgCompartment(ctx context.Context, request ChangeDrgCompartmentRequest) (response ChangeDrgCompartmentResponse, err error) {
423+
var ociResponse common.OCIResponse
424+
policy := common.NoRetryPolicy()
425+
if request.RetryPolicy() != nil {
426+
policy = *request.RetryPolicy()
427+
}
428+
429+
if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") {
430+
request.OpcRetryToken = common.String(common.RetryToken())
431+
}
432+
433+
ociResponse, err = common.Retry(ctx, request, client.changeDrgCompartment, policy)
434+
if err != nil {
435+
if ociResponse != nil {
436+
response = ChangeDrgCompartmentResponse{RawResponse: ociResponse.HTTPResponse()}
437+
}
438+
return
439+
}
440+
if convertedResponse, ok := ociResponse.(ChangeDrgCompartmentResponse); ok {
441+
response = convertedResponse
442+
} else {
443+
err = fmt.Errorf("failed to convert OCIResponse into ChangeDrgCompartmentResponse")
444+
}
445+
return
446+
}
447+
448+
// changeDrgCompartment implements the OCIOperation interface (enables retrying operations)
449+
func (client VirtualNetworkClient) changeDrgCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
450+
httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgs/{drgId}/actions/changeCompartment")
451+
if err != nil {
452+
return nil, err
453+
}
454+
455+
var response ChangeDrgCompartmentResponse
456+
var httpResponse *http.Response
457+
httpResponse, err = client.Call(ctx, &httpRequest)
458+
defer common.CloseBodyIfValid(httpResponse)
459+
response.RawResponse = httpResponse
460+
if err != nil {
461+
return response, err
462+
}
463+
464+
err = common.UnmarshalResponse(httpResponse, &response)
465+
return response, err
466+
}
467+
419468
// ChangeIPSecConnectionCompartment Moves an IPSec connection into a different compartment within the same tenancy. For information
420469
// about moving resources between compartments, see
421470
// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

core/create_cluster_network_request_response.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ type CreateClusterNetworkResponse struct {
5959
// Unique Oracle-assigned identifier for the request. If you need to contact
6060
// Oracle about a particular request, please provide the request ID.
6161
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
62+
63+
// The OCID of the work request. Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest)
64+
// with this ID to track the status of the request.
65+
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
6266
}
6367

6468
func (response CreateClusterNetworkResponse) String() string {

0 commit comments

Comments
 (0)