Merge pull request #6492 from harveylowndes/update-official-oci-go-sdk
Update Official OCI Go SDK
This commit is contained in:
commit
be6f4ae8b7
|
@ -4,6 +4,108 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
|
|
||||||
|
## 1.8.0 - 2018-06-28
|
||||||
|
### Added
|
||||||
|
- Support for service gateway management in the Networking service
|
||||||
|
- Support for backup and clone of boot volumes in the Block Storage service
|
||||||
|
|
||||||
|
## 1.7.0 - 2018-06-14
|
||||||
|
### Added
|
||||||
|
- Support for the Container Engine service. A sample showing how to use this service from the SDK is available [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_containerengine_test.go)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Empty string was send to backend service for optional enum if it's not set
|
||||||
|
|
||||||
|
## 1.6.0 - 2018-05-31
|
||||||
|
### Added
|
||||||
|
- Support for the "soft shutdown" instance action in the Compute service
|
||||||
|
- Support for Auth Token management in the Identity service
|
||||||
|
- Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service
|
||||||
|
- Support for launching a database system from a backup in the Database service
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
- ``LaunchDbSystemDetails`` is renamed to ``LaunchDbSystemBase`` and the type changed from struct to interface in ``LaunchDbSystemRequest``. Here is sample code that shows how to update your code to incorporate this change.
|
||||||
|
|
||||||
|
- Before
|
||||||
|
|
||||||
|
```golang
|
||||||
|
// create a LaunchDbSystemRequest
|
||||||
|
// There were two ways to initialize the LaunchDbSystemRequest struct.
|
||||||
|
// This breaking change only impact option #2
|
||||||
|
request := database.LaunchDbSystemRequest{}
|
||||||
|
|
||||||
|
// #1. explicity create LaunchDbSystemDetails struct (No impact)
|
||||||
|
details := database.LaunchDbSystemDetails{}
|
||||||
|
details.AvailabilityDomain = common.String(validAD())
|
||||||
|
details.CompartmentId = common.String(getCompartmentID())
|
||||||
|
// ... other properties
|
||||||
|
request.LaunchDbSystemDetails = details
|
||||||
|
|
||||||
|
// #2. use anonymous fields (Will break)
|
||||||
|
request.AvailabilityDomain = common.String(validAD())
|
||||||
|
request.CompartmentId = common.String(getCompartmentID())
|
||||||
|
// ...
|
||||||
|
```
|
||||||
|
|
||||||
|
- After
|
||||||
|
|
||||||
|
```golang
|
||||||
|
// create a LaunchDbSystemRequest
|
||||||
|
request := database.LaunchDbSystemRequest{}
|
||||||
|
details := database.LaunchDbSystemDetails{}
|
||||||
|
details.AvailabilityDomain = common.String(validAD())
|
||||||
|
details.CompartmentId = common.String(getCompartmentID())
|
||||||
|
// ... other properties
|
||||||
|
|
||||||
|
// set the details to LaunchDbSystemBase
|
||||||
|
request.LaunchDbSystemBase = details
|
||||||
|
// ...
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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
|
||||||
|
- Support for multiple ``hostnames`` for loadbalancer listener in LoadBalance service
|
||||||
|
- Support for auto-generating opc-request-id for all operations
|
||||||
|
- Add opc-request-id property for all requests except for Object Storage which use opc-client-request-id
|
||||||
|
|
||||||
|
## 1.3.0 - 2018-04-19
|
||||||
|
### Added
|
||||||
|
- Support for retry on OCI service APIs. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_retry_test.go)
|
||||||
|
- Support for tagging DbSystem and Database resources in the Database Service
|
||||||
|
- Support for filtering by DbSystemId in ListDbVersions operation in Database Service
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed a request signing bug for PatchZoneRecords API
|
||||||
|
- Fixed a bug in DebugLn
|
||||||
|
|
||||||
|
## 1.2.0 - 2018-04-05
|
||||||
|
### Added
|
||||||
|
- Support for Email Delivery Service. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_email_test.go)
|
||||||
|
- Support for paravirtualized volume attachments in Core Services
|
||||||
|
- Support for remote VCN peering across regions
|
||||||
|
- Support for variable size boot volumes in Core Services
|
||||||
|
- Support for SMTP credentials in the Identity Service
|
||||||
|
- Support for tagging Bucket resources in the Object Storage Service
|
||||||
|
|
||||||
|
## 1.1.0 - 2018-03-27
|
||||||
|
### Added
|
||||||
|
- Support for DNS service
|
||||||
|
- Support for File Storage service
|
||||||
|
- Support for PathRouteSets and Listeners in Load Balancing service
|
||||||
|
- Support for Public IPs in Core Services
|
||||||
|
- Support for Dynamic Groups in Identity service
|
||||||
|
- Support for tagging in Core Services and Identity service. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_tagging_test.go)
|
||||||
|
- Fix ComposingConfigurationProvider to not accept a nil ConfigurationProvider
|
||||||
|
- Support for passphrase configuration to FileConfiguration provider
|
||||||
|
|
||||||
## 1.0.0 - 2018-02-28 Initial Release
|
## 1.0.0 - 2018-02-28 Initial Release
|
||||||
### Added
|
### Added
|
||||||
|
@ -12,4 +114,4 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
- Support for Database service
|
- Support for Database service
|
||||||
- Support for IAM service
|
- Support for IAM service
|
||||||
- Support for Load Balancing service
|
- Support for Load Balancing service
|
||||||
- Suport for Object Storage service
|
- Support for Object Storage service
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
DOC_SERVER_URL=https:\/\/docs.us-phoenix-1.oraclecloud.com
|
DOC_SERVER_URL=https:\/\/docs.us-phoenix-1.oraclecloud.com
|
||||||
|
|
||||||
GEN_TARGETS = identity core objectstorage loadbalancer database audit
|
GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine
|
||||||
NON_GEN_TARGETS = common common/auth
|
NON_GEN_TARGETS = common common/auth
|
||||||
TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS)
|
TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS)
|
||||||
|
|
||||||
|
@ -45,6 +45,13 @@ $(TARGETS_CLEAN): clean-%:%
|
||||||
@echo "cleaning $<"
|
@echo "cleaning $<"
|
||||||
@-rm -rf $<
|
@-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:
|
pre-doc:
|
||||||
@echo "Rendering doc server to ${DOC_SERVER_URL}"
|
@echo "Rendering doc server to ${DOC_SERVER_URL}"
|
||||||
find . -name \*.go |xargs sed -i '' 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL}/g'
|
find . -name \*.go |xargs sed -i '' 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL}/g'
|
||||||
|
|
|
@ -48,8 +48,8 @@ func (client *AuditClient) setConfigurationProvider(configProvider common.Config
|
||||||
|
|
||||||
// Error has been checked already
|
// Error has been checked already
|
||||||
region, _ := configProvider.Region()
|
region, _ := configProvider.Region()
|
||||||
client.config = &configProvider
|
|
||||||
client.SetRegion(region)
|
client.SetRegion(region)
|
||||||
|
client.config = &configProvider
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,54 +60,117 @@ func (client *AuditClient) ConfigurationProvider() *common.ConfigurationProvider
|
||||||
|
|
||||||
// GetConfiguration Get the configuration
|
// GetConfiguration Get the configuration
|
||||||
func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error) {
|
func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error) {
|
||||||
httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/configuration", request)
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.getConfiguration, policy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(GetConfigurationResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into GetConfigurationResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
httpResponse, err := client.Call(ctx, &httpRequest)
|
// getConfiguration implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client AuditClient) getConfiguration(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/configuration")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response GetConfigurationResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
defer common.CloseBodyIfValid(httpResponse)
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
response.RawResponse = httpResponse
|
response.RawResponse = httpResponse
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = common.UnmarshalResponse(httpResponse, &response)
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
return
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListEvents Returns all audit events for the specified compartment that were processed within the specified time range.
|
// ListEvents Returns all audit events for the specified compartment that were processed within the specified time range.
|
||||||
func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error) {
|
func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error) {
|
||||||
httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/auditEvents", request)
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.listEvents, policy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(ListEventsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into ListEventsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
httpResponse, err := client.Call(ctx, &httpRequest)
|
// listEvents implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client AuditClient) listEvents(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/auditEvents")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ListEventsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
defer common.CloseBodyIfValid(httpResponse)
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
response.RawResponse = httpResponse
|
response.RawResponse = httpResponse
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = common.UnmarshalResponse(httpResponse, &response)
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
return
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateConfiguration Update the configuration
|
// UpdateConfiguration Update the configuration
|
||||||
func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error) {
|
func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error) {
|
||||||
httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/configuration", request)
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.updateConfiguration, policy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(UpdateConfigurationResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into UpdateConfigurationResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
httpResponse, err := client.Call(ctx, &httpRequest)
|
// updateConfiguration implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client AuditClient) updateConfiguration(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodPut, "/configuration")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response UpdateConfigurationResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
defer common.CloseBodyIfValid(httpResponse)
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
response.RawResponse = httpResponse
|
response.RawResponse = httpResponse
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = common.UnmarshalResponse(httpResponse, &response)
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
return
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,10 @@ type AuditEvent struct {
|
||||||
// The GUID of the event.
|
// The GUID of the event.
|
||||||
EventId *string `mandatory:"false" json:"eventId"`
|
EventId *string `mandatory:"false" json:"eventId"`
|
||||||
|
|
||||||
|
// The name of the event.
|
||||||
|
// Example: `LaunchInstance`
|
||||||
|
EventName *string `mandatory:"false" json:"eventName"`
|
||||||
|
|
||||||
// The source of the event.
|
// The source of the event.
|
||||||
EventSource *string `mandatory:"false" json:"eventSource"`
|
EventSource *string `mandatory:"false" json:"eventSource"`
|
||||||
|
|
||||||
|
|
23
vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go
generated
vendored
23
vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go
generated
vendored
|
@ -13,12 +13,30 @@ type GetConfigurationRequest struct {
|
||||||
|
|
||||||
// ID of the root compartment (tenancy)
|
// ID of the root compartment (tenancy)
|
||||||
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request GetConfigurationRequest) String() string {
|
func (request GetConfigurationRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request GetConfigurationRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request GetConfigurationRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// GetConfigurationResponse wrapper for the GetConfiguration operation
|
// GetConfigurationResponse wrapper for the GetConfiguration operation
|
||||||
type GetConfigurationResponse struct {
|
type GetConfigurationResponse struct {
|
||||||
|
|
||||||
|
@ -32,3 +50,8 @@ type GetConfigurationResponse struct {
|
||||||
func (response GetConfigurationResponse) String() string {
|
func (response GetConfigurationResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response GetConfigurationResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -30,19 +30,33 @@ type ListEventsRequest struct {
|
||||||
// Unique Oracle-assigned identifier for the request.
|
// Unique Oracle-assigned identifier for the request.
|
||||||
// If you need to contact Oracle about a particular request, please provide the request ID.
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request ListEventsRequest) String() string {
|
func (request ListEventsRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ListEventsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ListEventsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// ListEventsResponse wrapper for the ListEvents operation
|
// ListEventsResponse wrapper for the ListEvents operation
|
||||||
type ListEventsResponse struct {
|
type ListEventsResponse struct {
|
||||||
|
|
||||||
// The underlying http response
|
// The underlying http response
|
||||||
RawResponse *http.Response
|
RawResponse *http.Response
|
||||||
|
|
||||||
// The []AuditEvent instance
|
// A list of []AuditEvent instances
|
||||||
Items []AuditEvent `presentIn:"body"`
|
Items []AuditEvent `presentIn:"body"`
|
||||||
|
|
||||||
// For pagination of a list of audit events. When this header appears in the response,
|
// For pagination of a list of audit events. When this header appears in the response,
|
||||||
|
@ -58,3 +72,8 @@ type ListEventsResponse struct {
|
||||||
func (response ListEventsResponse) String() string {
|
func (response ListEventsResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ListEventsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
23
vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go
generated
vendored
23
vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go
generated
vendored
|
@ -16,12 +16,30 @@ type UpdateConfigurationRequest struct {
|
||||||
|
|
||||||
// The configuration properties
|
// The configuration properties
|
||||||
UpdateConfigurationDetails `contributesTo:"body"`
|
UpdateConfigurationDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request UpdateConfigurationRequest) String() string {
|
func (request UpdateConfigurationRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request UpdateConfigurationRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request UpdateConfigurationRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateConfigurationResponse wrapper for the UpdateConfiguration operation
|
// UpdateConfigurationResponse wrapper for the UpdateConfiguration operation
|
||||||
type UpdateConfigurationResponse struct {
|
type UpdateConfigurationResponse struct {
|
||||||
|
|
||||||
|
@ -39,3 +57,8 @@ type UpdateConfigurationResponse struct {
|
||||||
func (response UpdateConfigurationResponse) String() string {
|
func (response UpdateConfigurationResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response UpdateConfigurationResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
||||||
const versionTemplate = `
|
const versionTemplate = `
|
||||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
// Code generated by go generate; DO NOT EDIT
|
// Code generated by go generate; DO NOT EDIT
|
||||||
|
@ -39,4 +38,3 @@ func Version() string {
|
||||||
return version
|
return version
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,10 @@ func (r *urlBasedX509CertificateRetriever) renewCertificate(url string) (certifi
|
||||||
certificatePemRaw = body.Bytes()
|
certificatePemRaw = body.Bytes()
|
||||||
var block *pem.Block
|
var block *pem.Block
|
||||||
block, _ = pem.Decode(certificatePemRaw)
|
block, _ = pem.Decode(certificatePemRaw)
|
||||||
|
if block == nil {
|
||||||
|
return nil, nil, fmt.Errorf("failed to parse the new certificate, not valid pem data")
|
||||||
|
}
|
||||||
|
|
||||||
if certificate, err = x509.ParseCertificate(block.Bytes); err != nil {
|
if certificate, err = x509.ParseCertificate(block.Bytes); err != nil {
|
||||||
return nil, nil, fmt.Errorf("failed to parse the new certificate: %s", err.Error())
|
return nil, nil, fmt.Errorf("failed to parse the new certificate: %s", err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ func (p instancePrincipalConfigurationProvider) KeyID() (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p instancePrincipalConfigurationProvider) TenancyOCID() (string, error) {
|
func (p instancePrincipalConfigurationProvider) TenancyOCID() (string, error) {
|
||||||
return "", nil
|
return p.keyProvider.TenancyOCID()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p instancePrincipalConfigurationProvider) UserOCID() (string, error) {
|
func (p instancePrincipalConfigurationProvider) UserOCID() (string, error) {
|
||||||
|
|
|
@ -53,7 +53,11 @@ var (
|
||||||
func newAuthClient(region common.Region, provider common.KeyProvider) *common.BaseClient {
|
func newAuthClient(region common.Region, provider common.KeyProvider) *common.BaseClient {
|
||||||
signer := common.RequestSigner(provider, genericHeaders, bodyHeaders)
|
signer := common.RequestSigner(provider, genericHeaders, bodyHeaders)
|
||||||
client := common.DefaultBaseClientWithSigner(signer)
|
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"
|
client.BasePath = "v1/x509"
|
||||||
return &client
|
return &client
|
||||||
}
|
}
|
||||||
|
|
7
vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go
generated
vendored
7
vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go
generated
vendored
|
@ -27,6 +27,7 @@ const (
|
||||||
type instancePrincipalKeyProvider struct {
|
type instancePrincipalKeyProvider struct {
|
||||||
regionForFederationClient common.Region
|
regionForFederationClient common.Region
|
||||||
federationClient federationClient
|
federationClient federationClient
|
||||||
|
tenancyID string
|
||||||
}
|
}
|
||||||
|
|
||||||
// newInstancePrincipalKeyProvider creates and returns an instancePrincipalKeyProvider instance based on
|
// newInstancePrincipalKeyProvider creates and returns an instancePrincipalKeyProvider instance based on
|
||||||
|
@ -61,7 +62,7 @@ func newInstancePrincipalKeyProvider() (provider *instancePrincipalKeyProvider,
|
||||||
federationClient := newX509FederationClient(
|
federationClient := newX509FederationClient(
|
||||||
region, tenancyID, leafCertificateRetriever, intermediateCertificateRetrievers)
|
region, tenancyID, leafCertificateRetriever, intermediateCertificateRetrievers)
|
||||||
|
|
||||||
provider = &instancePrincipalKeyProvider{regionForFederationClient: region, federationClient: federationClient}
|
provider = &instancePrincipalKeyProvider{regionForFederationClient: region, federationClient: federationClient, tenancyID: tenancyID}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,3 +94,7 @@ func (p *instancePrincipalKeyProvider) KeyID() (string, error) {
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("ST$%s", securityToken), nil
|
return fmt.Sprintf("ST$%s", securityToken), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *instancePrincipalKeyProvider) TenancyOCID() (string, error) {
|
||||||
|
return p.tenancyID, nil
|
||||||
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ package common
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
@ -14,16 +15,55 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultHostURLTemplate The default url template for service hosts
|
// DefaultHostURLTemplate The default url template for service hosts
|
||||||
DefaultHostURLTemplate = "%s.%s.oraclecloud.com"
|
DefaultHostURLTemplate = "%s.%s.oraclecloud.com"
|
||||||
|
|
||||||
|
// requestHeaderAccept The key for passing a header to indicate Accept
|
||||||
|
requestHeaderAccept = "Accept"
|
||||||
|
|
||||||
|
// requestHeaderAuthorization The key for passing a header to indicate Authorization
|
||||||
|
requestHeaderAuthorization = "Authorization"
|
||||||
|
|
||||||
|
// requestHeaderContentLength The key for passing a header to indicate Content Length
|
||||||
|
requestHeaderContentLength = "Content-Length"
|
||||||
|
|
||||||
|
// requestHeaderContentType The key for passing a header to indicate Content Type
|
||||||
|
requestHeaderContentType = "Content-Type"
|
||||||
|
|
||||||
|
// requestHeaderDate The key for passing a header to indicate Date
|
||||||
|
requestHeaderDate = "Date"
|
||||||
|
|
||||||
|
// requestHeaderIfMatch The key for passing a header to indicate If Match
|
||||||
|
requestHeaderIfMatch = "if-match"
|
||||||
|
|
||||||
|
// requestHeaderOpcClientInfo The key for passing a header to indicate OPC Client Info
|
||||||
|
requestHeaderOpcClientInfo = "opc-client-info"
|
||||||
|
|
||||||
|
// requestHeaderOpcRetryToken The key for passing a header to indicate OPC Retry Token
|
||||||
|
requestHeaderOpcRetryToken = "opc-retry-token"
|
||||||
|
|
||||||
|
// requestHeaderOpcRequestID The key for unique Oracle-assigned identifier for the request.
|
||||||
|
requestHeaderOpcRequestID = "opc-request-id"
|
||||||
|
|
||||||
|
// requestHeaderOpcClientRequestID The key for unique Oracle-assigned identifier for the request.
|
||||||
|
requestHeaderOpcClientRequestID = "opc-client-request-id"
|
||||||
|
|
||||||
|
// requestHeaderUserAgent The key for passing a header to indicate User Agent
|
||||||
|
requestHeaderUserAgent = "User-Agent"
|
||||||
|
|
||||||
|
// requestHeaderXContentSHA256 The key for passing a header to indicate SHA256 hash
|
||||||
|
requestHeaderXContentSHA256 = "X-Content-SHA256"
|
||||||
|
|
||||||
|
// private constants
|
||||||
defaultScheme = "https"
|
defaultScheme = "https"
|
||||||
defaultSDKMarker = "Oracle-GoSDK"
|
defaultSDKMarker = "Oracle-GoSDK"
|
||||||
defaultUserAgentTemplate = "%s/%s (%s/%s; go/%s)" //SDK/SDKVersion (OS/OSVersion; Lang/LangVersion)
|
defaultUserAgentTemplate = "%s/%s (%s/%s; go/%s)" //SDK/SDKVersion (OS/OSVersion; Lang/LangVersion)
|
||||||
defaultTimeout = time.Second * 30
|
defaultTimeout = 60 * time.Second
|
||||||
defaultConfigFileName = "config"
|
defaultConfigFileName = "config"
|
||||||
defaultConfigDirName = ".oci"
|
defaultConfigDirName = ".oci"
|
||||||
secondaryConfigDirName = ".oraclebmc"
|
secondaryConfigDirName = ".oraclebmc"
|
||||||
|
@ -65,7 +105,15 @@ func defaultUserAgent() string {
|
||||||
return userAgent
|
return userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var clientCounter int64
|
||||||
|
|
||||||
|
func getNextSeed() int64 {
|
||||||
|
newCounterValue := atomic.AddInt64(&clientCounter, 1)
|
||||||
|
return newCounterValue + time.Now().UnixNano()
|
||||||
|
}
|
||||||
|
|
||||||
func newBaseClient(signer HTTPRequestSigner, dispatcher HTTPRequestDispatcher) BaseClient {
|
func newBaseClient(signer HTTPRequestSigner, dispatcher HTTPRequestDispatcher) BaseClient {
|
||||||
|
rand.Seed(getNextSeed())
|
||||||
return BaseClient{
|
return BaseClient{
|
||||||
UserAgent: defaultUserAgent(),
|
UserAgent: defaultUserAgent(),
|
||||||
Interceptor: nil,
|
Interceptor: nil,
|
||||||
|
@ -146,7 +194,12 @@ func (client *BaseClient) prepareRequest(request *http.Request) (err error) {
|
||||||
if request.Header == nil {
|
if request.Header == nil {
|
||||||
request.Header = http.Header{}
|
request.Header = http.Header{}
|
||||||
}
|
}
|
||||||
request.Header.Set("User-Agent", client.UserAgent)
|
request.Header.Set(requestHeaderUserAgent, client.UserAgent)
|
||||||
|
request.Header.Set(requestHeaderDate, time.Now().UTC().Format(http.TimeFormat))
|
||||||
|
|
||||||
|
if request.Header.Get(requestHeaderOpcRetryToken) == "" {
|
||||||
|
request.Header.Set(requestHeaderOpcRetryToken, generateRetryToken())
|
||||||
|
}
|
||||||
|
|
||||||
if !strings.Contains(client.Host, "http") &&
|
if !strings.Contains(client.Host, "http") &&
|
||||||
!strings.Contains(client.Host, "https") {
|
!strings.Contains(client.Host, "https") {
|
||||||
|
@ -160,7 +213,9 @@ func (client *BaseClient) prepareRequest(request *http.Request) (err error) {
|
||||||
request.URL.Host = clientURL.Host
|
request.URL.Host = clientURL.Host
|
||||||
request.URL.Scheme = clientURL.Scheme
|
request.URL.Scheme = clientURL.Scheme
|
||||||
currentPath := request.URL.Path
|
currentPath := request.URL.Path
|
||||||
request.URL.Path = path.Clean(fmt.Sprintf("/%s/%s", client.BasePath, currentPath))
|
if !strings.Contains(currentPath, fmt.Sprintf("/%s", client.BasePath)) {
|
||||||
|
request.URL.Path = path.Clean(fmt.Sprintf("/%s/%s", client.BasePath, currentPath))
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,10 +232,32 @@ func checkForSuccessfulResponse(res *http.Response) error {
|
||||||
return newServiceFailureFromResponse(res)
|
return newServiceFailureFromResponse(res)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Call executes the underlying http requrest with the given context
|
// OCIRequest is any request made to an OCI service.
|
||||||
|
type OCIRequest interface {
|
||||||
|
// HTTPRequest assembles an HTTP request.
|
||||||
|
HTTPRequest(method, path string) (http.Request, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RequestMetadata is metadata about an OCIRequest. This structure represents the behavior exhibited by the SDK when
|
||||||
|
// issuing (or reissuing) a request.
|
||||||
|
type RequestMetadata struct {
|
||||||
|
// RetryPolicy is the policy for reissuing the request. If no retry policy is set on the request,
|
||||||
|
// then the request will be issued exactly once.
|
||||||
|
RetryPolicy *RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// OCIResponse is the response from issuing a request to an OCI service.
|
||||||
|
type OCIResponse interface {
|
||||||
|
// HTTPResponse returns the raw HTTP response.
|
||||||
|
HTTPResponse() *http.Response
|
||||||
|
}
|
||||||
|
|
||||||
|
// OCIOperation is the generalization of a request-response cycle undergone by an OCI service.
|
||||||
|
type OCIOperation func(context.Context, OCIRequest) (OCIResponse, error)
|
||||||
|
|
||||||
|
// Call executes the http request with the given context
|
||||||
func (client BaseClient) Call(ctx context.Context, request *http.Request) (response *http.Response, err error) {
|
func (client BaseClient) Call(ctx context.Context, request *http.Request) (response *http.Response, err error) {
|
||||||
Debugln("Atempting to call downstream service")
|
Debugln("Atempting to call downstream service")
|
||||||
request = request.WithContext(ctx)
|
request = request.WithContext(ctx)
|
||||||
|
|
|
@ -18,6 +18,8 @@ const (
|
||||||
RegionIAD Region = "us-ashburn-1"
|
RegionIAD Region = "us-ashburn-1"
|
||||||
//RegionFRA region FRA
|
//RegionFRA region FRA
|
||||||
RegionFRA Region = "eu-frankfurt-1"
|
RegionFRA Region = "eu-frankfurt-1"
|
||||||
|
//RegionLHR region LHR
|
||||||
|
RegionLHR Region = "uk-london-1"
|
||||||
)
|
)
|
||||||
|
|
||||||
//StringToRegion convert a string to Region type
|
//StringToRegion convert a string to Region type
|
||||||
|
@ -31,6 +33,8 @@ func StringToRegion(stringRegion string) (r Region) {
|
||||||
r = RegionIAD
|
r = RegionIAD
|
||||||
case "fra", "eu-frankfurt-1":
|
case "fra", "eu-frankfurt-1":
|
||||||
r = RegionFRA
|
r = RegionFRA
|
||||||
|
case "lhr", "uk-london-1":
|
||||||
|
r = RegionLHR
|
||||||
default:
|
default:
|
||||||
r = Region(stringRegion)
|
r = Region(stringRegion)
|
||||||
Debugf("region named: %s, is not recognized", stringRegion)
|
Debugf("region named: %s, is not recognized", stringRegion)
|
||||||
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"path"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
@ -95,7 +96,7 @@ func (p rawConfigurationProvider) Region() (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// environmentConfigurationProvider reads configuration from environment variables
|
// environmentConfigurationProvider reads configuration from environment variables
|
||||||
type environmentConfigurationProvider struct { // TODO: Support Instance Principal
|
type environmentConfigurationProvider struct {
|
||||||
PrivateKeyPassword string
|
PrivateKeyPassword string
|
||||||
EnvironmentVariablePrefix string
|
EnvironmentVariablePrefix string
|
||||||
}
|
}
|
||||||
|
@ -120,7 +121,8 @@ func (p environmentConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey,
|
||||||
return nil, fmt.Errorf("can not read PrivateKey from env variable: %s", environmentVariable)
|
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 {
|
if err != nil {
|
||||||
Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable)
|
Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable)
|
||||||
return
|
return
|
||||||
|
@ -186,7 +188,7 @@ func (p environmentConfigurationProvider) Region() (value string, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// fileConfigurationProvider. reads configuration information from a file
|
// fileConfigurationProvider. reads configuration information from a file
|
||||||
type fileConfigurationProvider struct { // TODO: Support Instance Principal
|
type fileConfigurationProvider struct {
|
||||||
//The path to the configuration file
|
//The path to the configuration file
|
||||||
ConfigPath string
|
ConfigPath string
|
||||||
|
|
||||||
|
@ -227,8 +229,8 @@ func ConfigurationProviderFromFileWithProfile(configFilePath, profile, privateKe
|
||||||
}
|
}
|
||||||
|
|
||||||
type configFileInfo struct {
|
type configFileInfo struct {
|
||||||
UserOcid, Fingerprint, KeyFilePath, TenancyOcid, Region string
|
UserOcid, Fingerprint, KeyFilePath, TenancyOcid, Region, Passphrase string
|
||||||
PresentConfiguration byte
|
PresentConfiguration byte
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -237,6 +239,7 @@ const (
|
||||||
hasFingerprint
|
hasFingerprint
|
||||||
hasRegion
|
hasRegion
|
||||||
hasKeyFile
|
hasKeyFile
|
||||||
|
hasPassphrase
|
||||||
none
|
none
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -277,6 +280,9 @@ func parseConfigAtLine(start int, content []string) (info *configFileInfo, err e
|
||||||
|
|
||||||
splits := strings.Split(line, "=")
|
splits := strings.Split(line, "=")
|
||||||
switch key, value := strings.TrimSpace(splits[0]), strings.TrimSpace(splits[1]); strings.ToLower(key) {
|
switch key, value := strings.TrimSpace(splits[0]), strings.TrimSpace(splits[1]); strings.ToLower(key) {
|
||||||
|
case "passphrase", "pass_phrase":
|
||||||
|
configurationPresent = configurationPresent | hasPassphrase
|
||||||
|
info.Passphrase = value
|
||||||
case "user":
|
case "user":
|
||||||
configurationPresent = configurationPresent | hasUser
|
configurationPresent = configurationPresent | hasUser
|
||||||
info.UserOcid = value
|
info.UserOcid = value
|
||||||
|
@ -299,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) {
|
func openConfigFile(configFilePath string) (data []byte, err error) {
|
||||||
data, err = ioutil.ReadFile(configFilePath)
|
expandedPath := expandPath(configFilePath)
|
||||||
|
data, err = ioutil.ReadFile(expandedPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error())
|
err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error())
|
||||||
}
|
}
|
||||||
|
@ -391,13 +410,21 @@ func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err err
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
pemFileContent, err := ioutil.ReadFile(filePath)
|
|
||||||
|
expandedPath := expandPath(filePath)
|
||||||
|
pemFileContent, err := ioutil.ReadFile(expandedPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error())
|
err = fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
key, err = PrivateKeyFromBytes(pemFileContent, &p.PrivateKeyPassword)
|
password := p.PrivateKeyPassword
|
||||||
|
|
||||||
|
if password == "" && ((info.PresentConfiguration & hasPassphrase) == hasPassphrase) {
|
||||||
|
password = info.Passphrase
|
||||||
|
}
|
||||||
|
|
||||||
|
key, err = PrivateKeyFromBytes(pemFileContent, &password)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,6 +451,12 @@ func ComposingConfigurationProvider(providers []ConfigurationProvider) (Configur
|
||||||
if len(providers) == 0 {
|
if len(providers) == 0 {
|
||||||
return nil, fmt.Errorf("providers can not be an empty slice")
|
return nil, fmt.Errorf("providers can not be an empty slice")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for i, p := range providers {
|
||||||
|
if p == nil {
|
||||||
|
return nil, fmt.Errorf("provider in position: %d is nil. ComposingConfiurationProvider does not support nil values", i)
|
||||||
|
}
|
||||||
|
}
|
||||||
return composingConfigurationProvider{Providers: providers}, nil
|
return composingConfigurationProvider{Providers: providers}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,3 +78,14 @@ func IsServiceError(err error) (failure ServiceError, ok bool) {
|
||||||
failure, ok = err.(servicefailure)
|
failure, ok = err.(servicefailure)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type deadlineExceededByBackoffError struct{}
|
||||||
|
|
||||||
|
func (deadlineExceededByBackoffError) Error() string {
|
||||||
|
return "now() + computed backoff duration exceeds request deadline"
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeadlineExceededByBackoff is the error returned by Call() when GetNextDuration() returns a time.Duration that would
|
||||||
|
// force the user to wait past the request deadline before re-issuing a request. This enables us to exit early, since
|
||||||
|
// we cannot succeed based on the configured retry policy.
|
||||||
|
var DeadlineExceededByBackoff error = deadlineExceededByBackoffError{}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/rand"
|
||||||
"crypto/rsa"
|
"crypto/rsa"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
|
@ -166,3 +167,14 @@ func PrivateKeyFromBytes(pemData []byte, password *string) (key *rsa.PrivateKey,
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func generateRandUUID() (string, error) {
|
||||||
|
b := make([]byte, 16)
|
||||||
|
_, err := rand.Read(b)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
uuid := fmt.Sprintf("%x%x%x%x%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
|
||||||
|
|
||||||
|
return uuid, nil
|
||||||
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ func addBinaryBody(request *http.Request, value reflect.Value) (e error) {
|
||||||
request.Body = readCloser
|
request.Body = readCloser
|
||||||
|
|
||||||
//Set the default content type to application/octet-stream if not set
|
//Set the default content type to application/octet-stream if not set
|
||||||
if request.Header.Get("Content-Type") == "" {
|
if request.Header.Get(requestHeaderContentType) == "" {
|
||||||
request.Header.Set("Content-Type", "application/octet-stream")
|
request.Header.Set(requestHeaderContentType, "application/octet-stream")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ func isNillableType(value *reflect.Value) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// omitNilFieldsInJSON, removes json keys whose struct value is nil, and the field is tag with the json and
|
// omitNilFieldsInJSON, removes json keys whose struct value is nil, and the field is tagged with the json and
|
||||||
// mandatory:false tags
|
// mandatory:false tags
|
||||||
func omitNilFieldsInJSON(data interface{}, value reflect.Value) (interface{}, error) {
|
func omitNilFieldsInJSON(data interface{}, value reflect.Value) (interface{}, error) {
|
||||||
switch value.Kind() {
|
switch value.Kind() {
|
||||||
|
@ -160,6 +160,12 @@ func omitNilFieldsInJSON(data interface{}, value reflect.Value) (interface{}, er
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check to make sure the field is part of the json representation of the value
|
||||||
|
if _, contains := jsonMap[jsonFieldName]; !contains {
|
||||||
|
Debugf("Field %s is not present in json, omitting", jsonFieldName)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if currentFieldValue.Type() == timeType || currentFieldValue.Type() == timeTypePtr {
|
if currentFieldValue.Type() == timeType || currentFieldValue.Type() == timeTypePtr {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -239,8 +245,8 @@ func addToBody(request *http.Request, value reflect.Value, field reflect.StructF
|
||||||
Debugf("Marshaled body is: %s", string(marshaled))
|
Debugf("Marshaled body is: %s", string(marshaled))
|
||||||
bodyBytes := bytes.NewReader(marshaled)
|
bodyBytes := bytes.NewReader(marshaled)
|
||||||
request.ContentLength = int64(bodyBytes.Len())
|
request.ContentLength = int64(bodyBytes.Len())
|
||||||
request.Header.Set("Content-Length", strconv.FormatInt(request.ContentLength, 10))
|
request.Header.Set(requestHeaderContentLength, strconv.FormatInt(request.ContentLength, 10))
|
||||||
request.Header.Set("Content-Type", "application/json")
|
request.Header.Set(requestHeaderContentType, "application/json")
|
||||||
request.Body = ioutil.NopCloser(bodyBytes)
|
request.Body = ioutil.NopCloser(bodyBytes)
|
||||||
request.GetBody = func() (io.ReadCloser, error) {
|
request.GetBody = func() (io.ReadCloser, error) {
|
||||||
return ioutil.NopCloser(bodyBytes), nil
|
return ioutil.NopCloser(bodyBytes), nil
|
||||||
|
@ -269,11 +275,35 @@ func addToQuery(request *http.Request, value reflect.Value, field reflect.Struct
|
||||||
|
|
||||||
//if not mandatory and nil. Omit
|
//if not mandatory and nil. Omit
|
||||||
if !mandatory && isNil(value) {
|
if !mandatory && isNil(value) {
|
||||||
Debugf("Query parameter value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name)
|
Debugf("Query parameter value is not mandatory and is nil pointer in field: %s. Skipping query", field.Name)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if queryParameterValue, e = toStringValue(value, field); e != nil {
|
encoding := strings.ToLower(field.Tag.Get("collectionFormat"))
|
||||||
|
var collectionFormatStringValues []string
|
||||||
|
switch encoding {
|
||||||
|
case "csv", "multi":
|
||||||
|
if value.Kind() != reflect.Slice && value.Kind() != reflect.Array {
|
||||||
|
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()
|
||||||
|
collectionFormatStringValues = make([]string, numOfElements)
|
||||||
|
for i := 0; i < numOfElements; i++ {
|
||||||
|
collectionFormatStringValues[i], e = toStringValue(value.Index(i), field)
|
||||||
|
if e != nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryParameterValue = strings.Join(collectionFormatStringValues, ",")
|
||||||
|
case "":
|
||||||
|
queryParameterValue, e = toStringValue(value, field)
|
||||||
|
default:
|
||||||
|
e = fmt.Errorf("encoding of type %s is not supported for query param: %s", encoding, field.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
if e != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,18 +312,28 @@ func addToQuery(request *http.Request, value reflect.Value, field reflect.Struct
|
||||||
if omitEmpty, present := field.Tag.Lookup("omitEmpty"); present {
|
if omitEmpty, present := field.Tag.Lookup("omitEmpty"); present {
|
||||||
omitEmptyBool, _ := strconv.ParseBool(strings.ToLower(omitEmpty))
|
omitEmptyBool, _ := strconv.ParseBool(strings.ToLower(omitEmpty))
|
||||||
if queryParameterValue != "" || !omitEmptyBool {
|
if queryParameterValue != "" || !omitEmptyBool {
|
||||||
query.Set(queryParameterName, queryParameterValue)
|
addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues)
|
||||||
} else {
|
} else {
|
||||||
Debugf("Omitting %s, is empty and omitEmpty tag is set", field.Name)
|
Debugf("Omitting %s, is empty and omitEmpty tag is set", field.Name)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
query.Set(queryParameterName, queryParameterValue)
|
addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues)
|
||||||
}
|
}
|
||||||
|
|
||||||
request.URL.RawQuery = query.Encode()
|
request.URL.RawQuery = query.Encode()
|
||||||
return
|
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
|
// 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) {
|
func addToPath(request *http.Request, value reflect.Value, field reflect.StructField) (e error) {
|
||||||
var additionalURLPathPart string
|
var additionalURLPathPart string
|
||||||
|
@ -301,6 +341,11 @@ func addToPath(request *http.Request, value reflect.Value, field reflect.StructF
|
||||||
return fmt.Errorf("can not marshal to path in request for field %s. Due to %s", field.Name, e.Error())
|
return fmt.Errorf("can not marshal to path in request for field %s. Due to %s", field.Name, e.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// path should not be empty for any operations
|
||||||
|
if len(additionalURLPathPart) == 0 {
|
||||||
|
return fmt.Errorf("value cannot be empty for field %s in path", field.Name)
|
||||||
|
}
|
||||||
|
|
||||||
if request.URL == nil {
|
if request.URL == nil {
|
||||||
request.URL = &url.URL{}
|
request.URL = &url.URL{}
|
||||||
request.URL.Path = ""
|
request.URL.Path = ""
|
||||||
|
@ -356,6 +401,9 @@ func addToHeader(request *http.Request, value reflect.Value, field reflect.Struc
|
||||||
return fmt.Errorf("marshaling request to a header requires not nil pointer for field: %s", field.Name)
|
return fmt.Errorf("marshaling request to a header requires not nil pointer for field: %s", field.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// generate opc-request-id if header value is nil and header name matches
|
||||||
|
value = generateOpcRequestID(headerName, value)
|
||||||
|
|
||||||
//if not mandatory and nil. Omit
|
//if not mandatory and nil. Omit
|
||||||
if !mandatory && isNil(value) {
|
if !mandatory && isNil(value) {
|
||||||
Debugf("Header value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name)
|
Debugf("Header value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name)
|
||||||
|
@ -471,8 +519,8 @@ func structToRequestPart(request *http.Request, val reflect.Value) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//If headers are and the content type was not set, we default to application/json
|
//If headers are and the content type was not set, we default to application/json
|
||||||
if request.Header != nil && request.Header.Get("Content-Type") == "" {
|
if request.Header != nil && request.Header.Get(requestHeaderContentType) == "" {
|
||||||
request.Header.Set("Content-Type", "application/json")
|
request.Header.Set(requestHeaderContentType, "application/json")
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -511,10 +559,10 @@ func MakeDefaultHTTPRequest(method, path string) (httpRequest http.Request) {
|
||||||
URL: &url.URL{},
|
URL: &url.URL{},
|
||||||
}
|
}
|
||||||
|
|
||||||
httpRequest.Header.Set("Content-Length", "0")
|
httpRequest.Header.Set(requestHeaderContentLength, "0")
|
||||||
httpRequest.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
|
httpRequest.Header.Set(requestHeaderDate, time.Now().UTC().Format(http.TimeFormat))
|
||||||
httpRequest.Header.Set("Opc-Client-Info", strings.Join([]string{defaultSDKMarker, Version()}, "/"))
|
httpRequest.Header.Set(requestHeaderOpcClientInfo, strings.Join([]string{defaultSDKMarker, Version()}, "/"))
|
||||||
httpRequest.Header.Set("Accept", "*/*")
|
httpRequest.Header.Set(requestHeaderAccept, "*/*")
|
||||||
httpRequest.Method = method
|
httpRequest.Method = method
|
||||||
httpRequest.URL.Path = path
|
httpRequest.URL.Path = path
|
||||||
return
|
return
|
||||||
|
@ -861,3 +909,24 @@ func UnmarshalResponseWithPolymorphicBody(httpResponse *http.Response, responseS
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// generate request id if user not provided and for each retry operation re-gen a new request id
|
||||||
|
func generateOpcRequestID(headerName string, value reflect.Value) (newValue reflect.Value) {
|
||||||
|
newValue = value
|
||||||
|
isNilValue := isNil(newValue)
|
||||||
|
isOpcRequestIDHeader := headerName == requestHeaderOpcRequestID || headerName == requestHeaderOpcClientRequestID
|
||||||
|
|
||||||
|
if isNilValue && isOpcRequestIDHeader {
|
||||||
|
requestID, err := generateRandUUID()
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
// this will not fail the request, just skip add opc-request-id
|
||||||
|
Debugf("unable to generate opc-request-id. %s", err.Error())
|
||||||
|
} else {
|
||||||
|
newValue = reflect.ValueOf(String(requestID))
|
||||||
|
Debugf("add request id for header: %s, with value: %s", headerName, requestID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ var (
|
||||||
defaultGenericHeaders = []string{"date", "(request-target)", "host"}
|
defaultGenericHeaders = []string{"date", "(request-target)", "host"}
|
||||||
defaultBodyHeaders = []string{"content-length", "content-type", "x-content-sha256"}
|
defaultBodyHeaders = []string{"content-length", "content-type", "x-content-sha256"}
|
||||||
defaultBodyHashPredicate = func(r *http.Request) bool {
|
defaultBodyHashPredicate = func(r *http.Request) bool {
|
||||||
return r.Method == http.MethodPost || r.Method == http.MethodPut
|
return r.Method == http.MethodPost || r.Method == http.MethodPut || r.Method == http.MethodPatch
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -55,6 +55,15 @@ func DefaultRequestSigner(provider KeyProvider) HTTPRequestSigner {
|
||||||
return RequestSigner(provider, defaultGenericHeaders, defaultBodyHeaders)
|
return RequestSigner(provider, defaultGenericHeaders, defaultBodyHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RequestSignerExcludeBody creates a signer without hash the body.
|
||||||
|
func RequestSignerExcludeBody(provider KeyProvider) HTTPRequestSigner {
|
||||||
|
bodyHashPredicate := func(r *http.Request) bool {
|
||||||
|
// week request signer will not hash the body
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return RequestSignerWithBodyHashingPredicate(provider, defaultGenericHeaders, defaultBodyHeaders, bodyHashPredicate)
|
||||||
|
}
|
||||||
|
|
||||||
// RequestSigner creates a signer that utilizes the specified headers for signing
|
// RequestSigner creates a signer that utilizes the specified headers for signing
|
||||||
// and the default predicate for using the body of the request as part of the signature
|
// and the default predicate for using the body of the request as part of the signature
|
||||||
func RequestSigner(provider KeyProvider, genericHeaders, bodyHeaders []string) HTTPRequestSigner {
|
func RequestSigner(provider KeyProvider, genericHeaders, bodyHeaders []string) HTTPRequestSigner {
|
||||||
|
@ -125,7 +134,7 @@ func calculateHashOfBody(request *http.Request) (err error) {
|
||||||
} else {
|
} else {
|
||||||
hash = hashAndEncode([]byte(""))
|
hash = hashAndEncode([]byte(""))
|
||||||
}
|
}
|
||||||
request.Header.Set("X-Content-Sha256", hash)
|
request.Header.Set(requestHeaderXContentSHA256, hash)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +233,7 @@ func (signer ociRequestSigner) Sign(request *http.Request) (err error) {
|
||||||
authValue := fmt.Sprintf("Signature version=\"%s\",headers=\"%s\",keyId=\"%s\",algorithm=\"rsa-sha256\",signature=\"%s\"",
|
authValue := fmt.Sprintf("Signature version=\"%s\",headers=\"%s\",keyId=\"%s\",algorithm=\"rsa-sha256\",signature=\"%s\"",
|
||||||
signerVersion, signingHeaders, keyID, signature)
|
signerVersion, signingHeaders, keyID, signature)
|
||||||
|
|
||||||
request.Header.Set("Authorization", authValue)
|
request.Header.Set(requestHeaderAuthorization, authValue)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
@ -18,34 +17,32 @@ var mainLog = log.New(os.Stderr, "", log.Ldate|log.Ltime|log.Lshortfile)
|
||||||
var isDebugLogEnabled bool
|
var isDebugLogEnabled bool
|
||||||
var checkDebug sync.Once
|
var checkDebug sync.Once
|
||||||
|
|
||||||
func getOutputForEnv() (writer io.Writer) {
|
func setOutputForEnv() {
|
||||||
checkDebug.Do(func() {
|
checkDebug.Do(func() {
|
||||||
isDebugLogEnabled = *new(bool)
|
isDebugLogEnabled = *new(bool)
|
||||||
_, isDebugLogEnabled = os.LookupEnv("OCI_GO_SDK_DEBUG")
|
_, isDebugLogEnabled = os.LookupEnv("OCI_GO_SDK_DEBUG")
|
||||||
})
|
|
||||||
|
|
||||||
writer = ioutil.Discard
|
if !isDebugLogEnabled {
|
||||||
if isDebugLogEnabled {
|
debugLog.SetOutput(ioutil.Discard)
|
||||||
writer = os.Stderr
|
}
|
||||||
}
|
})
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugf logs v with the provided format if debug mode is set
|
// Debugf logs v with the provided format if debug mode is set
|
||||||
func Debugf(format string, v ...interface{}) {
|
func Debugf(format string, v ...interface{}) {
|
||||||
debugLog.SetOutput(getOutputForEnv())
|
setOutputForEnv()
|
||||||
debugLog.Output(3, fmt.Sprintf(format, v...))
|
debugLog.Output(3, fmt.Sprintf(format, v...))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug logs v if debug mode is set
|
// Debug logs v if debug mode is set
|
||||||
func Debug(v ...interface{}) {
|
func Debug(v ...interface{}) {
|
||||||
debugLog.SetOutput(getOutputForEnv())
|
setOutputForEnv()
|
||||||
debugLog.Output(3, fmt.Sprint(v...))
|
debugLog.Output(3, fmt.Sprint(v...))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugln logs v appending a new line if debug mode is set
|
// Debugln logs v appending a new line if debug mode is set
|
||||||
func Debugln(v ...interface{}) {
|
func Debugln(v ...interface{}) {
|
||||||
debugLog.SetOutput(getOutputForEnv())
|
setOutputForEnv()
|
||||||
debugLog.Output(3, fmt.Sprintln(v...))
|
debugLog.Output(3, fmt.Sprintln(v...))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
package common
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"math/rand"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// UnlimitedNumAttemptsValue is the value for indicating unlimited attempts for reaching success
|
||||||
|
UnlimitedNumAttemptsValue = uint(0)
|
||||||
|
|
||||||
|
// number of characters contained in the generated retry token
|
||||||
|
generatedRetryTokenLength = 30
|
||||||
|
)
|
||||||
|
|
||||||
|
// OCIRetryableRequest represents a request that can be reissued according to the specified policy.
|
||||||
|
type OCIRetryableRequest interface {
|
||||||
|
// Any retryable request must implement the OCIRequest interface
|
||||||
|
OCIRequest
|
||||||
|
|
||||||
|
// Each operation specifies default retry behavior. By passing no arguments to this method, the default retry
|
||||||
|
// behavior, as determined on a per-operation-basis, will be honored. Variadic retry policy option arguments
|
||||||
|
// passed to this method will override the default behavior.
|
||||||
|
RetryPolicy() *RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// OCIOperationResponse represents the output of an OCIOperation, with additional context of error message
|
||||||
|
// and operation attempt number.
|
||||||
|
type OCIOperationResponse struct {
|
||||||
|
// Response from OCI Operation
|
||||||
|
Response OCIResponse
|
||||||
|
|
||||||
|
// Error from OCI Operation
|
||||||
|
Error error
|
||||||
|
|
||||||
|
// Operation Attempt Number (one-based)
|
||||||
|
AttemptNumber uint
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewOCIOperationResponse assembles an OCI Operation Response object.
|
||||||
|
func NewOCIOperationResponse(response OCIResponse, err error, attempt uint) OCIOperationResponse {
|
||||||
|
return OCIOperationResponse{
|
||||||
|
Response: response,
|
||||||
|
Error: err,
|
||||||
|
AttemptNumber: attempt,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy is the class that holds all relevant information for retrying operations.
|
||||||
|
type RetryPolicy struct {
|
||||||
|
// MaximumNumberAttempts is the maximum number of times to retry a request. Zero indicates an unlimited
|
||||||
|
// number of attempts.
|
||||||
|
MaximumNumberAttempts uint
|
||||||
|
|
||||||
|
// ShouldRetryOperation inspects the http response, error, and operation attempt number, and
|
||||||
|
// - returns true if we should retry the operation
|
||||||
|
// - returns false otherwise
|
||||||
|
ShouldRetryOperation func(OCIOperationResponse) bool
|
||||||
|
|
||||||
|
// GetNextDuration computes the duration to pause between operation retries.
|
||||||
|
NextDuration func(OCIOperationResponse) time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// NoRetryPolicy is a helper method that assembles and returns a return policy that indicates an operation should
|
||||||
|
// never be retried (the operation is performed exactly once).
|
||||||
|
func NoRetryPolicy() RetryPolicy {
|
||||||
|
dontRetryOperation := func(OCIOperationResponse) bool { return false }
|
||||||
|
zeroNextDuration := func(OCIOperationResponse) time.Duration { return 0 * time.Second }
|
||||||
|
return NewRetryPolicy(uint(1), dontRetryOperation, zeroNextDuration)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRetryPolicy is a helper method for assembling a Retry Policy object.
|
||||||
|
func NewRetryPolicy(attempts uint, retryOperation func(OCIOperationResponse) bool, nextDuration func(OCIOperationResponse) time.Duration) RetryPolicy {
|
||||||
|
return RetryPolicy{
|
||||||
|
MaximumNumberAttempts: attempts,
|
||||||
|
ShouldRetryOperation: retryOperation,
|
||||||
|
NextDuration: nextDuration,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// shouldContinueIssuingRequests returns true if we should continue retrying a request, based on the current attempt
|
||||||
|
// number and the maximum number of attempts specified, or false otherwise.
|
||||||
|
func shouldContinueIssuingRequests(current, maximum uint) bool {
|
||||||
|
return maximum == UnlimitedNumAttemptsValue || current <= maximum
|
||||||
|
}
|
||||||
|
|
||||||
|
// generateRetryToken generates a retry token that must be included on any request passed to the Retry method.
|
||||||
|
func generateRetryToken() string {
|
||||||
|
alphanumericChars := []rune("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
||||||
|
retryToken := make([]rune, generatedRetryTokenLength)
|
||||||
|
for i := range retryToken {
|
||||||
|
retryToken[i] = alphanumericChars[rand.Intn(len(alphanumericChars))]
|
||||||
|
}
|
||||||
|
return string(retryToken)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retry is a package-level operation that executes the retryable request using the specified operation and retry policy.
|
||||||
|
func Retry(ctx context.Context, request OCIRetryableRequest, operation OCIOperation, policy RetryPolicy) (OCIResponse, error) {
|
||||||
|
// use a one-based counter because it's easier to think about operation retry in terms of attempt numbering
|
||||||
|
for currentOperationAttempt := uint(1); shouldContinueIssuingRequests(currentOperationAttempt, policy.MaximumNumberAttempts); currentOperationAttempt++ {
|
||||||
|
Debugln(fmt.Sprintf("operation attempt #%v", currentOperationAttempt))
|
||||||
|
response, err := operation(ctx, request)
|
||||||
|
operationResponse := NewOCIOperationResponse(response, err, currentOperationAttempt)
|
||||||
|
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
// return why the request was aborted (could be user interrupted or deadline exceeded)
|
||||||
|
// => include last received response for information (user may choose to re-issue request)
|
||||||
|
return response, ctx.Err()
|
||||||
|
default:
|
||||||
|
// non-blocking select
|
||||||
|
}
|
||||||
|
|
||||||
|
if policy.ShouldRetryOperation(operationResponse) {
|
||||||
|
// this conditional is explicitly not added to the encompassing if condition to retry based on response
|
||||||
|
// => it is only to determine if, on the last round of this loop, we still skip sleeping (if we're the
|
||||||
|
// last attempt, then there's no point sleeping before we round the loop again and fall out to the
|
||||||
|
// Maximum Number Attempts exceeded error)
|
||||||
|
if currentOperationAttempt != policy.MaximumNumberAttempts {
|
||||||
|
// sleep before retrying the operation
|
||||||
|
duration := policy.NextDuration(operationResponse)
|
||||||
|
if deadline, ok := ctx.Deadline(); ok && time.Now().Add(duration).After(deadline) {
|
||||||
|
// we want to retry the operation, but the policy is telling us to wait for a duration that exceeds
|
||||||
|
// the specified overall deadline for the operation => instead of waiting for however long that
|
||||||
|
// time period is and then aborting, abort now and save the cycles
|
||||||
|
return response, DeadlineExceededByBackoff
|
||||||
|
}
|
||||||
|
Debugln(fmt.Sprintf("waiting %v before retrying operation", duration))
|
||||||
|
time.Sleep(duration)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// we should NOT retry operation based on response and/or error => return
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("maximum number of attempts exceeded (%v)", policy.MaximumNumberAttempts)
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
major = "1"
|
major = "1"
|
||||||
minor = "0"
|
minor = "8"
|
||||||
patch = "0"
|
patch = "0"
|
||||||
tag = ""
|
tag = ""
|
||||||
)
|
)
|
||||||
|
|
27
vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go
generated
vendored
Normal file
27
vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AddOnOptions The properties that define options for supported add-ons.
|
||||||
|
type AddOnOptions struct {
|
||||||
|
|
||||||
|
// Whether or not to enable the Kubernetes Dashboard add-on.
|
||||||
|
IsKubernetesDashboardEnabled *bool `mandatory:"false" json:"isKubernetesDashboardEnabled"`
|
||||||
|
|
||||||
|
// Whether or not to enable the Tiller add-on.
|
||||||
|
IsTillerEnabled *bool `mandatory:"false" json:"isTillerEnabled"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m AddOnOptions) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Cluster A Kubernetes cluster.
|
||||||
|
type Cluster struct {
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The name of the cluster.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the cluster exists.
|
||||||
|
CompartmentId *string `mandatory:"false" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the virtual cloud network (VCN) in which the cluster exists.
|
||||||
|
VcnId *string `mandatory:"false" json:"vcnId"`
|
||||||
|
|
||||||
|
// The version of Kubernetes running on the cluster masters.
|
||||||
|
KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// Optional attributes for the cluster.
|
||||||
|
Options *ClusterCreateOptions `mandatory:"false" json:"options"`
|
||||||
|
|
||||||
|
// Metadata about the cluster.
|
||||||
|
Metadata *ClusterMetadata `mandatory:"false" json:"metadata"`
|
||||||
|
|
||||||
|
// The state of the cluster masters.
|
||||||
|
LifecycleState ClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"`
|
||||||
|
|
||||||
|
// Details about the state of the cluster masters.
|
||||||
|
LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"`
|
||||||
|
|
||||||
|
// Endpoints served up by the cluster masters.
|
||||||
|
Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"`
|
||||||
|
|
||||||
|
// Available Kubernetes versions to which the clusters masters may be upgraded.
|
||||||
|
AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Cluster) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClusterLifecycleStateEnum Enum with underlying type: string
|
||||||
|
type ClusterLifecycleStateEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ClusterLifecycleState
|
||||||
|
const (
|
||||||
|
ClusterLifecycleStateCreating ClusterLifecycleStateEnum = "CREATING"
|
||||||
|
ClusterLifecycleStateActive ClusterLifecycleStateEnum = "ACTIVE"
|
||||||
|
ClusterLifecycleStateFailed ClusterLifecycleStateEnum = "FAILED"
|
||||||
|
ClusterLifecycleStateDeleting ClusterLifecycleStateEnum = "DELETING"
|
||||||
|
ClusterLifecycleStateDeleted ClusterLifecycleStateEnum = "DELETED"
|
||||||
|
ClusterLifecycleStateUpdating ClusterLifecycleStateEnum = "UPDATING"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingClusterLifecycleState = map[string]ClusterLifecycleStateEnum{
|
||||||
|
"CREATING": ClusterLifecycleStateCreating,
|
||||||
|
"ACTIVE": ClusterLifecycleStateActive,
|
||||||
|
"FAILED": ClusterLifecycleStateFailed,
|
||||||
|
"DELETING": ClusterLifecycleStateDeleting,
|
||||||
|
"DELETED": ClusterLifecycleStateDeleted,
|
||||||
|
"UPDATING": ClusterLifecycleStateUpdating,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClusterLifecycleStateEnumValues Enumerates the set of values for ClusterLifecycleState
|
||||||
|
func GetClusterLifecycleStateEnumValues() []ClusterLifecycleStateEnum {
|
||||||
|
values := make([]ClusterLifecycleStateEnum, 0)
|
||||||
|
for _, v := range mappingClusterLifecycleState {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
30
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go
generated
vendored
Normal file
30
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterCreateOptions The properties that define extra options for a cluster.
|
||||||
|
type ClusterCreateOptions struct {
|
||||||
|
|
||||||
|
// The OCIDs of the subnets used for Kubernetes services load balancers.
|
||||||
|
ServiceLbSubnetIds []string `mandatory:"false" json:"serviceLbSubnetIds"`
|
||||||
|
|
||||||
|
// Network configuration for Kubernetes.
|
||||||
|
KubernetesNetworkConfig *KubernetesNetworkConfig `mandatory:"false" json:"kubernetesNetworkConfig"`
|
||||||
|
|
||||||
|
// Configurable cluster add-ons
|
||||||
|
AddOns *AddOnOptions `mandatory:"false" json:"addOns"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ClusterCreateOptions) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
24
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go
generated
vendored
Normal file
24
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterEndpoints The properties that define endpoints for a cluster.
|
||||||
|
type ClusterEndpoints struct {
|
||||||
|
|
||||||
|
// The Kubernetes API server endpoint.
|
||||||
|
Kubernetes *string `mandatory:"false" json:"kubernetes"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ClusterEndpoints) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
21
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go
generated
vendored
Normal file
21
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterLifecycleState The lifecycle state of a cluster.
|
||||||
|
type ClusterLifecycleState struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ClusterLifecycleState) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
48
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go
generated
vendored
Normal file
48
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterMetadata The properties that define meta data for a cluster.
|
||||||
|
type ClusterMetadata struct {
|
||||||
|
|
||||||
|
// The time the cluster was created.
|
||||||
|
TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"`
|
||||||
|
|
||||||
|
// The user who created the cluster.
|
||||||
|
CreatedByUserId *string `mandatory:"false" json:"createdByUserId"`
|
||||||
|
|
||||||
|
// The OCID of the work request which created the cluster.
|
||||||
|
CreatedByWorkRequestId *string `mandatory:"false" json:"createdByWorkRequestId"`
|
||||||
|
|
||||||
|
// The time the cluster was deleted.
|
||||||
|
TimeDeleted *common.SDKTime `mandatory:"false" json:"timeDeleted"`
|
||||||
|
|
||||||
|
// The user who deleted the cluster.
|
||||||
|
DeletedByUserId *string `mandatory:"false" json:"deletedByUserId"`
|
||||||
|
|
||||||
|
// The OCID of the work request which deleted the cluster.
|
||||||
|
DeletedByWorkRequestId *string `mandatory:"false" json:"deletedByWorkRequestId"`
|
||||||
|
|
||||||
|
// The time the cluster was updated.
|
||||||
|
TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"`
|
||||||
|
|
||||||
|
// The user who updated the cluster.
|
||||||
|
UpdatedByUserId *string `mandatory:"false" json:"updatedByUserId"`
|
||||||
|
|
||||||
|
// The OCID of the work request which updated the cluster.
|
||||||
|
UpdatedByWorkRequestId *string `mandatory:"false" json:"updatedByWorkRequestId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ClusterMetadata) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
24
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go
generated
vendored
Normal file
24
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterOptions Options for creating or updating clusters.
|
||||||
|
type ClusterOptions struct {
|
||||||
|
|
||||||
|
// Available Kubernetes versions.
|
||||||
|
KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ClusterOptions) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
85
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go
generated
vendored
Normal file
85
vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go
generated
vendored
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterSummary The properties that define a cluster summary.
|
||||||
|
type ClusterSummary struct {
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The name of the cluster.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the cluster exists.
|
||||||
|
CompartmentId *string `mandatory:"false" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the virtual cloud network (VCN) in which the cluster exists
|
||||||
|
VcnId *string `mandatory:"false" json:"vcnId"`
|
||||||
|
|
||||||
|
// The version of Kubernetes running on the cluster masters.
|
||||||
|
KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// Optional attributes for the cluster.
|
||||||
|
Options *ClusterCreateOptions `mandatory:"false" json:"options"`
|
||||||
|
|
||||||
|
// Metadata about the cluster.
|
||||||
|
Metadata *ClusterMetadata `mandatory:"false" json:"metadata"`
|
||||||
|
|
||||||
|
// The state of the cluster masters.
|
||||||
|
LifecycleState ClusterSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"`
|
||||||
|
|
||||||
|
// Details about the state of the cluster masters.
|
||||||
|
LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"`
|
||||||
|
|
||||||
|
// Endpoints served up by the cluster masters.
|
||||||
|
Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"`
|
||||||
|
|
||||||
|
// Available Kubernetes versions to which the clusters masters may be upgraded.
|
||||||
|
AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ClusterSummary) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClusterSummaryLifecycleStateEnum Enum with underlying type: string
|
||||||
|
type ClusterSummaryLifecycleStateEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ClusterSummaryLifecycleState
|
||||||
|
const (
|
||||||
|
ClusterSummaryLifecycleStateCreating ClusterSummaryLifecycleStateEnum = "CREATING"
|
||||||
|
ClusterSummaryLifecycleStateActive ClusterSummaryLifecycleStateEnum = "ACTIVE"
|
||||||
|
ClusterSummaryLifecycleStateFailed ClusterSummaryLifecycleStateEnum = "FAILED"
|
||||||
|
ClusterSummaryLifecycleStateDeleting ClusterSummaryLifecycleStateEnum = "DELETING"
|
||||||
|
ClusterSummaryLifecycleStateDeleted ClusterSummaryLifecycleStateEnum = "DELETED"
|
||||||
|
ClusterSummaryLifecycleStateUpdating ClusterSummaryLifecycleStateEnum = "UPDATING"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingClusterSummaryLifecycleState = map[string]ClusterSummaryLifecycleStateEnum{
|
||||||
|
"CREATING": ClusterSummaryLifecycleStateCreating,
|
||||||
|
"ACTIVE": ClusterSummaryLifecycleStateActive,
|
||||||
|
"FAILED": ClusterSummaryLifecycleStateFailed,
|
||||||
|
"DELETING": ClusterSummaryLifecycleStateDeleting,
|
||||||
|
"DELETED": ClusterSummaryLifecycleStateDeleted,
|
||||||
|
"UPDATING": ClusterSummaryLifecycleStateUpdating,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClusterSummaryLifecycleStateEnumValues Enumerates the set of values for ClusterSummaryLifecycleState
|
||||||
|
func GetClusterSummaryLifecycleStateEnumValues() []ClusterSummaryLifecycleStateEnum {
|
||||||
|
values := make([]ClusterSummaryLifecycleStateEnum, 0)
|
||||||
|
for _, v := range mappingClusterSummaryLifecycleState {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
761
vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go
generated
vendored
Normal file
761
vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go
generated
vendored
Normal file
|
@ -0,0 +1,761 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
//ContainerEngineClient a client for ContainerEngine
|
||||||
|
type ContainerEngineClient struct {
|
||||||
|
common.BaseClient
|
||||||
|
config *common.ConfigurationProvider
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewContainerEngineClientWithConfigurationProvider Creates a new default ContainerEngine client with the given configuration provider.
|
||||||
|
// the configuration provider will be used for the default signer as well as reading the region
|
||||||
|
func NewContainerEngineClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ContainerEngineClient, err error) {
|
||||||
|
baseClient, err := common.NewClientWithConfig(configProvider)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
client = ContainerEngineClient{BaseClient: baseClient}
|
||||||
|
client.BasePath = "20180222"
|
||||||
|
err = client.setConfigurationProvider(configProvider)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRegion overrides the region of this client.
|
||||||
|
func (client *ContainerEngineClient) SetRegion(region string) {
|
||||||
|
client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "containerengine", region)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid
|
||||||
|
func (client *ContainerEngineClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error {
|
||||||
|
if ok, err := common.IsConfigurationProviderValid(configProvider); !ok {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error has been checked already
|
||||||
|
region, _ := configProvider.Region()
|
||||||
|
client.SetRegion(region)
|
||||||
|
client.config = &configProvider
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set
|
||||||
|
func (client *ContainerEngineClient) ConfigurationProvider() *common.ConfigurationProvider {
|
||||||
|
return client.config
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateCluster Create a new cluster.
|
||||||
|
func (client ContainerEngineClient) CreateCluster(ctx context.Context, request CreateClusterRequest) (response CreateClusterResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.createCluster, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(CreateClusterResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into CreateClusterResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// createCluster implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) createCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response CreateClusterResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateKubeconfig Create the Kubeconfig YAML for a cluster.
|
||||||
|
func (client ContainerEngineClient) CreateKubeconfig(ctx context.Context, request CreateKubeconfigRequest) (response CreateKubeconfigResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.createKubeconfig, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(CreateKubeconfigResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into CreateKubeconfigResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// createKubeconfig implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) createKubeconfig(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/kubeconfig/content")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response CreateKubeconfigResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateNodePool Create a new node pool.
|
||||||
|
func (client ContainerEngineClient) CreateNodePool(ctx context.Context, request CreateNodePoolRequest) (response CreateNodePoolResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.createNodePool, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(CreateNodePoolResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into CreateNodePoolResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// createNodePool implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) createNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodPost, "/nodePools")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response CreateNodePoolResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCluster Delete a cluster.
|
||||||
|
func (client ContainerEngineClient) DeleteCluster(ctx context.Context, request DeleteClusterRequest) (response DeleteClusterResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.deleteCluster, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(DeleteClusterResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into DeleteClusterResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// deleteCluster implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) deleteCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response DeleteClusterResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteNodePool Delete a node pool.
|
||||||
|
func (client ContainerEngineClient) DeleteNodePool(ctx context.Context, request DeleteNodePoolRequest) (response DeleteNodePoolResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.deleteNodePool, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(DeleteNodePoolResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into DeleteNodePoolResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// deleteNodePool implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) deleteNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodDelete, "/nodePools/{nodePoolId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response DeleteNodePoolResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteWorkRequest Cancel a work request that has not started.
|
||||||
|
func (client ContainerEngineClient) DeleteWorkRequest(ctx context.Context, request DeleteWorkRequestRequest) (response DeleteWorkRequestResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.deleteWorkRequest, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(DeleteWorkRequestResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into DeleteWorkRequestResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// deleteWorkRequest implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) deleteWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workRequests/{workRequestId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response DeleteWorkRequestResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCluster Get the details of a cluster.
|
||||||
|
func (client ContainerEngineClient) GetCluster(ctx context.Context, request GetClusterRequest) (response GetClusterResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.getCluster, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(GetClusterResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into GetClusterResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// getCluster implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) getCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response GetClusterResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClusterOptions Get options available for clusters.
|
||||||
|
func (client ContainerEngineClient) GetClusterOptions(ctx context.Context, request GetClusterOptionsRequest) (response GetClusterOptionsResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.getClusterOptions, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(GetClusterOptionsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into GetClusterOptionsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// getClusterOptions implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) getClusterOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterOptions/{clusterOptionId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response GetClusterOptionsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNodePool Get the details of a node pool.
|
||||||
|
func (client ContainerEngineClient) GetNodePool(ctx context.Context, request GetNodePoolRequest) (response GetNodePoolResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.getNodePool, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(GetNodePoolResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// getNodePool implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) getNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools/{nodePoolId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response GetNodePoolResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNodePoolOptions Get options available for node pools.
|
||||||
|
func (client ContainerEngineClient) GetNodePoolOptions(ctx context.Context, request GetNodePoolOptionsRequest) (response GetNodePoolOptionsResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.getNodePoolOptions, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(GetNodePoolOptionsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolOptionsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// getNodePoolOptions implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) getNodePoolOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePoolOptions/{nodePoolOptionId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response GetNodePoolOptionsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequest Get the details of a work request.
|
||||||
|
func (client ContainerEngineClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// getWorkRequest implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) getWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response GetWorkRequestResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListClusters List all the cluster objects in a compartment.
|
||||||
|
func (client ContainerEngineClient) ListClusters(ctx context.Context, request ListClustersRequest) (response ListClustersResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.listClusters, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(ListClustersResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into ListClustersResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// listClusters implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) listClusters(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ListClustersResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListNodePools List all the node pools in a compartment, and optionally filter by cluster.
|
||||||
|
func (client ContainerEngineClient) ListNodePools(ctx context.Context, request ListNodePoolsRequest) (response ListNodePoolsResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.listNodePools, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(ListNodePoolsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into ListNodePoolsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// listNodePools implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) listNodePools(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ListNodePoolsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestErrors Get the errors of a work request.
|
||||||
|
func (client ContainerEngineClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ListWorkRequestErrorsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestLogs Get the logs of a work request.
|
||||||
|
func (client ContainerEngineClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ListWorkRequestLogsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequests List all work requests in a compartment.
|
||||||
|
func (client ContainerEngineClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// listWorkRequests implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) listWorkRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ListWorkRequestsResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateCluster Update the details of a cluster.
|
||||||
|
func (client ContainerEngineClient) UpdateCluster(ctx context.Context, request UpdateClusterRequest) (response UpdateClusterResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.updateCluster, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(UpdateClusterResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into UpdateClusterResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// updateCluster implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) updateCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response UpdateClusterResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateNodePool Update the details of a node pool.
|
||||||
|
func (client ContainerEngineClient) UpdateNodePool(ctx context.Context, request UpdateNodePoolRequest) (response UpdateNodePoolResponse, err error) {
|
||||||
|
var ociResponse common.OCIResponse
|
||||||
|
policy := common.NoRetryPolicy()
|
||||||
|
if request.RetryPolicy() != nil {
|
||||||
|
policy = *request.RetryPolicy()
|
||||||
|
}
|
||||||
|
ociResponse, err = common.Retry(ctx, request, client.updateNodePool, policy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if convertedResponse, ok := ociResponse.(UpdateNodePoolResponse); ok {
|
||||||
|
response = convertedResponse
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to convert OCIResponse into UpdateNodePoolResponse")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// updateNodePool implements the OCIOperation interface (enables retrying operations)
|
||||||
|
func (client ContainerEngineClient) updateNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
|
||||||
|
httpRequest, err := request.HTTPRequest(http.MethodPut, "/nodePools/{nodePoolId}")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response UpdateNodePoolResponse
|
||||||
|
var httpResponse *http.Response
|
||||||
|
httpResponse, err = client.Call(ctx, &httpRequest)
|
||||||
|
defer common.CloseBodyIfValid(httpResponse)
|
||||||
|
response.RawResponse = httpResponse
|
||||||
|
if err != nil {
|
||||||
|
return response, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = common.UnmarshalResponse(httpResponse, &response)
|
||||||
|
return response, err
|
||||||
|
}
|
36
vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go
generated
vendored
Normal file
36
vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateClusterDetails The properties that define a request to create a cluster.
|
||||||
|
type CreateClusterDetails struct {
|
||||||
|
|
||||||
|
// The name of the cluster. Avoid entering confidential information.
|
||||||
|
Name *string `mandatory:"true" json:"name"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which to create the cluster.
|
||||||
|
CompartmentId *string `mandatory:"true" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the virtual cloud network (VCN) in which to create the cluster.
|
||||||
|
VcnId *string `mandatory:"true" json:"vcnId"`
|
||||||
|
|
||||||
|
// The version of Kubernetes to install into the cluster masters.
|
||||||
|
KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// Optional attributes for the cluster.
|
||||||
|
Options *ClusterCreateOptions `mandatory:"false" json:"options"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m CreateClusterDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
27
vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go
generated
vendored
Normal file
27
vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateClusterKubeconfigContentDetails The properties that define a request to create a cluster kubeconfig.
|
||||||
|
type CreateClusterKubeconfigContentDetails struct {
|
||||||
|
|
||||||
|
// The version of the kubeconfig token.
|
||||||
|
TokenVersion *string `mandatory:"false" json:"tokenVersion"`
|
||||||
|
|
||||||
|
// The desired expiration, in seconds, to use for the kubeconfig token.
|
||||||
|
Expiration *int `mandatory:"false" json:"expiration"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m CreateClusterKubeconfigContentDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateClusterRequest wrapper for the CreateCluster operation
|
||||||
|
type CreateClusterRequest struct {
|
||||||
|
|
||||||
|
// The details of the cluster to create.
|
||||||
|
CreateClusterDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// A token you supply to uniquely identify the request and provide idempotency if
|
||||||
|
// the request is retried. Idempotency tokens expire after 24 hours.
|
||||||
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request CreateClusterRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateClusterRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateClusterRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateClusterResponse wrapper for the CreateCluster operation
|
||||||
|
type CreateClusterResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The OCID of the work request handling the operation.
|
||||||
|
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response CreateClusterResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateClusterResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
65
vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go
generated
vendored
Normal file
65
vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateKubeconfigRequest wrapper for the CreateKubeconfig operation
|
||||||
|
type CreateKubeconfigRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// The details of the cluster kubeconfig to create.
|
||||||
|
CreateClusterKubeconfigContentDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request CreateKubeconfigRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateKubeconfigRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateKubeconfigRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateKubeconfigResponse wrapper for the CreateKubeconfig operation
|
||||||
|
type CreateKubeconfigResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The io.ReadCloser instance
|
||||||
|
Content io.ReadCloser `presentIn:"body" encoding:"binary"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response CreateKubeconfigResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateKubeconfigResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
51
vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go
generated
vendored
Normal file
51
vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateNodePoolDetails The properties that define a request to create a node pool.
|
||||||
|
type CreateNodePoolDetails struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the node pool exists.
|
||||||
|
CompartmentId *string `mandatory:"true" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the cluster to which this node pool is attached.
|
||||||
|
ClusterId *string `mandatory:"true" json:"clusterId"`
|
||||||
|
|
||||||
|
// The name of the node pool. Avoid entering confidential information.
|
||||||
|
Name *string `mandatory:"true" json:"name"`
|
||||||
|
|
||||||
|
// The version of Kubernetes to install on the nodes in the node pool.
|
||||||
|
KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// The name of the image running on the nodes in the node pool.
|
||||||
|
NodeImageName *string `mandatory:"true" json:"nodeImageName"`
|
||||||
|
|
||||||
|
// The name of the node shape of the nodes in the node pool.
|
||||||
|
NodeShape *string `mandatory:"true" json:"nodeShape"`
|
||||||
|
|
||||||
|
// The OCIDs of the subnets in which to place nodes for this node pool.
|
||||||
|
SubnetIds []string `mandatory:"true" json:"subnetIds"`
|
||||||
|
|
||||||
|
// A list of key/value pairs to add to nodes after they join the Kubernetes cluster.
|
||||||
|
InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"`
|
||||||
|
|
||||||
|
// The SSH public key to add to each node in the node pool.
|
||||||
|
SshPublicKey *string `mandatory:"false" json:"sshPublicKey"`
|
||||||
|
|
||||||
|
// The number of nodes to create in each subnet.
|
||||||
|
QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m CreateNodePoolDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateNodePoolRequest wrapper for the CreateNodePool operation
|
||||||
|
type CreateNodePoolRequest struct {
|
||||||
|
|
||||||
|
// The details of the node pool to create.
|
||||||
|
CreateNodePoolDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// A token you supply to uniquely identify the request and provide idempotency if
|
||||||
|
// the request is retried. Idempotency tokens expire after 24 hours.
|
||||||
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request CreateNodePoolRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateNodePoolRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateNodePoolResponse wrapper for the CreateNodePool operation
|
||||||
|
type CreateNodePoolResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The OCID of the work request handling the operation.
|
||||||
|
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response CreateNodePoolResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateNodePoolResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
65
vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go
generated
vendored
Normal file
65
vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeleteClusterRequest wrapper for the DeleteCluster operation
|
||||||
|
type DeleteClusterRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
||||||
|
// parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
||||||
|
// will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
||||||
|
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request DeleteClusterRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request DeleteClusterRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request DeleteClusterRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteClusterResponse wrapper for the DeleteCluster operation
|
||||||
|
type DeleteClusterResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The OCID of the work request handling the operation.
|
||||||
|
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response DeleteClusterResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response DeleteClusterResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
65
vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go
generated
vendored
Normal file
65
vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeleteNodePoolRequest wrapper for the DeleteNodePool operation
|
||||||
|
type DeleteNodePoolRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the node pool.
|
||||||
|
NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
||||||
|
// parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
||||||
|
// will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
||||||
|
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request DeleteNodePoolRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request DeleteNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request DeleteNodePoolRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteNodePoolResponse wrapper for the DeleteNodePool operation
|
||||||
|
type DeleteNodePoolResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The OCID of the work request handling the operation.
|
||||||
|
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response DeleteNodePoolResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response DeleteNodePoolResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
63
vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go
generated
vendored
Normal file
63
vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeleteWorkRequestRequest wrapper for the DeleteWorkRequest operation
|
||||||
|
type DeleteWorkRequestRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the work request.
|
||||||
|
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
||||||
|
// parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
||||||
|
// will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
||||||
|
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request DeleteWorkRequestRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request DeleteWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request DeleteWorkRequestRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteWorkRequestResponse wrapper for the DeleteWorkRequest operation
|
||||||
|
type DeleteWorkRequestResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response DeleteWorkRequestResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response DeleteWorkRequestResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
61
vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go
generated
vendored
Normal file
61
vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetClusterOptionsRequest wrapper for the GetClusterOptions operation
|
||||||
|
type GetClusterOptionsRequest struct {
|
||||||
|
|
||||||
|
// The id of the option set to retrieve. Only "all" is supported.
|
||||||
|
ClusterOptionId *string `mandatory:"true" contributesTo:"path" name:"clusterOptionId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request GetClusterOptionsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request GetClusterOptionsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request GetClusterOptionsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClusterOptionsResponse wrapper for the GetClusterOptions operation
|
||||||
|
type GetClusterOptionsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The ClusterOptions instance
|
||||||
|
ClusterOptions `presentIn:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response GetClusterOptionsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response GetClusterOptionsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetClusterRequest wrapper for the GetCluster operation
|
||||||
|
type GetClusterRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request GetClusterRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request GetClusterRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request GetClusterRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClusterResponse wrapper for the GetCluster operation
|
||||||
|
type GetClusterResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The Cluster instance
|
||||||
|
Cluster `presentIn:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. See `if-match`.
|
||||||
|
Etag *string `presentIn:"header" name:"etag"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response GetClusterResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response GetClusterResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
61
vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go
generated
vendored
Normal file
61
vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetNodePoolOptionsRequest wrapper for the GetNodePoolOptions operation
|
||||||
|
type GetNodePoolOptionsRequest struct {
|
||||||
|
|
||||||
|
// The id of the option set to retrieve. Use "all" get all options, or use a cluster ID to get options specific to the provided cluster.
|
||||||
|
NodePoolOptionId *string `mandatory:"true" contributesTo:"path" name:"nodePoolOptionId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request GetNodePoolOptionsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request GetNodePoolOptionsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request GetNodePoolOptionsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNodePoolOptionsResponse wrapper for the GetNodePoolOptions operation
|
||||||
|
type GetNodePoolOptionsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The NodePoolOptions instance
|
||||||
|
NodePoolOptions `presentIn:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response GetNodePoolOptionsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response GetNodePoolOptionsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetNodePoolRequest wrapper for the GetNodePool operation
|
||||||
|
type GetNodePoolRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the node pool.
|
||||||
|
NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request GetNodePoolRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request GetNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request GetNodePoolRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNodePoolResponse wrapper for the GetNodePool operation
|
||||||
|
type GetNodePoolResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The NodePool instance
|
||||||
|
NodePool `presentIn:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. See `if-match`.
|
||||||
|
Etag *string `presentIn:"header" name:"etag"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response GetNodePoolResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response GetNodePoolResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
67
vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go
generated
vendored
Normal file
67
vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetWorkRequestRequest wrapper for the GetWorkRequest operation
|
||||||
|
type GetWorkRequestRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the work request.
|
||||||
|
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request GetWorkRequestRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request GetWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequestResponse wrapper for the GetWorkRequest operation
|
||||||
|
type GetWorkRequestResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The WorkRequest instance
|
||||||
|
WorkRequest `presentIn:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. See `if-match`.
|
||||||
|
Etag *string `presentIn:"header" name:"etag"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// the number of seconds to should wait before polling this endpoint again
|
||||||
|
RetryAfter *int `presentIn:"header" name:"retry-after"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response GetWorkRequestResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response GetWorkRequestResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// KeyValue The properties that define a key value pair.
|
||||||
|
type KeyValue struct {
|
||||||
|
|
||||||
|
// The key of the pair.
|
||||||
|
Key *string `mandatory:"false" json:"key"`
|
||||||
|
|
||||||
|
// The value of the pair.
|
||||||
|
Value *string `mandatory:"false" json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m KeyValue) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
27
vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go
generated
vendored
Normal file
27
vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// KubernetesNetworkConfig The properties that define the network configuration for Kubernetes.
|
||||||
|
type KubernetesNetworkConfig struct {
|
||||||
|
|
||||||
|
// The CIDR block for Kubernetes pods.
|
||||||
|
PodsCidr *string `mandatory:"false" json:"podsCidr"`
|
||||||
|
|
||||||
|
// The CIDR block for Kubernetes services.
|
||||||
|
ServicesCidr *string `mandatory:"false" json:"servicesCidr"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m KubernetesNetworkConfig) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
163
vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go
generated
vendored
Normal file
163
vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListClustersRequest wrapper for the ListClusters operation
|
||||||
|
type ListClustersRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment.
|
||||||
|
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
||||||
|
|
||||||
|
// A cluster lifecycle state to filter on. Can have multiple parameters of this name.
|
||||||
|
LifecycleState []ListClustersLifecycleStateEnum `contributesTo:"query" name:"lifecycleState" omitEmpty:"true" collectionFormat:"multi"`
|
||||||
|
|
||||||
|
// The name to filter on.
|
||||||
|
Name *string `mandatory:"false" contributesTo:"query" name:"name"`
|
||||||
|
|
||||||
|
// The maximum number of items to return in a paginated "List" call.
|
||||||
|
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
|
||||||
|
|
||||||
|
// The value of the `opc-next-page` response header from the previous "List" call.
|
||||||
|
Page *string `mandatory:"false" contributesTo:"query" name:"page"`
|
||||||
|
|
||||||
|
// The optional order in which to sort the results.
|
||||||
|
SortOrder ListClustersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// The optional field to sort the results by.
|
||||||
|
SortBy ListClustersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request ListClustersRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ListClustersRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ListClustersRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListClustersResponse wrapper for the ListClusters operation
|
||||||
|
type ListClustersResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// A list of []ClusterSummary instances
|
||||||
|
Items []ClusterSummary `presentIn:"body"`
|
||||||
|
|
||||||
|
// For pagination of a list of items. When paging through a list, if this header appears in the response,
|
||||||
|
// then there might be additional items still to get. Include this value as the `page` parameter for the
|
||||||
|
// subsequent GET request.
|
||||||
|
OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response ListClustersResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ListClustersResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListClustersLifecycleStateEnum Enum with underlying type: string
|
||||||
|
type ListClustersLifecycleStateEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListClustersLifecycleState
|
||||||
|
const (
|
||||||
|
ListClustersLifecycleStateCreating ListClustersLifecycleStateEnum = "CREATING"
|
||||||
|
ListClustersLifecycleStateActive ListClustersLifecycleStateEnum = "ACTIVE"
|
||||||
|
ListClustersLifecycleStateFailed ListClustersLifecycleStateEnum = "FAILED"
|
||||||
|
ListClustersLifecycleStateDeleting ListClustersLifecycleStateEnum = "DELETING"
|
||||||
|
ListClustersLifecycleStateDeleted ListClustersLifecycleStateEnum = "DELETED"
|
||||||
|
ListClustersLifecycleStateUpdating ListClustersLifecycleStateEnum = "UPDATING"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListClustersLifecycleState = map[string]ListClustersLifecycleStateEnum{
|
||||||
|
"CREATING": ListClustersLifecycleStateCreating,
|
||||||
|
"ACTIVE": ListClustersLifecycleStateActive,
|
||||||
|
"FAILED": ListClustersLifecycleStateFailed,
|
||||||
|
"DELETING": ListClustersLifecycleStateDeleting,
|
||||||
|
"DELETED": ListClustersLifecycleStateDeleted,
|
||||||
|
"UPDATING": ListClustersLifecycleStateUpdating,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListClustersLifecycleStateEnumValues Enumerates the set of values for ListClustersLifecycleState
|
||||||
|
func GetListClustersLifecycleStateEnumValues() []ListClustersLifecycleStateEnum {
|
||||||
|
values := make([]ListClustersLifecycleStateEnum, 0)
|
||||||
|
for _, v := range mappingListClustersLifecycleState {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListClustersSortOrderEnum Enum with underlying type: string
|
||||||
|
type ListClustersSortOrderEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListClustersSortOrder
|
||||||
|
const (
|
||||||
|
ListClustersSortOrderAsc ListClustersSortOrderEnum = "ASC"
|
||||||
|
ListClustersSortOrderDesc ListClustersSortOrderEnum = "DESC"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListClustersSortOrder = map[string]ListClustersSortOrderEnum{
|
||||||
|
"ASC": ListClustersSortOrderAsc,
|
||||||
|
"DESC": ListClustersSortOrderDesc,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListClustersSortOrderEnumValues Enumerates the set of values for ListClustersSortOrder
|
||||||
|
func GetListClustersSortOrderEnumValues() []ListClustersSortOrderEnum {
|
||||||
|
values := make([]ListClustersSortOrderEnum, 0)
|
||||||
|
for _, v := range mappingListClustersSortOrder {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListClustersSortByEnum Enum with underlying type: string
|
||||||
|
type ListClustersSortByEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListClustersSortBy
|
||||||
|
const (
|
||||||
|
ListClustersSortById ListClustersSortByEnum = "ID"
|
||||||
|
ListClustersSortByName ListClustersSortByEnum = "NAME"
|
||||||
|
ListClustersSortByTimeCreated ListClustersSortByEnum = "TIME_CREATED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListClustersSortBy = map[string]ListClustersSortByEnum{
|
||||||
|
"ID": ListClustersSortById,
|
||||||
|
"NAME": ListClustersSortByName,
|
||||||
|
"TIME_CREATED": ListClustersSortByTimeCreated,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListClustersSortByEnumValues Enumerates the set of values for ListClustersSortBy
|
||||||
|
func GetListClustersSortByEnumValues() []ListClustersSortByEnum {
|
||||||
|
values := make([]ListClustersSortByEnum, 0)
|
||||||
|
for _, v := range mappingListClustersSortBy {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
132
vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go
generated
vendored
Normal file
132
vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListNodePoolsRequest wrapper for the ListNodePools operation
|
||||||
|
type ListNodePoolsRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment.
|
||||||
|
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"`
|
||||||
|
|
||||||
|
// The name to filter on.
|
||||||
|
Name *string `mandatory:"false" contributesTo:"query" name:"name"`
|
||||||
|
|
||||||
|
// The maximum number of items to return in a paginated "List" call.
|
||||||
|
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
|
||||||
|
|
||||||
|
// The value of the `opc-next-page` response header from the previous "List" call.
|
||||||
|
Page *string `mandatory:"false" contributesTo:"query" name:"page"`
|
||||||
|
|
||||||
|
// The optional order in which to sort the results.
|
||||||
|
SortOrder ListNodePoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// The optional field to sort the results by.
|
||||||
|
SortBy ListNodePoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request ListNodePoolsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ListNodePoolsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ListNodePoolsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListNodePoolsResponse wrapper for the ListNodePools operation
|
||||||
|
type ListNodePoolsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// A list of []NodePoolSummary instances
|
||||||
|
Items []NodePoolSummary `presentIn:"body"`
|
||||||
|
|
||||||
|
// For pagination of a list of items. When paging through a list, if this header appears in the response,
|
||||||
|
// then there might be additional items still to get. Include this value as the `page` parameter for the
|
||||||
|
// subsequent GET request.
|
||||||
|
OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response ListNodePoolsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ListNodePoolsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListNodePoolsSortOrderEnum Enum with underlying type: string
|
||||||
|
type ListNodePoolsSortOrderEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListNodePoolsSortOrder
|
||||||
|
const (
|
||||||
|
ListNodePoolsSortOrderAsc ListNodePoolsSortOrderEnum = "ASC"
|
||||||
|
ListNodePoolsSortOrderDesc ListNodePoolsSortOrderEnum = "DESC"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListNodePoolsSortOrder = map[string]ListNodePoolsSortOrderEnum{
|
||||||
|
"ASC": ListNodePoolsSortOrderAsc,
|
||||||
|
"DESC": ListNodePoolsSortOrderDesc,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListNodePoolsSortOrderEnumValues Enumerates the set of values for ListNodePoolsSortOrder
|
||||||
|
func GetListNodePoolsSortOrderEnumValues() []ListNodePoolsSortOrderEnum {
|
||||||
|
values := make([]ListNodePoolsSortOrderEnum, 0)
|
||||||
|
for _, v := range mappingListNodePoolsSortOrder {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListNodePoolsSortByEnum Enum with underlying type: string
|
||||||
|
type ListNodePoolsSortByEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListNodePoolsSortBy
|
||||||
|
const (
|
||||||
|
ListNodePoolsSortById ListNodePoolsSortByEnum = "ID"
|
||||||
|
ListNodePoolsSortByName ListNodePoolsSortByEnum = "NAME"
|
||||||
|
ListNodePoolsSortByTimeCreated ListNodePoolsSortByEnum = "TIME_CREATED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListNodePoolsSortBy = map[string]ListNodePoolsSortByEnum{
|
||||||
|
"ID": ListNodePoolsSortById,
|
||||||
|
"NAME": ListNodePoolsSortByName,
|
||||||
|
"TIME_CREATED": ListNodePoolsSortByTimeCreated,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListNodePoolsSortByEnumValues Enumerates the set of values for ListNodePoolsSortBy
|
||||||
|
func GetListNodePoolsSortByEnumValues() []ListNodePoolsSortByEnum {
|
||||||
|
values := make([]ListNodePoolsSortByEnum, 0)
|
||||||
|
for _, v := range mappingListNodePoolsSortBy {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation
|
||||||
|
type ListWorkRequestErrorsRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment.
|
||||||
|
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the work request.
|
||||||
|
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request ListWorkRequestErrorsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation
|
||||||
|
type ListWorkRequestErrorsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The []WorkRequestError instance
|
||||||
|
Items []WorkRequestError `presentIn:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response ListWorkRequestErrorsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation
|
||||||
|
type ListWorkRequestLogsRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment.
|
||||||
|
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the work request.
|
||||||
|
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request ListWorkRequestLogsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation
|
||||||
|
type ListWorkRequestLogsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The []WorkRequestLogEntry instance
|
||||||
|
Items []WorkRequestLogEntry `presentIn:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response ListWorkRequestLogsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
198
vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go
generated
vendored
Normal file
198
vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListWorkRequestsRequest wrapper for the ListWorkRequests operation
|
||||||
|
type ListWorkRequestsRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment.
|
||||||
|
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"`
|
||||||
|
|
||||||
|
// The OCID of the resource associated with a work request
|
||||||
|
ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"`
|
||||||
|
|
||||||
|
// Type of the resource associated with a work request
|
||||||
|
ResourceType ListWorkRequestsResourceTypeEnum `mandatory:"false" contributesTo:"query" name:"resourceType" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// A work request status to filter on. Can have multiple parameters of this name.
|
||||||
|
Status []ListWorkRequestsStatusEnum `contributesTo:"query" name:"status" omitEmpty:"true" collectionFormat:"multi"`
|
||||||
|
|
||||||
|
// The maximum number of items to return in a paginated "List" call.
|
||||||
|
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
|
||||||
|
|
||||||
|
// The value of the `opc-next-page` response header from the previous "List" call.
|
||||||
|
Page *string `mandatory:"false" contributesTo:"query" name:"page"`
|
||||||
|
|
||||||
|
// The optional order in which to sort the results.
|
||||||
|
SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// The optional field to sort the results by.
|
||||||
|
SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request ListWorkRequestsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestsResponse wrapper for the ListWorkRequests operation
|
||||||
|
type ListWorkRequestsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// A list of []WorkRequestSummary instances
|
||||||
|
Items []WorkRequestSummary `presentIn:"body"`
|
||||||
|
|
||||||
|
// For pagination of a list of items. When paging through a list, if this header appears in the response,
|
||||||
|
// then there might be additional items still to get. Include this value as the `page` parameter for the
|
||||||
|
// subsequent GET request.
|
||||||
|
OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
||||||
|
// particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response ListWorkRequestsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ListWorkRequestsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestsResourceTypeEnum Enum with underlying type: string
|
||||||
|
type ListWorkRequestsResourceTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListWorkRequestsResourceType
|
||||||
|
const (
|
||||||
|
ListWorkRequestsResourceTypeCluster ListWorkRequestsResourceTypeEnum = "CLUSTER"
|
||||||
|
ListWorkRequestsResourceTypeNodepool ListWorkRequestsResourceTypeEnum = "NODEPOOL"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListWorkRequestsResourceType = map[string]ListWorkRequestsResourceTypeEnum{
|
||||||
|
"CLUSTER": ListWorkRequestsResourceTypeCluster,
|
||||||
|
"NODEPOOL": ListWorkRequestsResourceTypeNodepool,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListWorkRequestsResourceTypeEnumValues Enumerates the set of values for ListWorkRequestsResourceType
|
||||||
|
func GetListWorkRequestsResourceTypeEnumValues() []ListWorkRequestsResourceTypeEnum {
|
||||||
|
values := make([]ListWorkRequestsResourceTypeEnum, 0)
|
||||||
|
for _, v := range mappingListWorkRequestsResourceType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestsStatusEnum Enum with underlying type: string
|
||||||
|
type ListWorkRequestsStatusEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListWorkRequestsStatus
|
||||||
|
const (
|
||||||
|
ListWorkRequestsStatusAccepted ListWorkRequestsStatusEnum = "ACCEPTED"
|
||||||
|
ListWorkRequestsStatusInProgress ListWorkRequestsStatusEnum = "IN_PROGRESS"
|
||||||
|
ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED"
|
||||||
|
ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED"
|
||||||
|
ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING"
|
||||||
|
ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListWorkRequestsStatus = map[string]ListWorkRequestsStatusEnum{
|
||||||
|
"ACCEPTED": ListWorkRequestsStatusAccepted,
|
||||||
|
"IN_PROGRESS": ListWorkRequestsStatusInProgress,
|
||||||
|
"FAILED": ListWorkRequestsStatusFailed,
|
||||||
|
"SUCCEEDED": ListWorkRequestsStatusSucceeded,
|
||||||
|
"CANCELING": ListWorkRequestsStatusCanceling,
|
||||||
|
"CANCELED": ListWorkRequestsStatusCanceled,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListWorkRequestsStatusEnumValues Enumerates the set of values for ListWorkRequestsStatus
|
||||||
|
func GetListWorkRequestsStatusEnumValues() []ListWorkRequestsStatusEnum {
|
||||||
|
values := make([]ListWorkRequestsStatusEnum, 0)
|
||||||
|
for _, v := range mappingListWorkRequestsStatus {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestsSortOrderEnum Enum with underlying type: string
|
||||||
|
type ListWorkRequestsSortOrderEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListWorkRequestsSortOrder
|
||||||
|
const (
|
||||||
|
ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC"
|
||||||
|
ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListWorkRequestsSortOrder = map[string]ListWorkRequestsSortOrderEnum{
|
||||||
|
"ASC": ListWorkRequestsSortOrderAsc,
|
||||||
|
"DESC": ListWorkRequestsSortOrderDesc,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrder
|
||||||
|
func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum {
|
||||||
|
values := make([]ListWorkRequestsSortOrderEnum, 0)
|
||||||
|
for _, v := range mappingListWorkRequestsSortOrder {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListWorkRequestsSortByEnum Enum with underlying type: string
|
||||||
|
type ListWorkRequestsSortByEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for ListWorkRequestsSortBy
|
||||||
|
const (
|
||||||
|
ListWorkRequestsSortById ListWorkRequestsSortByEnum = "ID"
|
||||||
|
ListWorkRequestsSortByOperationType ListWorkRequestsSortByEnum = "OPERATION_TYPE"
|
||||||
|
ListWorkRequestsSortByStatus ListWorkRequestsSortByEnum = "STATUS"
|
||||||
|
ListWorkRequestsSortByTimeAccepted ListWorkRequestsSortByEnum = "TIME_ACCEPTED"
|
||||||
|
ListWorkRequestsSortByTimeStarted ListWorkRequestsSortByEnum = "TIME_STARTED"
|
||||||
|
ListWorkRequestsSortByTimeFinished ListWorkRequestsSortByEnum = "TIME_FINISHED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingListWorkRequestsSortBy = map[string]ListWorkRequestsSortByEnum{
|
||||||
|
"ID": ListWorkRequestsSortById,
|
||||||
|
"OPERATION_TYPE": ListWorkRequestsSortByOperationType,
|
||||||
|
"STATUS": ListWorkRequestsSortByStatus,
|
||||||
|
"TIME_ACCEPTED": ListWorkRequestsSortByTimeAccepted,
|
||||||
|
"TIME_STARTED": ListWorkRequestsSortByTimeStarted,
|
||||||
|
"TIME_FINISHED": ListWorkRequestsSortByTimeFinished,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortBy
|
||||||
|
func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum {
|
||||||
|
values := make([]ListWorkRequestsSortByEnum, 0)
|
||||||
|
for _, v := range mappingListWorkRequestsSortBy {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Node The properties that define a node.
|
||||||
|
type Node struct {
|
||||||
|
|
||||||
|
// The OCID of the compute instance backing this node.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The name of the node.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The name of the availability domain in which this node is placed.
|
||||||
|
AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"`
|
||||||
|
|
||||||
|
// The OCID of the subnet in which this node is placed.
|
||||||
|
SubnetId *string `mandatory:"false" json:"subnetId"`
|
||||||
|
|
||||||
|
// The OCID of the node pool to which this node belongs.
|
||||||
|
NodePoolId *string `mandatory:"false" json:"nodePoolId"`
|
||||||
|
|
||||||
|
// The public IP address of this node.
|
||||||
|
PublicIp *string `mandatory:"false" json:"publicIp"`
|
||||||
|
|
||||||
|
// An error that may be associated with the node.
|
||||||
|
NodeError *NodeError `mandatory:"false" json:"nodeError"`
|
||||||
|
|
||||||
|
// The state of the node.
|
||||||
|
LifecycleState NodeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"`
|
||||||
|
|
||||||
|
// Details about the state of the node.
|
||||||
|
LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Node) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NodeLifecycleStateEnum Enum with underlying type: string
|
||||||
|
type NodeLifecycleStateEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for NodeLifecycleState
|
||||||
|
const (
|
||||||
|
NodeLifecycleStateCreating NodeLifecycleStateEnum = "CREATING"
|
||||||
|
NodeLifecycleStateActive NodeLifecycleStateEnum = "ACTIVE"
|
||||||
|
NodeLifecycleStateUpdating NodeLifecycleStateEnum = "UPDATING"
|
||||||
|
NodeLifecycleStateDeleting NodeLifecycleStateEnum = "DELETING"
|
||||||
|
NodeLifecycleStateDeleted NodeLifecycleStateEnum = "DELETED"
|
||||||
|
NodeLifecycleStateFailing NodeLifecycleStateEnum = "FAILING"
|
||||||
|
NodeLifecycleStateInactive NodeLifecycleStateEnum = "INACTIVE"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingNodeLifecycleState = map[string]NodeLifecycleStateEnum{
|
||||||
|
"CREATING": NodeLifecycleStateCreating,
|
||||||
|
"ACTIVE": NodeLifecycleStateActive,
|
||||||
|
"UPDATING": NodeLifecycleStateUpdating,
|
||||||
|
"DELETING": NodeLifecycleStateDeleting,
|
||||||
|
"DELETED": NodeLifecycleStateDeleted,
|
||||||
|
"FAILING": NodeLifecycleStateFailing,
|
||||||
|
"INACTIVE": NodeLifecycleStateInactive,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNodeLifecycleStateEnumValues Enumerates the set of values for NodeLifecycleState
|
||||||
|
func GetNodeLifecycleStateEnumValues() []NodeLifecycleStateEnum {
|
||||||
|
values := make([]NodeLifecycleStateEnum, 0)
|
||||||
|
for _, v := range mappingNodeLifecycleState {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NodeError The properties that define an upstream error while managing a node.
|
||||||
|
type NodeError struct {
|
||||||
|
|
||||||
|
// A short error code that defines the upstream error, meant for programmatic parsing. See API Errors (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
|
||||||
|
Code *string `mandatory:"true" json:"code"`
|
||||||
|
|
||||||
|
// A human-readable error string of the upstream error.
|
||||||
|
Message *string `mandatory:"true" json:"message"`
|
||||||
|
|
||||||
|
// The status of the HTTP response encountered in the upstream error.
|
||||||
|
Status *string `mandatory:"false" json:"status"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the upstream request. If you need to contact Oracle about a particular upstream request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" json:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m NodeError) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NodePool A pool of compute nodes attached to a cluster.
|
||||||
|
type NodePool struct {
|
||||||
|
|
||||||
|
// The OCID of the node pool.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the node pool exists.
|
||||||
|
CompartmentId *string `mandatory:"false" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the cluster to which this node pool is attached.
|
||||||
|
ClusterId *string `mandatory:"false" json:"clusterId"`
|
||||||
|
|
||||||
|
// The name of the node pool.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The version of Kubernetes running on the nodes in the node pool.
|
||||||
|
KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// The OCID of the image running on the nodes in the node pool.
|
||||||
|
NodeImageId *string `mandatory:"false" json:"nodeImageId"`
|
||||||
|
|
||||||
|
// The name of the image running on the nodes in the node pool.
|
||||||
|
NodeImageName *string `mandatory:"false" json:"nodeImageName"`
|
||||||
|
|
||||||
|
// The name of the node shape of the nodes in the node pool.
|
||||||
|
NodeShape *string `mandatory:"false" json:"nodeShape"`
|
||||||
|
|
||||||
|
// A list of key/value pairs to add to nodes after they join the Kubernetes cluster.
|
||||||
|
InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"`
|
||||||
|
|
||||||
|
// The SSH public key on each node in the node pool.
|
||||||
|
SshPublicKey *string `mandatory:"false" json:"sshPublicKey"`
|
||||||
|
|
||||||
|
// The number of nodes in each subnet.
|
||||||
|
QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"`
|
||||||
|
|
||||||
|
// The OCIDs of the subnets in which to place nodes for this node pool.
|
||||||
|
SubnetIds []string `mandatory:"false" json:"subnetIds"`
|
||||||
|
|
||||||
|
// The nodes in the node pool.
|
||||||
|
Nodes []Node `mandatory:"false" json:"nodes"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m NodePool) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
30
vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go
generated
vendored
Normal file
30
vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NodePoolOptions Options for creating or updating node pools.
|
||||||
|
type NodePoolOptions struct {
|
||||||
|
|
||||||
|
// Available Kubernetes versions.
|
||||||
|
KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"`
|
||||||
|
|
||||||
|
// Available Kubernetes versions.
|
||||||
|
Images []string `mandatory:"false" json:"images"`
|
||||||
|
|
||||||
|
// Available shapes for nodes.
|
||||||
|
Shapes []string `mandatory:"false" json:"shapes"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m NodePoolOptions) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
57
vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go
generated
vendored
Normal file
57
vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NodePoolSummary The properties that define a node pool summary.
|
||||||
|
type NodePoolSummary struct {
|
||||||
|
|
||||||
|
// The OCID of the node pool.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the node pool exists.
|
||||||
|
CompartmentId *string `mandatory:"false" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The OCID of the cluster to which this node pool is attached.
|
||||||
|
ClusterId *string `mandatory:"false" json:"clusterId"`
|
||||||
|
|
||||||
|
// The name of the node pool.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The version of Kubernetes running on the nodes in the node pool.
|
||||||
|
KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// The OCID of the image running on the nodes in the node pool.
|
||||||
|
NodeImageId *string `mandatory:"false" json:"nodeImageId"`
|
||||||
|
|
||||||
|
// The name of the image running on the nodes in the node pool.
|
||||||
|
NodeImageName *string `mandatory:"false" json:"nodeImageName"`
|
||||||
|
|
||||||
|
// The name of the node shape of the nodes in the node pool.
|
||||||
|
NodeShape *string `mandatory:"false" json:"nodeShape"`
|
||||||
|
|
||||||
|
// A list of key/value pairs to add to nodes after they join the Kubernetes cluster.
|
||||||
|
InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"`
|
||||||
|
|
||||||
|
// The SSH public key on each node in the node pool.
|
||||||
|
SshPublicKey *string `mandatory:"false" json:"sshPublicKey"`
|
||||||
|
|
||||||
|
// The number of nodes in each subnet.
|
||||||
|
QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"`
|
||||||
|
|
||||||
|
// The OCIDs of the subnets in which to place nodes for this node pool.
|
||||||
|
SubnetIds []string `mandatory:"false" json:"subnetIds"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m NodePoolSummary) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SortOrder The sort order for a list operation.
|
||||||
|
type SortOrder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m SortOrder) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
27
vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go
generated
vendored
Normal file
27
vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateClusterDetails The properties that define a request to update a cluster.
|
||||||
|
type UpdateClusterDetails struct {
|
||||||
|
|
||||||
|
// The new name for the cluster. Avoid entering confidential information.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The version of Kubernetes to which the cluster masters should be upgraded.
|
||||||
|
KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m UpdateClusterDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
68
vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go
generated
vendored
Normal file
68
vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateClusterRequest wrapper for the UpdateCluster operation
|
||||||
|
type UpdateClusterRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the cluster.
|
||||||
|
ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"`
|
||||||
|
|
||||||
|
// The details of the cluster to update.
|
||||||
|
UpdateClusterDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
||||||
|
// parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
||||||
|
// will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
||||||
|
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request UpdateClusterRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request UpdateClusterRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request UpdateClusterRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateClusterResponse wrapper for the UpdateCluster operation
|
||||||
|
type UpdateClusterResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The OCID of the work request handling the operation.
|
||||||
|
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response UpdateClusterResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response UpdateClusterResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
36
vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go
generated
vendored
Normal file
36
vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateNodePoolDetails The properties that define a request to update a node pool.
|
||||||
|
type UpdateNodePoolDetails struct {
|
||||||
|
|
||||||
|
// The new name for the cluster. Avoid entering confidential information.
|
||||||
|
Name *string `mandatory:"false" json:"name"`
|
||||||
|
|
||||||
|
// The version of Kubernetes to which the nodes in the node pool should be upgraded.
|
||||||
|
KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"`
|
||||||
|
|
||||||
|
// The number of nodes to ensure in each subnet.
|
||||||
|
QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"`
|
||||||
|
|
||||||
|
// A list of key/value pairs to add to nodes after they join the Kubernetes cluster.
|
||||||
|
InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"`
|
||||||
|
|
||||||
|
// The OCIDs of the subnets in which to place nodes for this node pool.
|
||||||
|
SubnetIds []string `mandatory:"false" json:"subnetIds"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m UpdateNodePoolDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
68
vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go
generated
vendored
Normal file
68
vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateNodePoolRequest wrapper for the UpdateNodePool operation
|
||||||
|
type UpdateNodePoolRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the node pool.
|
||||||
|
NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"`
|
||||||
|
|
||||||
|
// The fields to update in a node pool.
|
||||||
|
UpdateNodePoolDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
||||||
|
// parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
||||||
|
// will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
||||||
|
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact
|
||||||
|
// Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request UpdateNodePoolRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request UpdateNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request UpdateNodePoolRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateNodePoolResponse wrapper for the UpdateNodePool operation
|
||||||
|
type UpdateNodePoolResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The OCID of the work request handling the operation.
|
||||||
|
OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response UpdateNodePoolResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response UpdateNodePoolResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
109
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go
generated
vendored
Normal file
109
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go
generated
vendored
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequest An asynchronous work request.
|
||||||
|
type WorkRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the work request.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The type of work the work request is doing.
|
||||||
|
OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"`
|
||||||
|
|
||||||
|
// The current status of the work request.
|
||||||
|
Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the work request exists.
|
||||||
|
CompartmentId *string `mandatory:"false" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The resources this work request affects.
|
||||||
|
Resources []WorkRequestResource `mandatory:"false" json:"resources"`
|
||||||
|
|
||||||
|
// The time the work request was accepted.
|
||||||
|
TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"`
|
||||||
|
|
||||||
|
// The time the work request was started.
|
||||||
|
TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"`
|
||||||
|
|
||||||
|
// The time the work request was finished.
|
||||||
|
TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequest) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WorkRequestOperationTypeEnum Enum with underlying type: string
|
||||||
|
type WorkRequestOperationTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for WorkRequestOperationType
|
||||||
|
const (
|
||||||
|
WorkRequestOperationTypeClusterCreate WorkRequestOperationTypeEnum = "CLUSTER_CREATE"
|
||||||
|
WorkRequestOperationTypeClusterUpdate WorkRequestOperationTypeEnum = "CLUSTER_UPDATE"
|
||||||
|
WorkRequestOperationTypeClusterDelete WorkRequestOperationTypeEnum = "CLUSTER_DELETE"
|
||||||
|
WorkRequestOperationTypeNodepoolCreate WorkRequestOperationTypeEnum = "NODEPOOL_CREATE"
|
||||||
|
WorkRequestOperationTypeNodepoolUpdate WorkRequestOperationTypeEnum = "NODEPOOL_UPDATE"
|
||||||
|
WorkRequestOperationTypeNodepoolDelete WorkRequestOperationTypeEnum = "NODEPOOL_DELETE"
|
||||||
|
WorkRequestOperationTypeWorkrequestCancel WorkRequestOperationTypeEnum = "WORKREQUEST_CANCEL"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingWorkRequestOperationType = map[string]WorkRequestOperationTypeEnum{
|
||||||
|
"CLUSTER_CREATE": WorkRequestOperationTypeClusterCreate,
|
||||||
|
"CLUSTER_UPDATE": WorkRequestOperationTypeClusterUpdate,
|
||||||
|
"CLUSTER_DELETE": WorkRequestOperationTypeClusterDelete,
|
||||||
|
"NODEPOOL_CREATE": WorkRequestOperationTypeNodepoolCreate,
|
||||||
|
"NODEPOOL_UPDATE": WorkRequestOperationTypeNodepoolUpdate,
|
||||||
|
"NODEPOOL_DELETE": WorkRequestOperationTypeNodepoolDelete,
|
||||||
|
"WORKREQUEST_CANCEL": WorkRequestOperationTypeWorkrequestCancel,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationType
|
||||||
|
func GetWorkRequestOperationTypeEnumValues() []WorkRequestOperationTypeEnum {
|
||||||
|
values := make([]WorkRequestOperationTypeEnum, 0)
|
||||||
|
for _, v := range mappingWorkRequestOperationType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// WorkRequestStatusEnum Enum with underlying type: string
|
||||||
|
type WorkRequestStatusEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for WorkRequestStatus
|
||||||
|
const (
|
||||||
|
WorkRequestStatusAccepted WorkRequestStatusEnum = "ACCEPTED"
|
||||||
|
WorkRequestStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS"
|
||||||
|
WorkRequestStatusFailed WorkRequestStatusEnum = "FAILED"
|
||||||
|
WorkRequestStatusSucceeded WorkRequestStatusEnum = "SUCCEEDED"
|
||||||
|
WorkRequestStatusCanceling WorkRequestStatusEnum = "CANCELING"
|
||||||
|
WorkRequestStatusCanceled WorkRequestStatusEnum = "CANCELED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingWorkRequestStatus = map[string]WorkRequestStatusEnum{
|
||||||
|
"ACCEPTED": WorkRequestStatusAccepted,
|
||||||
|
"IN_PROGRESS": WorkRequestStatusInProgress,
|
||||||
|
"FAILED": WorkRequestStatusFailed,
|
||||||
|
"SUCCEEDED": WorkRequestStatusSucceeded,
|
||||||
|
"CANCELING": WorkRequestStatusCanceling,
|
||||||
|
"CANCELED": WorkRequestStatusCanceled,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequestStatusEnumValues Enumerates the set of values for WorkRequestStatus
|
||||||
|
func GetWorkRequestStatusEnumValues() []WorkRequestStatusEnum {
|
||||||
|
values := make([]WorkRequestStatusEnum, 0)
|
||||||
|
for _, v := range mappingWorkRequestStatus {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
30
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go
generated
vendored
Normal file
30
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequestError Errors related to a specific work request.
|
||||||
|
type WorkRequestError struct {
|
||||||
|
|
||||||
|
// A short error code that defines the error, meant for programmatic parsing. See API Errors (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
|
||||||
|
Code *string `mandatory:"true" json:"code"`
|
||||||
|
|
||||||
|
// A human-readable error string.
|
||||||
|
Message *string `mandatory:"true" json:"message"`
|
||||||
|
|
||||||
|
// The date and time the error occurred.
|
||||||
|
Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequestError) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
27
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go
generated
vendored
Normal file
27
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequestLogEntry Log entries related to a specific work request.
|
||||||
|
type WorkRequestLogEntry struct {
|
||||||
|
|
||||||
|
// The description of an action that occurred.
|
||||||
|
Message *string `mandatory:"false" json:"message"`
|
||||||
|
|
||||||
|
// The date and time the log entry occurred.
|
||||||
|
Timestamp *string `mandatory:"false" json:"timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequestLogEntry) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
21
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go
generated
vendored
Normal file
21
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequestOperationType The types of work request operations.
|
||||||
|
type WorkRequestOperationType struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequestOperationType) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
64
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go
generated
vendored
Normal file
64
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequestResource The properties that define a work request resource.
|
||||||
|
type WorkRequestResource struct {
|
||||||
|
|
||||||
|
// The way in which this resource was affected by the work tracked by the work request.
|
||||||
|
ActionType WorkRequestResourceActionTypeEnum `mandatory:"false" json:"actionType,omitempty"`
|
||||||
|
|
||||||
|
// The resource type the work request affects.
|
||||||
|
EntityType *string `mandatory:"false" json:"entityType"`
|
||||||
|
|
||||||
|
// The OCID of the resource the work request affects.
|
||||||
|
Identifier *string `mandatory:"false" json:"identifier"`
|
||||||
|
|
||||||
|
// The URI path on which the user can issue a GET request to access the resource metadata.
|
||||||
|
EntityUri *string `mandatory:"false" json:"entityUri"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequestResource) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WorkRequestResourceActionTypeEnum Enum with underlying type: string
|
||||||
|
type WorkRequestResourceActionTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for WorkRequestResourceActionType
|
||||||
|
const (
|
||||||
|
WorkRequestResourceActionTypeCreated WorkRequestResourceActionTypeEnum = "CREATED"
|
||||||
|
WorkRequestResourceActionTypeUpdated WorkRequestResourceActionTypeEnum = "UPDATED"
|
||||||
|
WorkRequestResourceActionTypeDeleted WorkRequestResourceActionTypeEnum = "DELETED"
|
||||||
|
WorkRequestResourceActionTypeRelated WorkRequestResourceActionTypeEnum = "RELATED"
|
||||||
|
WorkRequestResourceActionTypeInProgress WorkRequestResourceActionTypeEnum = "IN_PROGRESS"
|
||||||
|
WorkRequestResourceActionTypeFailed WorkRequestResourceActionTypeEnum = "FAILED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingWorkRequestResourceActionType = map[string]WorkRequestResourceActionTypeEnum{
|
||||||
|
"CREATED": WorkRequestResourceActionTypeCreated,
|
||||||
|
"UPDATED": WorkRequestResourceActionTypeUpdated,
|
||||||
|
"DELETED": WorkRequestResourceActionTypeDeleted,
|
||||||
|
"RELATED": WorkRequestResourceActionTypeRelated,
|
||||||
|
"IN_PROGRESS": WorkRequestResourceActionTypeInProgress,
|
||||||
|
"FAILED": WorkRequestResourceActionTypeFailed,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequestResourceActionTypeEnumValues Enumerates the set of values for WorkRequestResourceActionType
|
||||||
|
func GetWorkRequestResourceActionTypeEnumValues() []WorkRequestResourceActionTypeEnum {
|
||||||
|
values := make([]WorkRequestResourceActionTypeEnum, 0)
|
||||||
|
for _, v := range mappingWorkRequestResourceActionType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
21
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go
generated
vendored
Normal file
21
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequestStatus The status of a work request.
|
||||||
|
type WorkRequestStatus struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequestStatus) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
109
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go
generated
vendored
Normal file
109
vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go
generated
vendored
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
// Container Engine for Kubernetes API
|
||||||
|
//
|
||||||
|
|
||||||
|
package containerengine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WorkRequestSummary The properties that define a work request summary.
|
||||||
|
type WorkRequestSummary struct {
|
||||||
|
|
||||||
|
// The OCID of the work request.
|
||||||
|
Id *string `mandatory:"false" json:"id"`
|
||||||
|
|
||||||
|
// The type of work the work request is doing.
|
||||||
|
OperationType WorkRequestSummaryOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"`
|
||||||
|
|
||||||
|
// The current status of the work request.
|
||||||
|
Status WorkRequestSummaryStatusEnum `mandatory:"false" json:"status,omitempty"`
|
||||||
|
|
||||||
|
// The OCID of the compartment in which the work request exists.
|
||||||
|
CompartmentId *string `mandatory:"false" json:"compartmentId"`
|
||||||
|
|
||||||
|
// The resources this work request affects.
|
||||||
|
Resources []WorkRequestResource `mandatory:"false" json:"resources"`
|
||||||
|
|
||||||
|
// The time the work request was accepted.
|
||||||
|
TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"`
|
||||||
|
|
||||||
|
// The time the work request was started.
|
||||||
|
TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"`
|
||||||
|
|
||||||
|
// The time the work request was finished.
|
||||||
|
TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m WorkRequestSummary) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WorkRequestSummaryOperationTypeEnum Enum with underlying type: string
|
||||||
|
type WorkRequestSummaryOperationTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for WorkRequestSummaryOperationType
|
||||||
|
const (
|
||||||
|
WorkRequestSummaryOperationTypeClusterCreate WorkRequestSummaryOperationTypeEnum = "CLUSTER_CREATE"
|
||||||
|
WorkRequestSummaryOperationTypeClusterUpdate WorkRequestSummaryOperationTypeEnum = "CLUSTER_UPDATE"
|
||||||
|
WorkRequestSummaryOperationTypeClusterDelete WorkRequestSummaryOperationTypeEnum = "CLUSTER_DELETE"
|
||||||
|
WorkRequestSummaryOperationTypeNodepoolCreate WorkRequestSummaryOperationTypeEnum = "NODEPOOL_CREATE"
|
||||||
|
WorkRequestSummaryOperationTypeNodepoolUpdate WorkRequestSummaryOperationTypeEnum = "NODEPOOL_UPDATE"
|
||||||
|
WorkRequestSummaryOperationTypeNodepoolDelete WorkRequestSummaryOperationTypeEnum = "NODEPOOL_DELETE"
|
||||||
|
WorkRequestSummaryOperationTypeWorkrequestCancel WorkRequestSummaryOperationTypeEnum = "WORKREQUEST_CANCEL"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingWorkRequestSummaryOperationType = map[string]WorkRequestSummaryOperationTypeEnum{
|
||||||
|
"CLUSTER_CREATE": WorkRequestSummaryOperationTypeClusterCreate,
|
||||||
|
"CLUSTER_UPDATE": WorkRequestSummaryOperationTypeClusterUpdate,
|
||||||
|
"CLUSTER_DELETE": WorkRequestSummaryOperationTypeClusterDelete,
|
||||||
|
"NODEPOOL_CREATE": WorkRequestSummaryOperationTypeNodepoolCreate,
|
||||||
|
"NODEPOOL_UPDATE": WorkRequestSummaryOperationTypeNodepoolUpdate,
|
||||||
|
"NODEPOOL_DELETE": WorkRequestSummaryOperationTypeNodepoolDelete,
|
||||||
|
"WORKREQUEST_CANCEL": WorkRequestSummaryOperationTypeWorkrequestCancel,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationType
|
||||||
|
func GetWorkRequestSummaryOperationTypeEnumValues() []WorkRequestSummaryOperationTypeEnum {
|
||||||
|
values := make([]WorkRequestSummaryOperationTypeEnum, 0)
|
||||||
|
for _, v := range mappingWorkRequestSummaryOperationType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// WorkRequestSummaryStatusEnum Enum with underlying type: string
|
||||||
|
type WorkRequestSummaryStatusEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for WorkRequestSummaryStatus
|
||||||
|
const (
|
||||||
|
WorkRequestSummaryStatusAccepted WorkRequestSummaryStatusEnum = "ACCEPTED"
|
||||||
|
WorkRequestSummaryStatusInProgress WorkRequestSummaryStatusEnum = "IN_PROGRESS"
|
||||||
|
WorkRequestSummaryStatusFailed WorkRequestSummaryStatusEnum = "FAILED"
|
||||||
|
WorkRequestSummaryStatusSucceeded WorkRequestSummaryStatusEnum = "SUCCEEDED"
|
||||||
|
WorkRequestSummaryStatusCanceling WorkRequestSummaryStatusEnum = "CANCELING"
|
||||||
|
WorkRequestSummaryStatusCanceled WorkRequestSummaryStatusEnum = "CANCELED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingWorkRequestSummaryStatus = map[string]WorkRequestSummaryStatusEnum{
|
||||||
|
"ACCEPTED": WorkRequestSummaryStatusAccepted,
|
||||||
|
"IN_PROGRESS": WorkRequestSummaryStatusInProgress,
|
||||||
|
"FAILED": WorkRequestSummaryStatusFailed,
|
||||||
|
"SUCCEEDED": WorkRequestSummaryStatusSucceeded,
|
||||||
|
"CANCELING": WorkRequestSummaryStatusCanceling,
|
||||||
|
"CANCELED": WorkRequestSummaryStatusCanceled,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWorkRequestSummaryStatusEnumValues Enumerates the set of values for WorkRequestSummaryStatus
|
||||||
|
func GetWorkRequestSummaryStatusEnumValues() []WorkRequestSummaryStatusEnum {
|
||||||
|
values := make([]WorkRequestSummaryStatusEnum, 0)
|
||||||
|
for _, v := range mappingWorkRequestSummaryStatus {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
23
vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go
generated
vendored
23
vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go
generated
vendored
|
@ -20,12 +20,30 @@ type AttachBootVolumeRequest struct {
|
||||||
// has been deleted and purged from the system, then a retry of the original creation request
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
// may be rejected).
|
// may be rejected).
|
||||||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request AttachBootVolumeRequest) String() string {
|
func (request AttachBootVolumeRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request AttachBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request AttachBootVolumeRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// AttachBootVolumeResponse wrapper for the AttachBootVolume operation
|
// AttachBootVolumeResponse wrapper for the AttachBootVolume operation
|
||||||
type AttachBootVolumeResponse struct {
|
type AttachBootVolumeResponse struct {
|
||||||
|
|
||||||
|
@ -46,3 +64,8 @@ type AttachBootVolumeResponse struct {
|
||||||
func (response AttachBootVolumeResponse) String() string {
|
func (response AttachBootVolumeResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response AttachBootVolumeResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -25,6 +25,9 @@ type AttachIScsiVolumeDetails struct {
|
||||||
// A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information.
|
// A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information.
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
DisplayName *string `mandatory:"false" json:"displayName"`
|
||||||
|
|
||||||
|
// Whether the attachment was created in read-only mode.
|
||||||
|
IsReadOnly *bool `mandatory:"false" json:"isReadOnly"`
|
||||||
|
|
||||||
// Whether to use CHAP authentication for the volume attachment. Defaults to false.
|
// Whether to use CHAP authentication for the volume attachment. Defaults to false.
|
||||||
UseChap *bool `mandatory:"false" json:"useChap"`
|
UseChap *bool `mandatory:"false" json:"useChap"`
|
||||||
}
|
}
|
||||||
|
@ -39,6 +42,11 @@ func (m AttachIScsiVolumeDetails) GetInstanceId() *string {
|
||||||
return m.InstanceId
|
return m.InstanceId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GetIsReadOnly returns IsReadOnly
|
||||||
|
func (m AttachIScsiVolumeDetails) GetIsReadOnly() *bool {
|
||||||
|
return m.IsReadOnly
|
||||||
|
}
|
||||||
|
|
||||||
//GetVolumeId returns VolumeId
|
//GetVolumeId returns VolumeId
|
||||||
func (m AttachIScsiVolumeDetails) GetVolumeId() *string {
|
func (m AttachIScsiVolumeDetails) GetVolumeId() *string {
|
||||||
return m.VolumeId
|
return m.VolumeId
|
||||||
|
|
68
vendor/github.com/oracle/oci-go-sdk/core/attach_paravirtualized_volume_details.go
generated
vendored
Normal file
68
vendor/github.com/oracle/oci-go-sdk/core/attach_paravirtualized_volume_details.go
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AttachParavirtualizedVolumeDetails The representation of AttachParavirtualizedVolumeDetails
|
||||||
|
type AttachParavirtualizedVolumeDetails struct {
|
||||||
|
|
||||||
|
// The OCID of the instance.
|
||||||
|
InstanceId *string `mandatory:"true" json:"instanceId"`
|
||||||
|
|
||||||
|
// The OCID of the volume.
|
||||||
|
VolumeId *string `mandatory:"true" json:"volumeId"`
|
||||||
|
|
||||||
|
// A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information.
|
||||||
|
DisplayName *string `mandatory:"false" json:"displayName"`
|
||||||
|
|
||||||
|
// Whether the attachment was created in read-only mode.
|
||||||
|
IsReadOnly *bool `mandatory:"false" json:"isReadOnly"`
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetDisplayName returns DisplayName
|
||||||
|
func (m AttachParavirtualizedVolumeDetails) GetDisplayName() *string {
|
||||||
|
return m.DisplayName
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetInstanceId returns InstanceId
|
||||||
|
func (m AttachParavirtualizedVolumeDetails) GetInstanceId() *string {
|
||||||
|
return m.InstanceId
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetIsReadOnly returns IsReadOnly
|
||||||
|
func (m AttachParavirtualizedVolumeDetails) GetIsReadOnly() *bool {
|
||||||
|
return m.IsReadOnly
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetVolumeId returns VolumeId
|
||||||
|
func (m AttachParavirtualizedVolumeDetails) GetVolumeId() *string {
|
||||||
|
return m.VolumeId
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m AttachParavirtualizedVolumeDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalJSON marshals to json representation
|
||||||
|
func (m AttachParavirtualizedVolumeDetails) MarshalJSON() (buff []byte, e error) {
|
||||||
|
type MarshalTypeAttachParavirtualizedVolumeDetails AttachParavirtualizedVolumeDetails
|
||||||
|
s := struct {
|
||||||
|
DiscriminatorParam string `json:"type"`
|
||||||
|
MarshalTypeAttachParavirtualizedVolumeDetails
|
||||||
|
}{
|
||||||
|
"paravirtualized",
|
||||||
|
(MarshalTypeAttachParavirtualizedVolumeDetails)(m),
|
||||||
|
}
|
||||||
|
|
||||||
|
return json.Marshal(&s)
|
||||||
|
}
|
69
vendor/github.com/oracle/oci-go-sdk/core/attach_service_id_request_response.go
generated
vendored
Normal file
69
vendor/github.com/oracle/oci-go-sdk/core/attach_service_id_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AttachServiceIdRequest wrapper for the AttachServiceId operation
|
||||||
|
type AttachServiceIdRequest struct {
|
||||||
|
|
||||||
|
// The service gateway's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
||||||
|
ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"`
|
||||||
|
|
||||||
|
// ServiceId of Service to be attached to a Service Gateway.
|
||||||
|
AttachServiceDetails ServiceIdRequestDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
||||||
|
// parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
||||||
|
// will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
||||||
|
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request AttachServiceIdRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request AttachServiceIdRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request AttachServiceIdRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// AttachServiceIdResponse wrapper for the AttachServiceId operation
|
||||||
|
type AttachServiceIdResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The ServiceGateway instance
|
||||||
|
ServiceGateway `presentIn:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
|
||||||
|
// a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response AttachServiceIdResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response AttachServiceIdResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
|
@ -20,12 +20,30 @@ type AttachVnicRequest struct {
|
||||||
// has been deleted and purged from the system, then a retry of the original creation request
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
// may be rejected).
|
// may be rejected).
|
||||||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request AttachVnicRequest) String() string {
|
func (request AttachVnicRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request AttachVnicRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request AttachVnicRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// AttachVnicResponse wrapper for the AttachVnic operation
|
// AttachVnicResponse wrapper for the AttachVnic operation
|
||||||
type AttachVnicResponse struct {
|
type AttachVnicResponse struct {
|
||||||
|
|
||||||
|
@ -46,3 +64,8 @@ type AttachVnicResponse struct {
|
||||||
func (response AttachVnicResponse) String() string {
|
func (response AttachVnicResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response AttachVnicResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@ type AttachVolumeDetails interface {
|
||||||
|
|
||||||
// A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information.
|
// A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information.
|
||||||
GetDisplayName() *string
|
GetDisplayName() *string
|
||||||
|
|
||||||
|
// Whether the attachment was created in read-only mode.
|
||||||
|
GetIsReadOnly() *bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type attachvolumedetails struct {
|
type attachvolumedetails struct {
|
||||||
|
@ -31,6 +34,7 @@ type attachvolumedetails struct {
|
||||||
InstanceId *string `mandatory:"true" json:"instanceId"`
|
InstanceId *string `mandatory:"true" json:"instanceId"`
|
||||||
VolumeId *string `mandatory:"true" json:"volumeId"`
|
VolumeId *string `mandatory:"true" json:"volumeId"`
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
DisplayName *string `mandatory:"false" json:"displayName"`
|
||||||
|
IsReadOnly *bool `mandatory:"false" json:"isReadOnly"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +52,7 @@ func (m *attachvolumedetails) UnmarshalJSON(data []byte) error {
|
||||||
m.InstanceId = s.Model.InstanceId
|
m.InstanceId = s.Model.InstanceId
|
||||||
m.VolumeId = s.Model.VolumeId
|
m.VolumeId = s.Model.VolumeId
|
||||||
m.DisplayName = s.Model.DisplayName
|
m.DisplayName = s.Model.DisplayName
|
||||||
|
m.IsReadOnly = s.Model.IsReadOnly
|
||||||
m.Type = s.Model.Type
|
m.Type = s.Model.Type
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
@ -61,6 +66,10 @@ func (m *attachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}
|
||||||
mm := AttachIScsiVolumeDetails{}
|
mm := AttachIScsiVolumeDetails{}
|
||||||
err = json.Unmarshal(data, &mm)
|
err = json.Unmarshal(data, &mm)
|
||||||
return mm, err
|
return mm, err
|
||||||
|
case "paravirtualized":
|
||||||
|
mm := AttachParavirtualizedVolumeDetails{}
|
||||||
|
err = json.Unmarshal(data, &mm)
|
||||||
|
return mm, err
|
||||||
default:
|
default:
|
||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
@ -81,6 +90,11 @@ func (m attachvolumedetails) GetDisplayName() *string {
|
||||||
return m.DisplayName
|
return m.DisplayName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GetIsReadOnly returns IsReadOnly
|
||||||
|
func (m attachvolumedetails) GetIsReadOnly() *bool {
|
||||||
|
return m.IsReadOnly
|
||||||
|
}
|
||||||
|
|
||||||
func (m attachvolumedetails) String() string {
|
func (m attachvolumedetails) String() string {
|
||||||
return common.PointerString(m)
|
return common.PointerString(m)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,30 @@ type AttachVolumeRequest struct {
|
||||||
// has been deleted and purged from the system, then a retry of the original creation request
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
// may be rejected).
|
// may be rejected).
|
||||||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request AttachVolumeRequest) String() string {
|
func (request AttachVolumeRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request AttachVolumeRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request AttachVolumeRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// AttachVolumeResponse wrapper for the AttachVolume operation
|
// AttachVolumeResponse wrapper for the AttachVolume operation
|
||||||
type AttachVolumeResponse struct {
|
type AttachVolumeResponse struct {
|
||||||
|
|
||||||
|
@ -46,3 +64,8 @@ type AttachVolumeResponse struct {
|
||||||
func (response AttachVolumeResponse) String() string {
|
func (response AttachVolumeResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response AttachVolumeResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"github.com/oracle/oci-go-sdk/common"
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BootVolume A detachable boot volume device that contains the image used to boot an Compute instance. For more information, see
|
// BootVolume A detachable boot volume device that contains the image used to boot a Compute instance. For more information, see
|
||||||
// Overview of Boot Volumes (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumes.htm).
|
// Overview of Boot Volumes (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumes.htm).
|
||||||
// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
|
// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
|
||||||
// talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
// talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
||||||
|
@ -39,21 +40,86 @@ type BootVolume struct {
|
||||||
// The date and time the boot volume was created. Format defined by RFC3339.
|
// The date and time the boot volume was created. Format defined by RFC3339.
|
||||||
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
|
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, and it's changeable.
|
// A user-friendly name. Does not have to be unique, and it's changeable.
|
||||||
// Avoid entering confidential information.
|
// Avoid entering confidential information.
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
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 image OCID used to create the boot volume.
|
// The image OCID used to create the boot volume.
|
||||||
ImageId *string `mandatory:"false" json:"imageId"`
|
ImageId *string `mandatory:"false" json:"imageId"`
|
||||||
|
|
||||||
|
// Specifies whether the boot volume's data has finished copying from the source boot volume or boot volume backup.
|
||||||
|
IsHydrated *bool `mandatory:"false" json:"isHydrated"`
|
||||||
|
|
||||||
// The size of the boot volume in GBs.
|
// The size of the boot volume in GBs.
|
||||||
SizeInGBs *int `mandatory:"false" json:"sizeInGBs"`
|
SizeInGBs *int `mandatory:"false" json:"sizeInGBs"`
|
||||||
|
|
||||||
|
// The boot volume source, either an existing boot volume in the same Availability Domain or a boot volume backup.
|
||||||
|
// If null, this means that the boot volume was created from an image.
|
||||||
|
SourceDetails BootVolumeSourceDetails `mandatory:"false" json:"sourceDetails"`
|
||||||
|
|
||||||
|
// The OCID of the source volume group.
|
||||||
|
VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m BootVolume) String() string {
|
func (m BootVolume) String() string {
|
||||||
return common.PointerString(m)
|
return common.PointerString(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnmarshalJSON unmarshals from json
|
||||||
|
func (m *BootVolume) UnmarshalJSON(data []byte) (e error) {
|
||||||
|
model := struct {
|
||||||
|
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
|
||||||
|
DisplayName *string `json:"displayName"`
|
||||||
|
FreeformTags map[string]string `json:"freeformTags"`
|
||||||
|
ImageId *string `json:"imageId"`
|
||||||
|
IsHydrated *bool `json:"isHydrated"`
|
||||||
|
SizeInGBs *int `json:"sizeInGBs"`
|
||||||
|
SourceDetails bootvolumesourcedetails `json:"sourceDetails"`
|
||||||
|
VolumeGroupId *string `json:"volumeGroupId"`
|
||||||
|
AvailabilityDomain *string `json:"availabilityDomain"`
|
||||||
|
CompartmentId *string `json:"compartmentId"`
|
||||||
|
Id *string `json:"id"`
|
||||||
|
LifecycleState BootVolumeLifecycleStateEnum `json:"lifecycleState"`
|
||||||
|
SizeInMBs *int `json:"sizeInMBs"`
|
||||||
|
TimeCreated *common.SDKTime `json:"timeCreated"`
|
||||||
|
}{}
|
||||||
|
|
||||||
|
e = json.Unmarshal(data, &model)
|
||||||
|
if e != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
m.DefinedTags = model.DefinedTags
|
||||||
|
m.DisplayName = model.DisplayName
|
||||||
|
m.FreeformTags = model.FreeformTags
|
||||||
|
m.ImageId = model.ImageId
|
||||||
|
m.IsHydrated = model.IsHydrated
|
||||||
|
m.SizeInGBs = model.SizeInGBs
|
||||||
|
nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData)
|
||||||
|
if e != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
m.SourceDetails = nn.(BootVolumeSourceDetails)
|
||||||
|
m.VolumeGroupId = model.VolumeGroupId
|
||||||
|
m.AvailabilityDomain = model.AvailabilityDomain
|
||||||
|
m.CompartmentId = model.CompartmentId
|
||||||
|
m.Id = model.Id
|
||||||
|
m.LifecycleState = model.LifecycleState
|
||||||
|
m.SizeInMBs = model.SizeInMBs
|
||||||
|
m.TimeCreated = model.TimeCreated
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// BootVolumeLifecycleStateEnum Enum with underlying type: string
|
// BootVolumeLifecycleStateEnum Enum with underlying type: string
|
||||||
type BootVolumeLifecycleStateEnum string
|
type BootVolumeLifecycleStateEnum string
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,161 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BootVolumeBackup A point-in-time copy of a boot volume that can then be used to create
|
||||||
|
// a new boot volume or recover a boot volume. For more information, see Overview
|
||||||
|
// of Boot Volume Backups (https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumebackups.htm)
|
||||||
|
// To use any of the API operations, you must be authorized in an IAM policy.
|
||||||
|
// If you're not authorized, talk to an administrator. If you're an administrator
|
||||||
|
// who needs to write policies to give users access, see Getting Started with
|
||||||
|
// Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
||||||
|
type BootVolumeBackup struct {
|
||||||
|
|
||||||
|
// The OCID of the compartment that contains the boot volume backup.
|
||||||
|
CompartmentId *string `mandatory:"true" json:"compartmentId"`
|
||||||
|
|
||||||
|
// A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable.
|
||||||
|
// Avoid entering confidential information.
|
||||||
|
DisplayName *string `mandatory:"true" json:"displayName"`
|
||||||
|
|
||||||
|
// The OCID of the boot volume backup.
|
||||||
|
Id *string `mandatory:"true" json:"id"`
|
||||||
|
|
||||||
|
// The current state of a boot volume backup.
|
||||||
|
LifecycleState BootVolumeBackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"`
|
||||||
|
|
||||||
|
// The date and time the boot volume backup was created. This is the time the actual point-in-time image
|
||||||
|
// of the volume data was taken. Format defined by RFC3339.
|
||||||
|
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
|
||||||
|
|
||||||
|
// The OCID of the boot volume.
|
||||||
|
BootVolumeId *string `mandatory:"false" json:"bootVolumeId"`
|
||||||
|
|
||||||
|
// 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"`
|
||||||
|
|
||||||
|
// The date and time the volume backup will expire and be automatically deleted.
|
||||||
|
// Format defined by RFC3339. This parameter will always be present for backups that
|
||||||
|
// were created automatically by a scheduled-backup policy. For manually created backups,
|
||||||
|
// it will be absent, signifying that there is no expiration time and the backup will
|
||||||
|
// last forever until manually deleted.
|
||||||
|
ExpirationTime *common.SDKTime `mandatory:"false" json:"expirationTime"`
|
||||||
|
|
||||||
|
// 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 image OCID used to create the boot volume the backup is taken from.
|
||||||
|
ImageId *string `mandatory:"false" json:"imageId"`
|
||||||
|
|
||||||
|
// The size of the boot volume, in GBs.
|
||||||
|
SizeInGBs *int `mandatory:"false" json:"sizeInGBs"`
|
||||||
|
|
||||||
|
// Specifies whether the backup was created manually, or via scheduled backup policy.
|
||||||
|
SourceType BootVolumeBackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"`
|
||||||
|
|
||||||
|
// The date and time the request to create the boot volume backup was received. Format defined by RFC3339.
|
||||||
|
TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"`
|
||||||
|
|
||||||
|
// The type of a volume backup.
|
||||||
|
Type BootVolumeBackupTypeEnum `mandatory:"false" json:"type,omitempty"`
|
||||||
|
|
||||||
|
// The size used by the backup, in GBs. It is typically smaller than sizeInGBs, depending on the space
|
||||||
|
// consumed on the boot volume and whether the backup is full or incremental.
|
||||||
|
UniqueSizeInGBs *int `mandatory:"false" json:"uniqueSizeInGBs"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m BootVolumeBackup) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// BootVolumeBackupLifecycleStateEnum Enum with underlying type: string
|
||||||
|
type BootVolumeBackupLifecycleStateEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for BootVolumeBackupLifecycleState
|
||||||
|
const (
|
||||||
|
BootVolumeBackupLifecycleStateCreating BootVolumeBackupLifecycleStateEnum = "CREATING"
|
||||||
|
BootVolumeBackupLifecycleStateAvailable BootVolumeBackupLifecycleStateEnum = "AVAILABLE"
|
||||||
|
BootVolumeBackupLifecycleStateTerminating BootVolumeBackupLifecycleStateEnum = "TERMINATING"
|
||||||
|
BootVolumeBackupLifecycleStateTerminated BootVolumeBackupLifecycleStateEnum = "TERMINATED"
|
||||||
|
BootVolumeBackupLifecycleStateFaulty BootVolumeBackupLifecycleStateEnum = "FAULTY"
|
||||||
|
BootVolumeBackupLifecycleStateRequestReceived BootVolumeBackupLifecycleStateEnum = "REQUEST_RECEIVED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingBootVolumeBackupLifecycleState = map[string]BootVolumeBackupLifecycleStateEnum{
|
||||||
|
"CREATING": BootVolumeBackupLifecycleStateCreating,
|
||||||
|
"AVAILABLE": BootVolumeBackupLifecycleStateAvailable,
|
||||||
|
"TERMINATING": BootVolumeBackupLifecycleStateTerminating,
|
||||||
|
"TERMINATED": BootVolumeBackupLifecycleStateTerminated,
|
||||||
|
"FAULTY": BootVolumeBackupLifecycleStateFaulty,
|
||||||
|
"REQUEST_RECEIVED": BootVolumeBackupLifecycleStateRequestReceived,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBootVolumeBackupLifecycleStateEnumValues Enumerates the set of values for BootVolumeBackupLifecycleState
|
||||||
|
func GetBootVolumeBackupLifecycleStateEnumValues() []BootVolumeBackupLifecycleStateEnum {
|
||||||
|
values := make([]BootVolumeBackupLifecycleStateEnum, 0)
|
||||||
|
for _, v := range mappingBootVolumeBackupLifecycleState {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// BootVolumeBackupSourceTypeEnum Enum with underlying type: string
|
||||||
|
type BootVolumeBackupSourceTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for BootVolumeBackupSourceType
|
||||||
|
const (
|
||||||
|
BootVolumeBackupSourceTypeManual BootVolumeBackupSourceTypeEnum = "MANUAL"
|
||||||
|
BootVolumeBackupSourceTypeScheduled BootVolumeBackupSourceTypeEnum = "SCHEDULED"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingBootVolumeBackupSourceType = map[string]BootVolumeBackupSourceTypeEnum{
|
||||||
|
"MANUAL": BootVolumeBackupSourceTypeManual,
|
||||||
|
"SCHEDULED": BootVolumeBackupSourceTypeScheduled,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBootVolumeBackupSourceTypeEnumValues Enumerates the set of values for BootVolumeBackupSourceType
|
||||||
|
func GetBootVolumeBackupSourceTypeEnumValues() []BootVolumeBackupSourceTypeEnum {
|
||||||
|
values := make([]BootVolumeBackupSourceTypeEnum, 0)
|
||||||
|
for _, v := range mappingBootVolumeBackupSourceType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
||||||
|
|
||||||
|
// BootVolumeBackupTypeEnum Enum with underlying type: string
|
||||||
|
type BootVolumeBackupTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for BootVolumeBackupType
|
||||||
|
const (
|
||||||
|
BootVolumeBackupTypeFull BootVolumeBackupTypeEnum = "FULL"
|
||||||
|
BootVolumeBackupTypeIncremental BootVolumeBackupTypeEnum = "INCREMENTAL"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingBootVolumeBackupType = map[string]BootVolumeBackupTypeEnum{
|
||||||
|
"FULL": BootVolumeBackupTypeFull,
|
||||||
|
"INCREMENTAL": BootVolumeBackupTypeIncremental,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBootVolumeBackupTypeEnumValues Enumerates the set of values for BootVolumeBackupType
|
||||||
|
func GetBootVolumeBackupTypeEnumValues() []BootVolumeBackupTypeEnum {
|
||||||
|
values := make([]BootVolumeBackupTypeEnum, 0)
|
||||||
|
for _, v := range mappingBootVolumeBackupType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
60
vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_details.go
generated
vendored
Normal file
60
vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_details.go
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BootVolumeSourceDetails The representation of BootVolumeSourceDetails
|
||||||
|
type BootVolumeSourceDetails interface {
|
||||||
|
}
|
||||||
|
|
||||||
|
type bootvolumesourcedetails struct {
|
||||||
|
JsonData []byte
|
||||||
|
Type string `json:"type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalJSON unmarshals json
|
||||||
|
func (m *bootvolumesourcedetails) UnmarshalJSON(data []byte) error {
|
||||||
|
m.JsonData = data
|
||||||
|
type Unmarshalerbootvolumesourcedetails bootvolumesourcedetails
|
||||||
|
s := struct {
|
||||||
|
Model Unmarshalerbootvolumesourcedetails
|
||||||
|
}{}
|
||||||
|
err := json.Unmarshal(data, &s.Model)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
m.Type = s.Model.Type
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalPolymorphicJSON unmarshals polymorphic json
|
||||||
|
func (m *bootvolumesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) {
|
||||||
|
var err error
|
||||||
|
switch m.Type {
|
||||||
|
case "bootVolumeBackup":
|
||||||
|
mm := BootVolumeSourceFromBootVolumeBackupDetails{}
|
||||||
|
err = json.Unmarshal(data, &mm)
|
||||||
|
return mm, err
|
||||||
|
case "bootVolume":
|
||||||
|
mm := BootVolumeSourceFromBootVolumeDetails{}
|
||||||
|
err = json.Unmarshal(data, &mm)
|
||||||
|
return mm, err
|
||||||
|
default:
|
||||||
|
return m, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m bootvolumesourcedetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
39
vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_backup_details.go
generated
vendored
Normal file
39
vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_backup_details.go
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BootVolumeSourceFromBootVolumeBackupDetails Specifies the boot volume backup.
|
||||||
|
type BootVolumeSourceFromBootVolumeBackupDetails struct {
|
||||||
|
|
||||||
|
// The OCID of the boot volume backup.
|
||||||
|
Id *string `mandatory:"true" json:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m BootVolumeSourceFromBootVolumeBackupDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalJSON marshals to json representation
|
||||||
|
func (m BootVolumeSourceFromBootVolumeBackupDetails) MarshalJSON() (buff []byte, e error) {
|
||||||
|
type MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails BootVolumeSourceFromBootVolumeBackupDetails
|
||||||
|
s := struct {
|
||||||
|
DiscriminatorParam string `json:"type"`
|
||||||
|
MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails
|
||||||
|
}{
|
||||||
|
"bootVolumeBackup",
|
||||||
|
(MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails)(m),
|
||||||
|
}
|
||||||
|
|
||||||
|
return json.Marshal(&s)
|
||||||
|
}
|
39
vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_details.go
generated
vendored
Normal file
39
vendor/github.com/oracle/oci-go-sdk/core/boot_volume_source_from_boot_volume_details.go
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BootVolumeSourceFromBootVolumeDetails Specifies the source boot volume.
|
||||||
|
type BootVolumeSourceFromBootVolumeDetails struct {
|
||||||
|
|
||||||
|
// The OCID of the boot volume.
|
||||||
|
Id *string `mandatory:"true" json:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m BootVolumeSourceFromBootVolumeDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalJSON marshals to json representation
|
||||||
|
func (m BootVolumeSourceFromBootVolumeDetails) MarshalJSON() (buff []byte, e error) {
|
||||||
|
type MarshalTypeBootVolumeSourceFromBootVolumeDetails BootVolumeSourceFromBootVolumeDetails
|
||||||
|
s := struct {
|
||||||
|
DiscriminatorParam string `json:"type"`
|
||||||
|
MarshalTypeBootVolumeSourceFromBootVolumeDetails
|
||||||
|
}{
|
||||||
|
"bootVolume",
|
||||||
|
(MarshalTypeBootVolumeSourceFromBootVolumeDetails)(m),
|
||||||
|
}
|
||||||
|
|
||||||
|
return json.Marshal(&s)
|
||||||
|
}
|
|
@ -16,12 +16,30 @@ type BulkAddVirtualCircuitPublicPrefixesRequest struct {
|
||||||
|
|
||||||
// Request with publix prefixes to be added to the virtual circuit
|
// Request with publix prefixes to be added to the virtual circuit
|
||||||
BulkAddVirtualCircuitPublicPrefixesDetails `contributesTo:"body"`
|
BulkAddVirtualCircuitPublicPrefixesDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request BulkAddVirtualCircuitPublicPrefixesRequest) String() string {
|
func (request BulkAddVirtualCircuitPublicPrefixesRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request BulkAddVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request BulkAddVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// BulkAddVirtualCircuitPublicPrefixesResponse wrapper for the BulkAddVirtualCircuitPublicPrefixes operation
|
// BulkAddVirtualCircuitPublicPrefixesResponse wrapper for the BulkAddVirtualCircuitPublicPrefixes operation
|
||||||
type BulkAddVirtualCircuitPublicPrefixesResponse struct {
|
type BulkAddVirtualCircuitPublicPrefixesResponse struct {
|
||||||
|
|
||||||
|
@ -32,3 +50,8 @@ type BulkAddVirtualCircuitPublicPrefixesResponse struct {
|
||||||
func (response BulkAddVirtualCircuitPublicPrefixesResponse) String() string {
|
func (response BulkAddVirtualCircuitPublicPrefixesResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response BulkAddVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -16,12 +16,30 @@ type BulkDeleteVirtualCircuitPublicPrefixesRequest struct {
|
||||||
|
|
||||||
// Request with publix prefixes to be deleted from the virtual circuit
|
// Request with publix prefixes to be deleted from the virtual circuit
|
||||||
BulkDeleteVirtualCircuitPublicPrefixesDetails `contributesTo:"body"`
|
BulkDeleteVirtualCircuitPublicPrefixesDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) String() string {
|
func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// BulkDeleteVirtualCircuitPublicPrefixesResponse wrapper for the BulkDeleteVirtualCircuitPublicPrefixes operation
|
// BulkDeleteVirtualCircuitPublicPrefixesResponse wrapper for the BulkDeleteVirtualCircuitPublicPrefixes operation
|
||||||
type BulkDeleteVirtualCircuitPublicPrefixesResponse struct {
|
type BulkDeleteVirtualCircuitPublicPrefixesResponse struct {
|
||||||
|
|
||||||
|
@ -32,3 +50,8 @@ type BulkDeleteVirtualCircuitPublicPrefixesResponse struct {
|
||||||
func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) String() string {
|
func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -18,8 +18,19 @@ type CaptureConsoleHistoryDetails struct {
|
||||||
// The OCID of the instance to get the console history from.
|
// The OCID of the instance to get the console history from.
|
||||||
InstanceId *string `mandatory:"true" json:"instanceId"`
|
InstanceId *string `mandatory:"true" json:"instanceId"`
|
||||||
|
|
||||||
|
// 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.
|
// A user-friendly name. Does not have to be unique, and it's changeable.
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
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 CaptureConsoleHistoryDetails) String() string {
|
func (m CaptureConsoleHistoryDetails) String() string {
|
||||||
|
|
23
vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go
generated
vendored
23
vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go
generated
vendored
|
@ -20,12 +20,30 @@ type CaptureConsoleHistoryRequest struct {
|
||||||
// has been deleted and purged from the system, then a retry of the original creation request
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
// may be rejected).
|
// may be rejected).
|
||||||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request CaptureConsoleHistoryRequest) String() string {
|
func (request CaptureConsoleHistoryRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CaptureConsoleHistoryRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CaptureConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// CaptureConsoleHistoryResponse wrapper for the CaptureConsoleHistory operation
|
// CaptureConsoleHistoryResponse wrapper for the CaptureConsoleHistory operation
|
||||||
type CaptureConsoleHistoryResponse struct {
|
type CaptureConsoleHistoryResponse struct {
|
||||||
|
|
||||||
|
@ -46,3 +64,8 @@ type CaptureConsoleHistoryResponse struct {
|
||||||
func (response CaptureConsoleHistoryResponse) String() string {
|
func (response CaptureConsoleHistoryResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CaptureConsoleHistoryResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
|
@ -16,12 +16,30 @@ type ConnectLocalPeeringGatewaysRequest struct {
|
||||||
|
|
||||||
// Details regarding the local peering gateway to connect.
|
// Details regarding the local peering gateway to connect.
|
||||||
ConnectLocalPeeringGatewaysDetails `contributesTo:"body"`
|
ConnectLocalPeeringGatewaysDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request ConnectLocalPeeringGatewaysRequest) String() string {
|
func (request ConnectLocalPeeringGatewaysRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ConnectLocalPeeringGatewaysRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ConnectLocalPeeringGatewaysRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// ConnectLocalPeeringGatewaysResponse wrapper for the ConnectLocalPeeringGateways operation
|
// ConnectLocalPeeringGatewaysResponse wrapper for the ConnectLocalPeeringGateways operation
|
||||||
type ConnectLocalPeeringGatewaysResponse struct {
|
type ConnectLocalPeeringGatewaysResponse struct {
|
||||||
|
|
||||||
|
@ -36,3 +54,8 @@ type ConnectLocalPeeringGatewaysResponse struct {
|
||||||
func (response ConnectLocalPeeringGatewaysResponse) String() string {
|
func (response ConnectLocalPeeringGatewaysResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ConnectLocalPeeringGatewaysResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
28
vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_details.go
generated
vendored
Normal file
28
vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_details.go
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConnectRemotePeeringConnectionsDetails Information about the other remote peering connection (RPC).
|
||||||
|
type ConnectRemotePeeringConnectionsDetails struct {
|
||||||
|
|
||||||
|
// The OCID of the RPC you want to peer with.
|
||||||
|
PeerId *string `mandatory:"true" json:"peerId"`
|
||||||
|
|
||||||
|
// The name of the region that contains the RPC you want to peer with.
|
||||||
|
// Example: `us-ashburn-1`
|
||||||
|
PeerRegionName *string `mandatory:"true" json:"peerRegionName"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ConnectRemotePeeringConnectionsDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
61
vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_request_response.go
generated
vendored
Normal file
61
vendor/github.com/oracle/oci-go-sdk/core/connect_remote_peering_connections_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConnectRemotePeeringConnectionsRequest wrapper for the ConnectRemotePeeringConnections operation
|
||||||
|
type ConnectRemotePeeringConnectionsRequest struct {
|
||||||
|
|
||||||
|
// The OCID of the remote peering connection (RPC).
|
||||||
|
RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"`
|
||||||
|
|
||||||
|
// Details to connect peering connection with peering connection from remote region
|
||||||
|
ConnectRemotePeeringConnectionsDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request ConnectRemotePeeringConnectionsRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request ConnectRemotePeeringConnectionsRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request ConnectRemotePeeringConnectionsRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConnectRemotePeeringConnectionsResponse wrapper for the ConnectRemotePeeringConnections operation
|
||||||
|
type ConnectRemotePeeringConnectionsResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
|
||||||
|
// a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response ConnectRemotePeeringConnectionsResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response ConnectRemotePeeringConnectionsResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
|
@ -37,10 +37,21 @@ type ConsoleHistory struct {
|
||||||
// Example: `2016-08-25T21:10:29.600Z`
|
// Example: `2016-08-25T21:10:29.600Z`
|
||||||
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
|
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, and it's changeable.
|
// A user-friendly name. Does not have to be unique, and it's changeable.
|
||||||
// Avoid entering confidential information.
|
// Avoid entering confidential information.
|
||||||
// Example: `My console history metadata`
|
// Example: `My console history metadata`
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
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 ConsoleHistory) String() string {
|
func (m ConsoleHistory) String() string {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -31,10 +31,21 @@ type Cpe struct {
|
||||||
// The public IP address of the on-premises router.
|
// The public IP address of the on-premises router.
|
||||||
IpAddress *string `mandatory:"true" json:"ipAddress"`
|
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.
|
// A user-friendly name. Does not have to be unique, and it's changeable.
|
||||||
// Avoid entering confidential information.
|
// Avoid entering confidential information.
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
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.
|
// The date and time the CPE was created, in the format defined by RFC3339.
|
||||||
// Example: `2016-08-25T21:10:29.600Z`
|
// Example: `2016-08-25T21:10:29.600Z`
|
||||||
TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"`
|
TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"`
|
||||||
|
|
65
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_details.go
generated
vendored
Normal file
65
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_details.go
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateBootVolumeBackupDetails The representation of CreateBootVolumeBackupDetails
|
||||||
|
type CreateBootVolumeBackupDetails struct {
|
||||||
|
|
||||||
|
// The OCID of the boot volume that needs to be backed up.
|
||||||
|
BootVolumeId *string `mandatory:"true" json:"bootVolumeId"`
|
||||||
|
|
||||||
|
// 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 boot volume backup. 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 type of backup to create. If omitted, defaults to incremental.
|
||||||
|
Type CreateBootVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m CreateBootVolumeBackupDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateBootVolumeBackupDetailsTypeEnum Enum with underlying type: string
|
||||||
|
type CreateBootVolumeBackupDetailsTypeEnum string
|
||||||
|
|
||||||
|
// Set of constants representing the allowable values for CreateBootVolumeBackupDetailsType
|
||||||
|
const (
|
||||||
|
CreateBootVolumeBackupDetailsTypeFull CreateBootVolumeBackupDetailsTypeEnum = "FULL"
|
||||||
|
CreateBootVolumeBackupDetailsTypeIncremental CreateBootVolumeBackupDetailsTypeEnum = "INCREMENTAL"
|
||||||
|
)
|
||||||
|
|
||||||
|
var mappingCreateBootVolumeBackupDetailsType = map[string]CreateBootVolumeBackupDetailsTypeEnum{
|
||||||
|
"FULL": CreateBootVolumeBackupDetailsTypeFull,
|
||||||
|
"INCREMENTAL": CreateBootVolumeBackupDetailsTypeIncremental,
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCreateBootVolumeBackupDetailsTypeEnumValues Enumerates the set of values for CreateBootVolumeBackupDetailsType
|
||||||
|
func GetCreateBootVolumeBackupDetailsTypeEnumValues() []CreateBootVolumeBackupDetailsTypeEnum {
|
||||||
|
values := make([]CreateBootVolumeBackupDetailsTypeEnum, 0)
|
||||||
|
for _, v := range mappingCreateBootVolumeBackupDetailsType {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
return values
|
||||||
|
}
|
71
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_request_response.go
generated
vendored
Normal file
71
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_backup_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateBootVolumeBackupRequest wrapper for the CreateBootVolumeBackup operation
|
||||||
|
type CreateBootVolumeBackupRequest struct {
|
||||||
|
|
||||||
|
// Request to create a new backup of given boot volume.
|
||||||
|
CreateBootVolumeBackupDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// A token that uniquely identifies a request so it can be retried in case of a timeout or
|
||||||
|
// server error without risk of executing that same action again. Retry tokens expire after 24
|
||||||
|
// hours, but can be invalidated before then due to conflicting operations (for example, if a resource
|
||||||
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
|
// may be rejected).
|
||||||
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request CreateBootVolumeBackupRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateBootVolumeBackupRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateBootVolumeBackupResponse wrapper for the CreateBootVolumeBackup operation
|
||||||
|
type CreateBootVolumeBackupResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The BootVolumeBackup instance
|
||||||
|
BootVolumeBackup `presentIn:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. See `if-match`.
|
||||||
|
Etag *string `presentIn:"header" name:"etag"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
|
||||||
|
// a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response CreateBootVolumeBackupResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateBootVolumeBackupResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
81
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_details.go
generated
vendored
Normal file
81
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_details.go
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Core Services API
|
||||||
|
//
|
||||||
|
// APIs for Networking Service, Compute Service, and Block Volume Service.
|
||||||
|
//
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateBootVolumeDetails The representation of CreateBootVolumeDetails
|
||||||
|
type CreateBootVolumeDetails struct {
|
||||||
|
|
||||||
|
// The Availability Domain of the boot volume.
|
||||||
|
// Example: `Uocm:PHX-AD-1`
|
||||||
|
AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"`
|
||||||
|
|
||||||
|
// The OCID of the compartment that contains the boot volume.
|
||||||
|
CompartmentId *string `mandatory:"true" json:"compartmentId"`
|
||||||
|
|
||||||
|
// Specifies the boot volume source details for a new boot volume. The volume source is either another boot volume in the same Availability Domain or a boot volume backup.
|
||||||
|
// This is a mandatory field for a boot volume.
|
||||||
|
SourceDetails BootVolumeSourceDetails `mandatory:"true" json:"sourceDetails"`
|
||||||
|
|
||||||
|
// 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 size of the volume in GBs.
|
||||||
|
SizeInGBs *int `mandatory:"false" json:"sizeInGBs"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m CreateBootVolumeDetails) String() string {
|
||||||
|
return common.PointerString(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalJSON unmarshals from json
|
||||||
|
func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) {
|
||||||
|
model := struct {
|
||||||
|
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
|
||||||
|
DisplayName *string `json:"displayName"`
|
||||||
|
FreeformTags map[string]string `json:"freeformTags"`
|
||||||
|
SizeInGBs *int `json:"sizeInGBs"`
|
||||||
|
AvailabilityDomain *string `json:"availabilityDomain"`
|
||||||
|
CompartmentId *string `json:"compartmentId"`
|
||||||
|
SourceDetails bootvolumesourcedetails `json:"sourceDetails"`
|
||||||
|
}{}
|
||||||
|
|
||||||
|
e = json.Unmarshal(data, &model)
|
||||||
|
if e != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
m.DefinedTags = model.DefinedTags
|
||||||
|
m.DisplayName = model.DisplayName
|
||||||
|
m.FreeformTags = model.FreeformTags
|
||||||
|
m.SizeInGBs = model.SizeInGBs
|
||||||
|
m.AvailabilityDomain = model.AvailabilityDomain
|
||||||
|
m.CompartmentId = model.CompartmentId
|
||||||
|
nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData)
|
||||||
|
if e != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
m.SourceDetails = nn.(BootVolumeSourceDetails)
|
||||||
|
return
|
||||||
|
}
|
71
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_request_response.go
generated
vendored
Normal file
71
vendor/github.com/oracle/oci-go-sdk/core/create_boot_volume_request_response.go
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
// Code generated. DO NOT EDIT.
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/oracle/oci-go-sdk/common"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateBootVolumeRequest wrapper for the CreateBootVolume operation
|
||||||
|
type CreateBootVolumeRequest struct {
|
||||||
|
|
||||||
|
// Request to create a new boot volume.
|
||||||
|
CreateBootVolumeDetails `contributesTo:"body"`
|
||||||
|
|
||||||
|
// A token that uniquely identifies a request so it can be retried in case of a timeout or
|
||||||
|
// server error without risk of executing that same action again. Retry tokens expire after 24
|
||||||
|
// hours, but can be invalidated before then due to conflicting operations (for example, if a resource
|
||||||
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
|
// may be rejected).
|
||||||
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func (request CreateBootVolumeRequest) String() string {
|
||||||
|
return common.PointerString(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateBootVolumeRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateBootVolumeRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateBootVolumeResponse wrapper for the CreateBootVolume operation
|
||||||
|
type CreateBootVolumeResponse struct {
|
||||||
|
|
||||||
|
// The underlying http response
|
||||||
|
RawResponse *http.Response
|
||||||
|
|
||||||
|
// The BootVolume instance
|
||||||
|
BootVolume `presentIn:"body"`
|
||||||
|
|
||||||
|
// For optimistic concurrency control. See `if-match`.
|
||||||
|
Etag *string `presentIn:"header" name:"etag"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
|
||||||
|
// a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (response CreateBootVolumeResponse) String() string {
|
||||||
|
return common.PointerString(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateBootVolumeResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
|
@ -22,8 +22,19 @@ type CreateCpeDetails struct {
|
||||||
// Example: `143.19.23.16`
|
// Example: `143.19.23.16`
|
||||||
IpAddress *string `mandatory:"true" json:"ipAddress"`
|
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.
|
// A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
|
||||||
DisplayName *string `mandatory:"false" json:"displayName"`
|
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 {
|
func (m CreateCpeDetails) String() string {
|
||||||
|
|
|
@ -20,12 +20,30 @@ type CreateCpeRequest struct {
|
||||||
// has been deleted and purged from the system, then a retry of the original creation request
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
// may be rejected).
|
// may be rejected).
|
||||||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request CreateCpeRequest) String() string {
|
func (request CreateCpeRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateCpeRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateCpeRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// CreateCpeResponse wrapper for the CreateCpe operation
|
// CreateCpeResponse wrapper for the CreateCpe operation
|
||||||
type CreateCpeResponse struct {
|
type CreateCpeResponse struct {
|
||||||
|
|
||||||
|
@ -46,3 +64,8 @@ type CreateCpeResponse struct {
|
||||||
func (response CreateCpeResponse) String() string {
|
func (response CreateCpeResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateCpeResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
23
vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go
generated
vendored
23
vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go
generated
vendored
|
@ -20,12 +20,30 @@ type CreateCrossConnectGroupRequest struct {
|
||||||
// has been deleted and purged from the system, then a retry of the original creation request
|
// has been deleted and purged from the system, then a retry of the original creation request
|
||||||
// may be rejected).
|
// may be rejected).
|
||||||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
|
||||||
|
|
||||||
|
// Unique Oracle-assigned identifier for the request.
|
||||||
|
// If you need to contact Oracle about a particular request, please provide the request ID.
|
||||||
|
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
|
||||||
|
|
||||||
|
// Metadata about the request. This information will not be transmitted to the service, but
|
||||||
|
// represents information that the SDK will consume to drive retry behavior.
|
||||||
|
RequestMetadata common.RequestMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
func (request CreateCrossConnectGroupRequest) String() string {
|
func (request CreateCrossConnectGroupRequest) String() string {
|
||||||
return common.PointerString(request)
|
return common.PointerString(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPRequest implements the OCIRequest interface
|
||||||
|
func (request CreateCrossConnectGroupRequest) HTTPRequest(method, path string) (http.Request, error) {
|
||||||
|
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
|
||||||
|
func (request CreateCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy {
|
||||||
|
return request.RequestMetadata.RetryPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// CreateCrossConnectGroupResponse wrapper for the CreateCrossConnectGroup operation
|
// CreateCrossConnectGroupResponse wrapper for the CreateCrossConnectGroup operation
|
||||||
type CreateCrossConnectGroupResponse struct {
|
type CreateCrossConnectGroupResponse struct {
|
||||||
|
|
||||||
|
@ -46,3 +64,8 @@ type CreateCrossConnectGroupResponse struct {
|
||||||
func (response CreateCrossConnectGroupResponse) String() string {
|
func (response CreateCrossConnectGroupResponse) String() string {
|
||||||
return common.PointerString(response)
|
return common.PointerString(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPResponse implements the OCIResponse interface
|
||||||
|
func (response CreateCrossConnectGroupResponse) HTTPResponse() *http.Response {
|
||||||
|
return response.RawResponse
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue