Skip to content

Commit 175c5a9

Browse files
committed
Releasing Version 10 1 0
Ok as build passed https://teamcity.oci.oraclecorp.com/viewLog.html?tab=buildLog&buildTypeId=Sdk_AutogenGolangSdk_BuildGolangSdkBitbucket&buildId=16422428 Squashed commit of the following: commit d982262fd75ed575908ff93d2bc6ace74d223df8 Author: dshelbyo <[email protected]> Date: Mon Sep 23 20:41:56 2019 +0000 Releasing version 10 1 0
1 parent 41e0f9d commit 175c5a9

23 files changed

+393
-62
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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+
## 10.1.0 - 2019-09-24
8+
### Added
9+
- Support for selecting the Terraform version to use in the Resource Manager service
10+
- Support for bucket re-encryption in the Object Storage service
11+
- Support for enabling / disabling bucket-level events in the Object Storage service
12+
713
## 10.0.0 - 2019-09-17
814
### Added
915
- Support for importing state files in the Resource Manager service

common/version.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

monitoring/alarm.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ type Alarm struct {
107107
Resolution *string `mandatory:"false" json:"resolution"`
108108

109109
// The period of time that the condition defined in the alarm must persist before the alarm state
110-
// changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the
110+
// changes from "OK" to "FIRING". For example, a value of 5 minutes means that the
111111
// alarm must persist in breaching the condition for five minutes before the alarm updates its
112-
// state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five
113-
// minutes before the alarm updates its state to "OK."
112+
// state to "FIRING".
114113
// The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H`
115114
// for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.
116115
// Under the default value of PT1M, the first evaluation that breaches the alarm updates the
117-
// state to "FIRING" and the first evaluation that does not breach the alarm updates the state
118-
// to "OK".
116+
// state to "FIRING".
117+
// The alarm updates its status to "OK" when the breaching condition has been clear for
118+
// the most recent minute.
119119
// Example: `PT5M`
120120
PendingDuration *string `mandatory:"false" json:"pendingDuration"`
121121

monitoring/create_alarm_details.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ type CreateAlarmDetails struct {
8686
Resolution *string `mandatory:"false" json:"resolution"`
8787

8888
// The period of time that the condition defined in the alarm must persist before the alarm state
89-
// changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the
89+
// changes from "OK" to "FIRING". For example, a value of 5 minutes means that the
9090
// alarm must persist in breaching the condition for five minutes before the alarm updates its
91-
// state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five
92-
// minutes before the alarm updates its state to "OK."
91+
// state to "FIRING".
9392
// The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H`
9493
// for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.
9594
// Under the default value of PT1M, the first evaluation that breaches the alarm updates the
96-
// state to "FIRING" and the first evaluation that does not breach the alarm updates the state
97-
// to "OK".
95+
// state to "FIRING".
96+
// The alarm updates its status to "OK" when the breaching condition has been clear for
97+
// the most recent minute.
9898
// Example: `PT5M`
9999
PendingDuration *string `mandatory:"false" json:"pendingDuration"`
100100

monitoring/monitoring_client.go

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ func (client MonitoringClient) changeAlarmCompartment(ctx context.Context, reque
110110

111111
// CreateAlarm Creates a new alarm in the specified compartment.
112112
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
113-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
113+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
114+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
115+
// or transactions, per second (TPS) for a given tenancy.
114116
func (client MonitoringClient) CreateAlarm(ctx context.Context, request CreateAlarmRequest) (response CreateAlarmResponse, err error) {
115117
var ociResponse common.OCIResponse
116118
policy := common.NoRetryPolicy()
@@ -159,7 +161,9 @@ func (client MonitoringClient) createAlarm(ctx context.Context, request common.O
159161

160162
// DeleteAlarm Deletes the specified alarm.
161163
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
162-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
164+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
165+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
166+
// or transactions, per second (TPS) for a given tenancy.
163167
func (client MonitoringClient) DeleteAlarm(ctx context.Context, request DeleteAlarmRequest) (response DeleteAlarmResponse, err error) {
164168
var ociResponse common.OCIResponse
165169
policy := common.NoRetryPolicy()
@@ -203,7 +207,9 @@ func (client MonitoringClient) deleteAlarm(ctx context.Context, request common.O
203207

204208
// GetAlarm Gets the specified alarm.
205209
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
206-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
210+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
211+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
212+
// or transactions, per second (TPS) for a given tenancy.
207213
func (client MonitoringClient) GetAlarm(ctx context.Context, request GetAlarmRequest) (response GetAlarmResponse, err error) {
208214
var ociResponse common.OCIResponse
209215
policy := common.NoRetryPolicy()
@@ -247,7 +253,9 @@ func (client MonitoringClient) getAlarm(ctx context.Context, request common.OCIR
247253

248254
// GetAlarmHistory Get the history of the specified alarm.
249255
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
250-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
256+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
257+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
258+
// or transactions, per second (TPS) for a given tenancy.
251259
func (client MonitoringClient) GetAlarmHistory(ctx context.Context, request GetAlarmHistoryRequest) (response GetAlarmHistoryResponse, err error) {
252260
var ociResponse common.OCIResponse
253261
policy := common.NoRetryPolicy()
@@ -291,7 +299,9 @@ func (client MonitoringClient) getAlarmHistory(ctx context.Context, request comm
291299

292300
// ListAlarms Lists the alarms for the specified compartment.
293301
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
294-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
302+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
303+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
304+
// or transactions, per second (TPS) for a given tenancy.
295305
func (client MonitoringClient) ListAlarms(ctx context.Context, request ListAlarmsRequest) (response ListAlarmsResponse, err error) {
296306
var ociResponse common.OCIResponse
297307
policy := common.NoRetryPolicy()
@@ -335,7 +345,9 @@ func (client MonitoringClient) listAlarms(ctx context.Context, request common.OC
335345

336346
// ListAlarmsStatus List the status of each alarm in the specified compartment.
337347
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
338-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
348+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
349+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
350+
// or transactions, per second (TPS) for a given tenancy.
339351
func (client MonitoringClient) ListAlarmsStatus(ctx context.Context, request ListAlarmsStatusRequest) (response ListAlarmsStatusResponse, err error) {
340352
var ociResponse common.OCIResponse
341353
policy := common.NoRetryPolicy()
@@ -380,7 +392,7 @@ func (client MonitoringClient) listAlarmsStatus(ctx context.Context, request com
380392
// ListMetrics Returns metric definitions that match the criteria specified in the request. Compartment OCID required.
381393
// For information about metrics, see Metrics Overview (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview).
382394
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
383-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
395+
// Transactions Per Second (TPS) per-tenancy limit for this operation: 10.
384396
func (client MonitoringClient) ListMetrics(ctx context.Context, request ListMetricsRequest) (response ListMetricsResponse, err error) {
385397
var ociResponse common.OCIResponse
386398
policy := common.NoRetryPolicy()
@@ -478,7 +490,9 @@ func (client MonitoringClient) postMetricData(ctx context.Context, request commo
478490

479491
// RemoveAlarmSuppression Removes any existing suppression for the specified alarm.
480492
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
481-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
493+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
494+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
495+
// or transactions, per second (TPS) for a given tenancy.
482496
func (client MonitoringClient) RemoveAlarmSuppression(ctx context.Context, request RemoveAlarmSuppressionRequest) (response RemoveAlarmSuppressionResponse, err error) {
483497
var ociResponse common.OCIResponse
484498
policy := common.NoRetryPolicy()
@@ -567,7 +581,9 @@ func (client MonitoringClient) summarizeMetricsData(ctx context.Context, request
567581

568582
// UpdateAlarm Updates the specified alarm.
569583
// For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
570-
// Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
584+
// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
585+
// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
586+
// or transactions, per second (TPS) for a given tenancy.
571587
func (client MonitoringClient) UpdateAlarm(ctx context.Context, request UpdateAlarmRequest) (response UpdateAlarmResponse, err error) {
572588
var ociResponse common.OCIResponse
573589
policy := common.NoRetryPolicy()

monitoring/update_alarm_details.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ type UpdateAlarmDetails struct {
7272
Resolution *string `mandatory:"false" json:"resolution"`
7373

7474
// The period of time that the condition defined in the alarm must persist before the alarm state
75-
// changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the
75+
// changes from "OK" to "FIRING". For example, a value of 5 minutes means that the
7676
// alarm must persist in breaching the condition for five minutes before the alarm updates its
77-
// state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five
78-
// minutes before the alarm updates its state to "OK."
77+
// state to "FIRING".
7978
// The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H`
8079
// for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.
8180
// Under the default value of PT1M, the first evaluation that breaches the alarm updates the
82-
// state to "FIRING" and the first evaluation that does not breach the alarm updates the state
83-
// to "OK".
81+
// state to "FIRING".
82+
// The alarm updates its status to "OK" when the breaching condition has been clear for
83+
// the most recent minute.
8484
// Example: `PT5M`
8585
PendingDuration *string `mandatory:"false" json:"pendingDuration"`
8686

objectstorage/bucket.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ type Bucket struct {
5555
// The 'storageTier' property is immutable after bucket is created.
5656
StorageTier BucketStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"`
5757

58+
// A property that determines whether events will be generated for operations on objects in this bucket.
59+
// This is false by default.
60+
ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"`
61+
5862
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
5963
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
6064
// Example: `{"Department": "Finance"}`

objectstorage/create_bucket_details.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ type CreateBucketDetails struct {
4141
// property is immutable after bucket is created.
4242
StorageTier CreateBucketDetailsStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"`
4343

44+
// A property that determines whether events will be generated for operations on objects in this bucket.
45+
// This is false by default.
46+
ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"`
47+
4448
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
4549
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
4650
// Example: `{"Department": "Finance"}`

objectstorage/objectstorage_client.go

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,9 @@ func (client ObjectStorageClient) createPreauthenticatedRequest(ctx context.Cont
353353
}
354354

355355
// DeleteBucket Deletes a bucket if the bucket is already empty. If the bucket is not empty, use
356-
// DeleteObject first. You also cannot
357-
// delete a bucket that has a pre-authenticated request associated with that bucket.
356+
// DeleteObject first. In addition,
357+
// you cannot delete a bucket that has a multipart upload in progress or a pre-authenticated
358+
// request associated with that bucket.
358359
func (client ObjectStorageClient) DeleteBucket(ctx context.Context, request DeleteBucketRequest) (response DeleteBucketResponse, err error) {
359360
var ociResponse common.OCIResponse
360361
policy := common.NoRetryPolicy()
@@ -613,7 +614,7 @@ func (client ObjectStorageClient) getNamespace(ctx context.Context, request comm
613614

614615
// GetNamespaceMetadata Gets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and
615616
// defaultSwiftCompartmentId.
616-
// Any user with the NAMESPACE_READ permission will be able to see the current metadata. If you are
617+
// Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are
617618
// not authorized, talk to an administrator. If you are an administrator who needs to write policies
618619
// to give users access, see
619620
// Getting Started with Policies (https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).
@@ -1347,6 +1348,55 @@ func (client ObjectStorageClient) putObjectLifecyclePolicy(ctx context.Context,
13471348
return response, err
13481349
}
13491350

1351+
// ReencryptBucket Reencrypts the data encryption key of the bucket and objects in the bucket. This is an asynchronous call, the
1352+
// system will start a work request task to reencrypt the data encryption key of the objects and chunks in the bucket.
1353+
// Only the objects created before the time the API call will be reencrypted. The call can take long time depending
1354+
// on how many objects in the bucket and how big the objects are. This API will return a work request id, so the user
1355+
// can use this id to retrieve the status of the work request task.
1356+
// A user can update kmsKeyId of the bucket, and then call this API, so the data encryption key of the bucket and
1357+
// objects in the bucket will be reencryped by the new kmsKeyId. Note that the system doesn't maintain what
1358+
// ksmKeyId is used to encrypt the object, the user has to maintain the mapping if they want.
1359+
func (client ObjectStorageClient) ReencryptBucket(ctx context.Context, request ReencryptBucketRequest) (response ReencryptBucketResponse, err error) {
1360+
var ociResponse common.OCIResponse
1361+
policy := common.NoRetryPolicy()
1362+
if request.RetryPolicy() != nil {
1363+
policy = *request.RetryPolicy()
1364+
}
1365+
ociResponse, err = common.Retry(ctx, request, client.reencryptBucket, policy)
1366+
if err != nil {
1367+
if ociResponse != nil {
1368+
response = ReencryptBucketResponse{RawResponse: ociResponse.HTTPResponse()}
1369+
}
1370+
return
1371+
}
1372+
if convertedResponse, ok := ociResponse.(ReencryptBucketResponse); ok {
1373+
response = convertedResponse
1374+
} else {
1375+
err = fmt.Errorf("failed to convert OCIResponse into ReencryptBucketResponse")
1376+
}
1377+
return
1378+
}
1379+
1380+
// reencryptBucket implements the OCIOperation interface (enables retrying operations)
1381+
func (client ObjectStorageClient) reencryptBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
1382+
httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/reencrypt")
1383+
if err != nil {
1384+
return nil, err
1385+
}
1386+
1387+
var response ReencryptBucketResponse
1388+
var httpResponse *http.Response
1389+
httpResponse, err = client.Call(ctx, &httpRequest)
1390+
defer common.CloseBodyIfValid(httpResponse)
1391+
response.RawResponse = httpResponse
1392+
if err != nil {
1393+
return response, err
1394+
}
1395+
1396+
err = common.UnmarshalResponse(httpResponse, &response)
1397+
return response, err
1398+
}
1399+
13501400
// RenameObject Rename an object in the given Object Storage namespace.
13511401
func (client ObjectStorageClient) RenameObject(ctx context.Context, request RenameObjectRequest) (response RenameObjectResponse, err error) {
13521402
var ociResponse common.OCIResponse
@@ -1433,6 +1483,9 @@ func (client ObjectStorageClient) restoreObjects(ctx context.Context, request co
14331483
}
14341484

14351485
// UpdateBucket Performs a partial or full update of a bucket's user-defined metadata.
1486+
// Use UpdateBucket to move a bucket from one compartment to another within the same tenancy. Supply the compartmentID
1487+
// of the compartment that you want to move the bucket to. For more information about moving resources between compartments,
1488+
// see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
14361489
func (client ObjectStorageClient) UpdateBucket(ctx context.Context, request UpdateBucketRequest) (response UpdateBucketResponse, err error) {
14371490
var ociResponse common.OCIResponse
14381491
policy := common.NoRetryPolicy()
@@ -1478,7 +1531,7 @@ func (client ObjectStorageClient) updateBucket(ctx context.Context, request comm
14781531
// compartment of the Oracle Cloud Infrastructure tenancy.
14791532
// You can change the default Swift/Amazon S3 compartmentId designation to a different compartmentId. All
14801533
// subsequent bucket creations will use the new default compartment, but no previously created
1481-
// buckets will be modified. A user must have NAMESPACE_UPDATE permission to make changes to the default
1534+
// buckets will be modified. A user must have OBJECTSTORAGE_NAMESPACE_UPDATE permission to make changes to the default
14821535
// compartments for Amazon S3 and Swift.
14831536
func (client ObjectStorageClient) UpdateNamespaceMetadata(ctx context.Context, request UpdateNamespaceMetadataRequest) (response UpdateNamespaceMetadataResponse, err error) {
14841537
var ociResponse common.OCIResponse

0 commit comments

Comments
 (0)