Skip to content

Commit

Permalink
Merge pull request #502 from oracle/release_2024-05-28
Browse files Browse the repository at this point in the history
Release 2024 05 28
  • Loading branch information
joshunter authored May 28, 2024
2 parents f2653bb + 9750525 commit 159e12b
Show file tree
Hide file tree
Showing 124 changed files with 4,753 additions and 561 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.

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

## 65.66.0 - 2024-05-28
### Added
- Support for Demand Signal service
- Support for external database connectors in the Database service
- Support for monitoring standby databases in the Database Management service
- Support for resource overviews in the Capacity Management service
- Support for optional parameters in the download API in the Java Management Service Downloads service

### Breaking Changes
- The return type of property `ResourceType` and `WorkloadType` was changed to `*string` in the models `OccAvailabilitySummary`, `ListOccAvailabilitiesRequest`, and `OccCapacityRequestBaseDetails` in the Capacity Management service
- The model `OccCapacityRequestComputeDetails` has been removed in the Capacity Management service


## 65.65.3 - 2024-05-21
### Added
- Support for the Resource Scheduler service
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOC_SERVER_URL=https:\/\/docs.cloud.oracle.com

GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue recovery vbsinst identitydomains accessgovernancecp ocicontrolcenter osmanagementhub fleetsoftwareupdate computecloudatcustomer marketplacepublisher redis jmsjavadownloads psql generativeai generativeaiinference capacitymanagement globallydistributeddatabase desktops emaildataplane clusterplacementgroups marketplaceprivateoffer resourcescheduler ##SPECNAME##
GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue recovery vbsinst identitydomains accessgovernancecp ocicontrolcenter osmanagementhub fleetsoftwareupdate computecloudatcustomer marketplacepublisher redis jmsjavadownloads psql generativeai generativeaiinference capacitymanagement globallydistributeddatabase desktops emaildataplane clusterplacementgroups marketplaceprivateoffer resourcescheduler demandsignal ##SPECNAME##
NON_GEN_TARGETS = common common/auth objectstorage/transfer example
TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS)

Expand Down
174 changes: 174 additions & 0 deletions capacitymanagement/capacitymanagement_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,64 @@ func (client CapacityManagementClient) getOccCustomerGroup(ctx context.Context,
return response, err
}

// ListInternalNamespaceOccOverviews Lists an overview of all resources in that namespace in a given time interval.
//
// # See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/capacitymanagement/ListInternalNamespaceOccOverviews.go.html to see an example of how to use ListInternalNamespaceOccOverviews API.
// A default retry strategy applies to this operation ListInternalNamespaceOccOverviews()
func (client CapacityManagementClient) ListInternalNamespaceOccOverviews(ctx context.Context, request ListInternalNamespaceOccOverviewsRequest) (response ListInternalNamespaceOccOverviewsResponse, err error) {
var ociResponse common.OCIResponse
policy := common.DefaultRetryPolicy()
if client.RetryPolicy() != nil {
policy = *client.RetryPolicy()
}
if request.RetryPolicy() != nil {
policy = *request.RetryPolicy()
}
ociResponse, err = common.Retry(ctx, request, client.listInternalNamespaceOccOverviews, policy)
if err != nil {
if ociResponse != nil {
if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {
opcRequestId := httpResponse.Header.Get("opc-request-id")
response = ListInternalNamespaceOccOverviewsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}
} else {
response = ListInternalNamespaceOccOverviewsResponse{}
}
}
return
}
if convertedResponse, ok := ociResponse.(ListInternalNamespaceOccOverviewsResponse); ok {
response = convertedResponse
} else {
err = fmt.Errorf("failed to convert OCIResponse into ListInternalNamespaceOccOverviewsResponse")
}
return
}

// listInternalNamespaceOccOverviews implements the OCIOperation interface (enables retrying operations)
func (client CapacityManagementClient) listInternalNamespaceOccOverviews(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {

httpRequest, err := request.HTTPRequest(http.MethodGet, "/internal/namespace/{namespace}/occOverview", binaryReqBody, extraHeaders)
if err != nil {
return nil, err
}

var response ListInternalNamespaceOccOverviewsResponse
var httpResponse *http.Response
httpResponse, err = client.Call(ctx, &httpRequest)
defer common.CloseBodyIfValid(httpResponse)
response.RawResponse = httpResponse
if err != nil {
apiReferenceLink := ""
err = common.PostProcessServiceError(err, "CapacityManagement", "ListInternalNamespaceOccOverviews", apiReferenceLink)
return response, err
}

err = common.UnmarshalResponse(httpResponse, &response)
return response, err
}

// ListOccAvailabilities Lists availabilities for a particular availability catalog.
//
// # See also
Expand Down Expand Up @@ -917,6 +975,122 @@ func (client CapacityManagementClient) listOccCustomerGroups(ctx context.Context
return response, err
}

// ListOccOverviews Lists an overview of all resources in that namespace in a given time interval.
//
// # See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/capacitymanagement/ListOccOverviews.go.html to see an example of how to use ListOccOverviews API.
// A default retry strategy applies to this operation ListOccOverviews()
func (client CapacityManagementClient) ListOccOverviews(ctx context.Context, request ListOccOverviewsRequest) (response ListOccOverviewsResponse, err error) {
var ociResponse common.OCIResponse
policy := common.DefaultRetryPolicy()
if client.RetryPolicy() != nil {
policy = *client.RetryPolicy()
}
if request.RetryPolicy() != nil {
policy = *request.RetryPolicy()
}
ociResponse, err = common.Retry(ctx, request, client.listOccOverviews, policy)
if err != nil {
if ociResponse != nil {
if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {
opcRequestId := httpResponse.Header.Get("opc-request-id")
response = ListOccOverviewsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}
} else {
response = ListOccOverviewsResponse{}
}
}
return
}
if convertedResponse, ok := ociResponse.(ListOccOverviewsResponse); ok {
response = convertedResponse
} else {
err = fmt.Errorf("failed to convert OCIResponse into ListOccOverviewsResponse")
}
return
}

// listOccOverviews implements the OCIOperation interface (enables retrying operations)
func (client CapacityManagementClient) listOccOverviews(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {

httpRequest, err := request.HTTPRequest(http.MethodGet, "/namespace/{namespace}/occOverview", binaryReqBody, extraHeaders)
if err != nil {
return nil, err
}

var response ListOccOverviewsResponse
var httpResponse *http.Response
httpResponse, err = client.Call(ctx, &httpRequest)
defer common.CloseBodyIfValid(httpResponse)
response.RawResponse = httpResponse
if err != nil {
apiReferenceLink := ""
err = common.PostProcessServiceError(err, "CapacityManagement", "ListOccOverviews", apiReferenceLink)
return response, err
}

err = common.UnmarshalResponse(httpResponse, &response)
return response, err
}

// PatchInternalOccCapacityRequest Updates the OccCapacityRequest by evaluating a sequence of instructions.
//
// # See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/capacitymanagement/PatchInternalOccCapacityRequest.go.html to see an example of how to use PatchInternalOccCapacityRequest API.
// A default retry strategy applies to this operation PatchInternalOccCapacityRequest()
func (client CapacityManagementClient) PatchInternalOccCapacityRequest(ctx context.Context, request PatchInternalOccCapacityRequestRequest) (response PatchInternalOccCapacityRequestResponse, err error) {
var ociResponse common.OCIResponse
policy := common.DefaultRetryPolicy()
if client.RetryPolicy() != nil {
policy = *client.RetryPolicy()
}
if request.RetryPolicy() != nil {
policy = *request.RetryPolicy()
}
ociResponse, err = common.Retry(ctx, request, client.patchInternalOccCapacityRequest, policy)
if err != nil {
if ociResponse != nil {
if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {
opcRequestId := httpResponse.Header.Get("opc-request-id")
response = PatchInternalOccCapacityRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}
} else {
response = PatchInternalOccCapacityRequestResponse{}
}
}
return
}
if convertedResponse, ok := ociResponse.(PatchInternalOccCapacityRequestResponse); ok {
response = convertedResponse
} else {
err = fmt.Errorf("failed to convert OCIResponse into PatchInternalOccCapacityRequestResponse")
}
return
}

// patchInternalOccCapacityRequest implements the OCIOperation interface (enables retrying operations)
func (client CapacityManagementClient) patchInternalOccCapacityRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {

httpRequest, err := request.HTTPRequest(http.MethodPatch, "/internal/occCapacityRequests/{occCapacityRequestId}", binaryReqBody, extraHeaders)
if err != nil {
return nil, err
}

var response PatchInternalOccCapacityRequestResponse
var httpResponse *http.Response
httpResponse, err = client.Call(ctx, &httpRequest)
defer common.CloseBodyIfValid(httpResponse)
response.RawResponse = httpResponse
if err != nil {
apiReferenceLink := ""
err = common.PostProcessServiceError(err, "CapacityManagement", "PatchInternalOccCapacityRequest", apiReferenceLink)
return response, err
}

err = common.UnmarshalResponse(httpResponse, &response)
return response, err
}

