Skip to content

Commit 1195866

Browse files
authored
Releasing version 6.0.0
Releasing version 6.0.0
2 parents bf9cc5e + a0246e0 commit 1195866

File tree

94 files changed

+2342
-113
lines changed

Some content is hidden

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

94 files changed

+2342
-113
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
target/
1212
bin/
1313
temp/
14+
.settings/*
15+
.project
16+
.classpath

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ 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+
## 6.0.0 - 2019-07-23
8+
### Added
9+
- Support for moving resources across compartments in the Database service
10+
- Support for moving resources across compartments in the Health Checks service
11+
- Support for moving alarms across compartments in the Monitoring service
12+
- Support for creating instance configurations from running instances in the Compute service
13+
- Support for setting up budget alerts for cost tracking tags in the Budgets service
14+
715
## 5.15.0 - 2019-07-16
816
### Added
917
- Support for the Functions service

budget/budget.go

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ type Budget struct {
2121
// The OCID of the compartment
2222
CompartmentId *string `mandatory:"true" json:"compartmentId"`
2323

24-
// The OCID of the compartment on which budget is applied
25-
TargetCompartmentId *string `mandatory:"true" json:"targetCompartmentId"`
26-
2724
// The display name of the budget.
2825
DisplayName *string `mandatory:"true" json:"displayName"`
2926

@@ -45,9 +42,22 @@ type Budget struct {
4542
// Time that budget was updated
4643
TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"`
4744

45+
// This is DEPRECATED. For backwards compatability, the property will be populated when
46+
// targetType is "COMPARTMENT" AND targets contains EXACT ONE target compartment ocid.
47+
// For all other scenarios, this property will be left empty.
48+
TargetCompartmentId *string `mandatory:"false" json:"targetCompartmentId"`
49+
4850
// The description of the budget.
4951
Description *string `mandatory:"false" json:"description"`
5052

53+
// The type of target on which the budget is applied.
54+
TargetType TargetTypeEnum `mandatory:"false" json:"targetType,omitempty"`
55+
56+
// The list of targets on which the budget is applied.
57+
// If targetType is "COMPARTMENT", targets contains list of compartment OCIDs.
58+
// If targetType is "TAG", targets contains list of tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
59+
Targets []string `mandatory:"false" json:"targets"`
60+
5161
// Version of the budget. Starts from 1 and increments by 1.
5262
Version *int `mandatory:"false" json:"version"`
5363

@@ -91,6 +101,23 @@ const (
91101
// Deprecated
92102
var GetBudgetResetPeriodEnumValues = GetResetPeriodEnumValues
93103

104+
// BudgetTargetTypeEnum is an alias to type: TargetTypeEnum
105+
// Consider using TargetTypeEnum instead
106+
// Deprecated
107+
type BudgetTargetTypeEnum = TargetTypeEnum
108+
109+
// Set of constants representing the allowable values for TargetTypeEnum
110+
// Deprecated
111+
const (
112+
BudgetTargetTypeCompartment TargetTypeEnum = "COMPARTMENT"
113+
BudgetTargetTypeTag TargetTypeEnum = "TAG"
114+
)
115+
116+
// GetBudgetTargetTypeEnumValues Enumerates the set of values for TargetTypeEnum
117+
// Consider using GetTargetTypeEnumValue
118+
// Deprecated
119+
var GetBudgetTargetTypeEnumValues = GetTargetTypeEnumValues
120+
94121
// BudgetLifecycleStateEnum is an alias to type: LifecycleStateEnum
95122
// Consider using LifecycleStateEnum instead
96123
// Deprecated
@@ -106,4 +133,4 @@ const (
106133
// GetBudgetLifecycleStateEnumValues Enumerates the set of values for LifecycleStateEnum
107134
// Consider using GetLifecycleStateEnumValue
108135
// Deprecated
109-
var GetBudgetLifecycleStateEnumValues = GetLifecycleStateEnumValues
136+
var GetBudgetLifecycleStateEnumValues = GetLifecycleStateEnumValues

budget/budget_client.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,13 @@ func (client BudgetClient) listAlertRules(ctx context.Context, request common.OC
362362
return response, err
363363
}
364364

365-
// ListBudgets Gets a list of all Budgets in a compartment.
365+
// ListBudgets Gets a list of Budgets in a compartment.
366+
// By default, ListBudgets returns budgets of 'COMPARTMENT' target type and the budget records with only ONE target compartment OCID.
367+
// To list ALL budgets, set the targetType query parameter to ALL.
368+
// Example:
369+
// 'targetType=ALL'
370+
// Additional targetTypes would be available in future releases. Clients should ignore new targetType
371+
// or upgrade to latest version of client SDK to handle new targetType.
366372
func (client BudgetClient) ListBudgets(ctx context.Context, request ListBudgetsRequest) (response ListBudgetsResponse, err error) {
367373
var ociResponse common.OCIResponse
368374
policy := common.NoRetryPolicy()

budget/budget_summary.go

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ type BudgetSummary struct {
2121
// The OCID of the compartment
2222
CompartmentId *string `mandatory:"true" json:"compartmentId"`
2323

24-
// The OCID of the compartment on which budget is applied
25-
TargetCompartmentId *string `mandatory:"true" json:"targetCompartmentId"`
26-
2724
// The display name of the budget.
2825
DisplayName *string `mandatory:"true" json:"displayName"`
2926

@@ -45,9 +42,22 @@ type BudgetSummary struct {
4542
// Time budget was updated
4643
TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"`
4744

45+
// This is DEPRECATED. For backwards compatability, the property will be populated when
46+
// targetType is "COMPARTMENT" AND targets contains EXACT ONE target compartment ocid.
47+
// For all other scenarios, this property will be left empty.
48+
TargetCompartmentId *string `mandatory:"false" json:"targetCompartmentId"`
49+
4850
// The description of the budget.
4951
Description *string `mandatory:"false" json:"description"`
5052

53+
// The type of target on which the budget is applied.
54+
TargetType TargetTypeEnum `mandatory:"false" json:"targetType,omitempty"`
55+
56+
// The list of targets on which the budget is applied.
57+
// If targetType is "COMPARTMENT", targets contains list of compartment OCIDs.
58+
// If targetType is "TAG", targets contains list of tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
59+
Targets []string `mandatory:"false" json:"targets"`
60+
5161
// Version of the budget. Starts from 1 and increments by 1.
5262
Version *int `mandatory:"false" json:"version"`
5363

@@ -91,6 +101,23 @@ const (
91101
// Deprecated
92102
var GetBudgetSummaryResetPeriodEnumValues = GetResetPeriodEnumValues
93103

104+
// BudgetSummaryTargetTypeEnum is an alias to type: TargetTypeEnum
105+
// Consider using TargetTypeEnum instead
106+
// Deprecated
107+
type BudgetSummaryTargetTypeEnum = TargetTypeEnum
108+
109+
// Set of constants representing the allowable values for TargetTypeEnum
110+
// Deprecated
111+
const (
112+
BudgetSummaryTargetTypeCompartment TargetTypeEnum = "COMPARTMENT"
113+
BudgetSummaryTargetTypeTag TargetTypeEnum = "TAG"
114+
)
115+
116+
// GetBudgetSummaryTargetTypeEnumValues Enumerates the set of values for TargetTypeEnum
117+
// Consider using GetTargetTypeEnumValue
118+
// Deprecated
119+
var GetBudgetSummaryTargetTypeEnumValues = GetTargetTypeEnumValues
120+
94121
// BudgetSummaryLifecycleStateEnum is an alias to type: LifecycleStateEnum
95122
// Consider using LifecycleStateEnum instead
96123
// Deprecated
@@ -106,4 +133,4 @@ const (
106133
// GetBudgetSummaryLifecycleStateEnumValues Enumerates the set of values for LifecycleStateEnum
107134
// Consider using GetLifecycleStateEnumValue
108135
// Deprecated
109-
var GetBudgetSummaryLifecycleStateEnumValues = GetLifecycleStateEnumValues
136+
var GetBudgetSummaryLifecycleStateEnumValues = GetLifecycleStateEnumValues

budget/create_budget_details.go

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,39 @@ import (
1313
)
1414

1515
// CreateBudgetDetails The create budget details.
16+
// Client should use 'targetType' & 'targets' to specify the target type and list of targets on which the budget is applied.
17+
// For backwards compatibility, 'targetCompartmentId' will still be supported for all existing clients.
18+
// However, this is considered deprecreated and all clients be upgraded to use 'targetType' & 'targets'.
19+
// Specifying both 'targetCompartmentId' and 'targets' will cause a Bad Request.
1620
type CreateBudgetDetails struct {
1721

1822
// The OCID of the compartment
1923
CompartmentId *string `mandatory:"true" json:"compartmentId"`
2024

21-
// The OCID of the compartment on which budget is applied
22-
TargetCompartmentId *string `mandatory:"true" json:"targetCompartmentId"`
23-
2425
// The amount of the budget expressed as a whole number in the currency of the customer's rate card.
2526
Amount *float32 `mandatory:"true" json:"amount"`
2627

2728
// The reset period for the budget.
2829
ResetPeriod ResetPeriodEnum `mandatory:"true" json:"resetPeriod"`
2930

31+
// This is DEPRECTAED. Set the target compartment id in targets instead.
32+
TargetCompartmentId *string `mandatory:"false" json:"targetCompartmentId"`
33+
3034
// The displayName of the budget.
3135
DisplayName *string `mandatory:"false" json:"displayName"`
3236

3337
// The description of the budget.
3438
Description *string `mandatory:"false" json:"description"`
3539

40+
// The type of target on which the budget is applied.
41+
TargetType TargetTypeEnum `mandatory:"false" json:"targetType,omitempty"`
42+
43+
// The list of targets on which the budget is applied.
44+
// If targetType is "COMPARTMENT", targets contains list of compartment OCIDs.
45+
// If targetType is "TAG", targets contains list of tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
46+
// Curerntly, the array should contain EXACT ONE item.
47+
Targets []string `mandatory:"false" json:"targets"`
48+
3649
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
3750
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
3851
// Example: `{"Department": "Finance"}`
@@ -63,3 +76,20 @@ const (
6376
// Consider using GetResetPeriodEnumValue
6477
// Deprecated
6578
var GetCreateBudgetDetailsResetPeriodEnumValues = GetResetPeriodEnumValues
79+
80+
// CreateBudgetDetailsTargetTypeEnum is an alias to type: TargetTypeEnum
81+
// Consider using TargetTypeEnum instead
82+
// Deprecated
83+
type CreateBudgetDetailsTargetTypeEnum = TargetTypeEnum
84+
85+
// Set of constants representing the allowable values for TargetTypeEnum
86+
// Deprecated
87+
const (
88+
CreateBudgetDetailsTargetTypeCompartment TargetTypeEnum = "COMPARTMENT"
89+
CreateBudgetDetailsTargetTypeTag TargetTypeEnum = "TAG"
90+
)
91+
92+
// GetCreateBudgetDetailsTargetTypeEnumValues Enumerates the set of values for TargetTypeEnum
93+
// Consider using GetTargetTypeEnumValue
94+
// Deprecated
95+
var GetCreateBudgetDetailsTargetTypeEnumValues = GetTargetTypeEnumValues

budget/list_budgets_request_response.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ type ListBudgetsRequest struct {
3535
// Example: `My new resource`
3636
DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"`
3737

38+
// The type of target to filter by.
39+
// * ALL - List all budgets
40+
// * COMPARTMENT - List all budgets with targetType == "COMPARTMENT"
41+
// * TAG - List all budgets with targetType == "TAG"
42+
TargetType ListBudgetsTargetTypeEnum `mandatory:"false" contributesTo:"query" name:"targetType" omitEmpty:"true"`
43+
3844
// The client request ID for tracing.
3945
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
4046

@@ -108,3 +114,28 @@ func GetListBudgetsSortOrderEnumValues() []ListBudgetsSortOrderEnum {
108114
}
109115
return values
110116
}
117+
118+
// ListBudgetsTargetTypeEnum Enum with underlying type: string
119+
type ListBudgetsTargetTypeEnum string
120+
121+
// Set of constants representing the allowable values for ListBudgetsTargetTypeEnum
122+
const (
123+
ListBudgetsTargetTypeAll ListBudgetsTargetTypeEnum = "ALL"
124+
ListBudgetsTargetTypeCompartment ListBudgetsTargetTypeEnum = "COMPARTMENT"
125+
ListBudgetsTargetTypeTag ListBudgetsTargetTypeEnum = "TAG"
126+
)
127+
128+
var mappingListBudgetsTargetType = map[string]ListBudgetsTargetTypeEnum{
129+
"ALL": ListBudgetsTargetTypeAll,
130+
"COMPARTMENT": ListBudgetsTargetTypeCompartment,
131+
"TAG": ListBudgetsTargetTypeTag,
132+
}
133+
134+
// GetListBudgetsTargetTypeEnumValues Enumerates the set of values for ListBudgetsTargetTypeEnum
135+
func GetListBudgetsTargetTypeEnumValues() []ListBudgetsTargetTypeEnum {
136+
values := make([]ListBudgetsTargetTypeEnum, 0)
137+
for _, v := range mappingListBudgetsTargetType {
138+
values = append(values, v)
139+
}
140+
return values
141+
}

budget/target_type.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
// Budgets API
5+
//
6+
// Use the Budgets API to manage budgets and budget alerts.
7+
//
8+
9+
package budget
10+
11+
// TargetTypeEnum Enum with underlying type: string
12+
type TargetTypeEnum string
13+
14+
// Set of constants representing the allowable values for TargetTypeEnum
15+
const (
16+
TargetTypeCompartment TargetTypeEnum = "COMPARTMENT"
17+
TargetTypeTag TargetTypeEnum = "TAG"
18+
)
19+
20+
var mappingTargetType = map[string]TargetTypeEnum{
21+
"COMPARTMENT": TargetTypeCompartment,
22+
"TAG": TargetTypeTag,
23+
}
24+
25+
// GetTargetTypeEnumValues Enumerates the set of values for TargetTypeEnum
26+
func GetTargetTypeEnumValues() []TargetTypeEnum {
27+
values := make([]TargetTypeEnum, 0)
28+
for _, v := range mappingTargetType {
29+
values = append(values, v)
30+
}
31+
return values
32+
}

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.

0 commit comments

Comments
 (0)