// PatchOccCapacityRequest Updates the OccCapacityRequest by evaluating a sequence of instructions.
//
// # See also
Expand Down
75 changes: 9 additions & 66 deletions capacitymanagement/create_occ_capacity_request_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package capacitymanagement

import (
"encoding/json"
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
Expand All @@ -22,9 +21,6 @@ type CreateOccCapacityRequestDetails struct {
// Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed.
CompartmentId *string `mandatory:"true" json:"compartmentId"`

// The OCID of the availability catalog against which capacity request is made.
OccAvailabilityCatalogId *string `mandatory:"true" json:"occAvailabilityCatalogId"`

// The name of the OCI service in consideration. For example, Compute, Exadata, and so on.
Namespace NamespaceEnum `mandatory:"true" json:"namespace"`

Expand All @@ -43,6 +39,12 @@ type CreateOccCapacityRequestDetails struct {
// A list of different resources requested by the user.
Details []OccCapacityRequestBaseDetails `mandatory:"true" json:"details"`

// The OCID of the availability catalog against which capacity request is made.
OccAvailabilityCatalogId *string `mandatory:"false" json:"occAvailabilityCatalogId"`

// Type of Capacity Request(New or Transfer)
RequestType OccCapacityRequestRequestTypeEnum `mandatory:"false" json:"requestType,omitempty"`

// Meaningful text about the capacity request.
Description *string `mandatory:"false" json:"description"`

Expand Down Expand Up @@ -74,6 +76,9 @@ func (m CreateOccCapacityRequestDetails) ValidateEnumValue() (bool, error) {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Namespace: %s. Supported values are: %s.", m.Namespace, strings.Join(GetNamespaceEnumStringValues(), ",")))
}

if _, ok := GetMappingOccCapacityRequestRequestTypeEnum(string(m.RequestType)); !ok && m.RequestType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RequestType: %s. Supported values are: %s.", m.RequestType, strings.Join(GetOccCapacityRequestRequestTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingCreateOccCapacityRequestDetailsRequestStateEnum(string(m.RequestState)); !ok && m.RequestState != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RequestState: %s. Supported values are: %s.", m.RequestState, strings.Join(GetCreateOccCapacityRequestDetailsRequestStateEnumStringValues(), ",")))
}
Expand All @@ -83,68 +88,6 @@ func (m CreateOccCapacityRequestDetails) ValidateEnumValue() (bool, error) {
return false, nil
}

// UnmarshalJSON unmarshals from json
func (m *CreateOccCapacityRequestDetails) UnmarshalJSON(data []byte) (e error) {
model := struct {
Description *string `json:"description"`
FreeformTags map[string]string `json:"freeformTags"`
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
LifecycleDetails *string `json:"lifecycleDetails"`
RequestState CreateOccCapacityRequestDetailsRequestStateEnum `json:"requestState"`
CompartmentId *string `json:"compartmentId"`
OccAvailabilityCatalogId *string `json:"occAvailabilityCatalogId"`
Namespace NamespaceEnum `json:"namespace"`
Region *string `json:"region"`
DisplayName *string `json:"displayName"`
AvailabilityDomain *string `json:"availabilityDomain"`
DateExpectedCapacityHandover *common.SDKTime `json:"dateExpectedCapacityHandover"`
Details []occcapacityrequestbasedetails `json:"details"`
}{}

e = json.Unmarshal(data, &model)
if e != nil {
return
}
var nn interface{}
m.Description = model.Description

m.FreeformTags = model.FreeformTags

m.DefinedTags = model.DefinedTags

m.LifecycleDetails = model.LifecycleDetails

m.RequestState = model.RequestState

m.CompartmentId = model.CompartmentId

m.OccAvailabilityCatalogId = model.OccAvailabilityCatalogId

m.Namespace = model.Namespace

m.Region = model.Region

m.DisplayName = model.DisplayName

m.AvailabilityDomain = model.AvailabilityDomain

m.DateExpectedCapacityHandover = model.DateExpectedCapacityHandover

m.Details = make([]OccCapacityRequestBaseDetails, len(model.Details))
for i, n := range model.Details {
nn, e = n.UnmarshalPolymorphicJSON(n.JsonData)
if e != nil {
return e
}
if nn != nil {
m.Details[i] = nn.(OccCapacityRequestBaseDetails)
} else {
m.Details[i] = nil
}
}
return
}

// CreateOccCapacityRequestDetailsRequestStateEnum Enum with underlying type: string
type CreateOccCapacityRequestDetailsRequestStateEnum string

Expand Down
Loading

0 comments on commit 159e12b

Please sign in to comment.