database

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2020 License: MPL-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DBAccessContainerPath = "/paas/api/v1.1/instancemgmt/%s/services/dbaas/instances/%s/accessrules"
	DBAccessRootPath      = "/paas/api/v1.1/instancemgmt/%s/services/dbaas/instances/%s/accessrules/%s"
)

API URI Paths for Container and Root objects

View Source
const (
	DBComputeNodeContainerPath = "paas/service/dbcs/api/v1.1/instances/%s/%s/servers"
	DBComputeNodeRootPath      = "paas/service/dbcs/api/v1.1/instances/%s/%s/servers/%s"
)

API URI Paths for Container and Root objects

View Source
const (
	DBSSHKeyContainerPath = "/paas/api/v1.1/instancemgmt/%s/services/dbaas/instances/%s/credentials/crednames/vmspublickey"
	DBSSHKeyRootPath      = "/paas/api/v1.1/instancemgmt/%s/services/dbaas/instances/%s/credentials/%s"
	DBSSHKeyName          = "vmspublickey"
)

The Root Path, for SSH Keys also does not expect a conventional 'Name' path parameter, and the only difference between creating an SSH Key and viewing the summary of the current SSH Key is a PUT vs GET HTTP Method.

View Source
const (
	JobRootPath = "/paas/api/v1.1/activitylog/%s/job/%s"
)

API URI Paths for the Root Job path

View Source
const WaitForAccessRulePollInterval = 1 * time.Second

WaitForAccessRulePollInterval - Default Poll Interval value for Create

View Source
const WaitForAccessRuleTimeout = 10 * time.Minute

WaitForAccessRuleTimeout - Default Timeout value for Create

View Source
const WaitForSSHKeyPollInterval = 5 * time.Second

WaitForSSHKeyPollInterval default poll interval value for Create

View Source
const WaitForSSHKeyTimeout = 30 * time.Second

WaitForSSHKeyTimeout is the default timeout value for Create In testing this is anywhere between 10-20s depending on if it's a new SSH Key or if it's an "updated" ssh key.

Variables

View Source
var DefaultAccessRuleNames = map[string]string{
	"EnableSSH":           "ora_p2_ssh",
	"EnableHTTP":          "ora_p2_http",
	"EnableHTTPSSL":       "ora_p2_httpssl",
	"EnableDBConsole":     "ora_p2_dbconsole",
	"EnableDBExpress":     "ora_p2_dbexpress",
	"EnableDBListener":    "ora_p2_dblistener",
	"EnableEMConsole":     "ora_p2_emconsole",
	"EnableRACDBListener": "ora_p2_db_listener",
	"EnableScanListener":  "ora_p2_scan_listener",
	"EnableRACOns":        "ora_p2_ons",
}

DefaultAccessRuleNames - Default Access Rule prefixes

Functions

This section is empty.

Types

type AccessRuleDestination added in v0.4.0

type AccessRuleDestination string

AccessRuleDestination - Destination for an Access Rule

const (
	// AccessRuleDefaultDestination - access rule default destination is DB_1
	AccessRuleDefaultDestination AccessRuleDestination = "DB_1"
)

type AccessRuleInfo added in v0.4.0

type AccessRuleInfo struct {
	// The Description of the Access Rule
	Description string `json:"description"`
	// The destination of the Access Rule. Should always be "DB".
	Destination AccessRuleDestination `json:"destination"`
	// The ports for the rule.
	Ports string `json:"ports"`
	// The name of the Access Rule
	Name string `json:"ruleName"`
	// The Type of the rule. One of: "DEFAULT", "SYSTEM", or "USER".
	// Computed Value
	RuleType AccessRuleType `json:"ruleType"`
	// The IP Addresses and subnets from which traffic is allowed
	Source string `json:"source"`
	// The current status of the Access Rule
	Status AccessRuleStatus `json:"status"`
}

AccessRuleInfo holds all of the known information for a single AccessRule

type AccessRuleOperation added in v0.4.0

type AccessRuleOperation string

AccessRuleOperation - Operational Constants for either Updating/Deleting an Access Rule

const (
	// AccessRuleUpdate - access rule operation is update
	AccessRuleUpdate AccessRuleOperation = "update"
	// AccessRuleDelete - access rule operation is delete
	AccessRuleDelete AccessRuleOperation = "delete"
)

type AccessRuleStatus added in v0.4.0

type AccessRuleStatus string

AccessRuleStatus - Status Constants for an Access Rule

const (
	// AccessRuleEnabled - Access Rule is enabled
	AccessRuleEnabled AccessRuleStatus = "enabled"
	// AccessRuleDisabled - Access Rule is disabled
	AccessRuleDisabled AccessRuleStatus = "disabled"
)

type AccessRuleType added in v0.4.0

type AccessRuleType string

AccessRuleType - Constant types for an access rule

const (
	// AccessRuleTypeDefault - DEFAULT
	AccessRuleTypeDefault AccessRuleType = "DEFAULT"
	// AccessRuleTypeSystem - SYSTEM
	AccessRuleTypeSystem AccessRuleType = "SYSTEM"
	// AccessRuleTypeUser - User
	AccessRuleTypeUser AccessRuleType = "USER"
)

type AccessRules added in v0.4.0

type AccessRules struct {
	Rules []AccessRuleInfo `json:"accessRules"`
}

AccessRules - Used for the GET request, as there's no direct GET request for a single Access Rule

type AdditionalParameters

type AdditionalParameters struct {
	// Indicates whether to include the Demos PDB
	// Optional
	DBDemo string `json:"db_demo,omitempty"`
}

AdditionalParameters specifies any additional parameters for the DBService Instance

type Client added in v0.9.3

type Client struct {
	// contains filtered or unexported fields
}

Client - Client represents an authenticated database client, with compute credentials and an api client.

func GetDatabaseTestClient added in v0.3.0

func GetDatabaseTestClient(c *opc.Config) (*Client, error)

GetDatabaseTestClient obtains a client for testing purposes

func NewDatabaseClient

func NewDatabaseClient(c *opc.Config) (*Client, error)

NewDatabaseClient returns a database client

func (*Client) AccessRules added in v0.9.3

func (c *Client) AccessRules() *UtilityClient

AccessRules returns a UtilityClient for managing SSH Keys and Access Rules for a DBaaS Service Instance

func (*Client) ComputeNodes added in v0.14.0

func (c *Client) ComputeNodes() *UtilityClient

ComputeNodes returns a UtilityClient for managing Server Nodes for a DBaaS Service Instance

func (*Client) IPReservationClient added in v0.13.0

func (c *Client) IPReservationClient() *IPReservationClient

IPReservationClient obtains an new ResourceClient which can be used to access the Database Cloud IP Reservation API

func (*Client) Jobs added in v0.13.0

func (c *Client) Jobs() *JobClient

Jobs returns a JobClient for checking job status

func (*Client) SSHKeys added in v0.9.3

func (c *Client) SSHKeys() *UtilityClient

SSHKeys returns a UtilityClient for managing SSHKeys for a DBaaS Service Instance

func (*Client) ServiceInstanceClient added in v0.9.3

func (c *Client) ServiceInstanceClient() *ServiceInstanceClient

ServiceInstanceClient obtains an ServiceInstanceClient which can be used to access to the Service Instance functions of the Database Cloud API

type ComputeNodeInfo added in v0.14.0

type ComputeNodeInfo struct {
	// Name of the availability domain within the region where the compute node is provisioned.
	// OCI only.
	AvailabilityDomain string `json:"availabilityDomain"`
	// The connection descriptor for Oracle Net Services (SQL*Net).
	ConnectDescriptor string `json:"connect_descriptor"`
	// The connection descriptor for Oracle Net Services (SQL*Net) with IP addresses instead of host names.
	ConnectDescriptorWithPublicIP string `json:"connect_descriptor_with_public_ip"`
	// The user name of the Oracle Cloud user who created the service instance.
	CreatedBy string `json:"created_by"`
	// The job id of the job that created the service instance.
	CreationJobID string `json:"creation_job_id"`
	// The date-and-time stamp when the service instance was created.
	CreationTime string `json:"creation_time"`
	// The host name of the compute node.
	Hostname string `json:"hostname"`
	// Indicates whether the compute node hosted the primary database of an Oracle Data Guard
	// configuration when the service instance was created.
	InitialPrimary bool `json:"initialPrimary"`
	// The listener port for Oracle Net Services (SQL*Net) connections.
	ListenerPort int `json:"listenerPort"`
	// The size in GB of the memory allocated to the compure node.
	// Exadata only.
	MemoryAllocated int `json:"memoryAllocated"`
	// Number of CPU Cores.
	// Exadata only.
	NumberOfCores int `json:"numberOfCores"`
	// The name of the default PDB (pluggable database) created when the service instance was created.
	PDBName string `json:"pdbName"`
	// The IP address of the compute node.
	ReservedIP string `json:"reservedIP"`
	// The Oracle Compute Cloud shape of the compute node.
	Shape string `json:"shape"`
	// The SID of the database on the compute node.
	SID string `json:"sid"`
	// The status of the compute node.
	Status string `json:"status"`
	// The size in GB of the storage allocated to the compute node.
	// For compute nodes of a service instance hosting an Oracle RAC database, this number does not
	// include the storage shared by the nodes
	StorageAllocated int `json:"storageAllocated"`
	// Name of the subnet within the region where the compute node is provisioned.
	Subnet string `json:"subnet"`
	// Virtual Machine type
	VMType string `json:"vmType"`
}

ComputeNodeInfo returns the details of a single Compute Node

type ComputeNodesInfo added in v0.14.0

type ComputeNodesInfo struct {
	// List of Compute Nodes
	Nodes []ComputeNodeInfo `json:"-"`
}

ComputeNodesInfo - contains details of a Compute Nodes for a service instance

type ComputesInfo added in v0.14.0

type ComputesInfo struct {
	AdminIP   string `json:"admin_ip"`
	ClientIP  string `json:"client_ip"`
	Hostname  string `json:"hostname"`
	VirtualIP string `json:"virtual_ip"`
}

ComputesInfo for the Exadata Service Instance Compute Nodes

type CreateAccessRuleInput added in v0.4.0

type CreateAccessRuleInput struct {
	// Name of the DBaaS service instance.
	// Required
	ServiceInstanceID string `json:"-"`
	// Description of the Access Rule.
	// Required
	Description string `json:"description"`
	// Destination to which traffic is allowed. Specify the value "DB".
	// Required
	Destination AccessRuleDestination `json:"destination"`
	// The network port or ports to allow traffic on. Specified as a single port or a range.
	// Required
	Ports string `json:"ports"`
	// The name of the Access Rule
	// Required
	Name string `json:"ruleName"`
	// The IP addresses and subnets from which traffic is allowed.
	// Valid values are:
	//   - "DB" for any other cloud service instance in the service instances `ora_db` security list
	//   - "PUBLIC-INTERNET" for any host on the internet.
	//   - A single IP address or comma-separated list of subnets (in CIDR format) or IPv4 addresses.
	// Required
	Source string `json:"source"`
	// Desired Status of the rule. Either "disabled" or "enabled".
	// Required
	Status AccessRuleStatus `json:"status"`
	// Time to wait between polling for access rule to be ready
	PollInterval time.Duration `json:"-"`
	// Time to wait for an access rule to be ready
	Timeout time.Duration `json:"-"`
}

CreateAccessRuleInput defines the input parameters needed to create an Access Rule for a DBaaS Service Instance.

type CreateIPReservationInfo added in v0.13.0

type CreateIPReservationInfo struct {
	// Name of the IP reservation to create.
	Name string `json:"ipResName"`
	// Location (region) of the IP reservation.
	ComputeSiteName string `json:"computeSite"`
	// Create IP Reservation Job ID
	JobID string `json:"jobId"`
}

CreateIPReservationInfo represents the Create IP Reservation API Response

type CreateIPReservationInput added in v0.13.0

type CreateIPReservationInput struct {
	// Identity domain ID for the Database Cloud Service account
	// For a Cloud account with Identity Cloud Service: the identity service ID, which has the form idcs-letters-and-numbers.
	// For a traditional cloud account: the name of the identity domain.
	// Required
	IdentityDomainID string
	// Name of the IP reservation to create.
	// Required
	Name string `json:"ipResName"`
	// Indicates whether the IP reservation is for instances attached to IP networks or the shared network
	// set to `IPNetwork` for IP Network, or omit for shared network
	NetworkType string `json:"networkType,omitempty"`
	// Name of the region to create the IP reservation in
	// Required
	Region string `json:"region"`
}

CreateIPReservationInput represents the Create IP Reservation API Request body

type CreateSSHKeyInput added in v0.4.0

type CreateSSHKeyInput struct {
	// Name of the DBaaS service instance.
	// Required
	ServiceInstanceID string `json:"-"`
	// The value of the SSH public key, with any slashes (/) it contains preceded by
	// backslashes, as in \/.
	// Required
	PublicKey string `json:"public-key"`
	// Time to wait between polling for ssh key to be ready
	PollInterval time.Duration `json:"-"`
	// Time to wait for an ssh key to be ready
	Timeout time.Duration `json:"-"`
}

CreateSSHKeyInput defines the necessary input parameters to create an SSH Key for a DBaaS Service Instance

type CreateServiceInstanceInput

type CreateServiceInstanceInput struct {
	// Name of the availability domain within the region where the Oracle Database Cloud Service instance is to be provisioned.
	// Optional
	AvailabilityDomain string `json:"availabilityDomain,omitempty"`
	// Name of the cluster supporting the Exadata Cloud Service database deployment.
	// Optional. Exadata Cloud Service only.
	ClusterName string `json:"clusterName,omitempty"`
	// The template to use for the starter database. `dw` or `oltp`.
	// Include this parameter only when creating a starter database. The starter database is the first Exadata Cloud Service database deployment that you create on your Exadata system. Subsequent databases are created with a standardized database configuration.
	// Optional. Exadata Cloud Service only.
	DatabaseTemplate string `json:"dbTemplate,omitempty"`
	// Free-form text that provides additional information about the service instance.
	// Optional.
	Description string `json:"description,omitempty"`
	// Database edition for the service instance:
	// If you specify SE, a Standard Edition 2 database is created if you specify 12.2.0.1 or 12.1.0.2
	// for version and a Standard Edition One database is created if you specify 11.2.0.4 for version.
	// Edition must be Enterprise Edition - Extreme Performance to configure the Database
	// Cloud Service instance as Cluster Database.
	// Required.
	Edition ServiceInstanceEdition `json:"edition"`
	// Specify if you want an email notification sent upon successful or unsuccessful completion of the instance-creation operation.
	// When true, you must also specify notificationEmail. Valid values are true and false. Default value is false.
	// Optional
	EnableNotification bool `json:"enableNotification,omitempty"`
	// Required if level is `PAAS_EXADATA`
	// Name of the Exadata system on which to create the Exadata Cloud Service database deployment.
	// Optional. Exadata Cloud Service only.
	ExadataSystemName string `json:"exadataSystemName,omitempty"`
	// Specify if you want to use an existing perpetual license to Oracle Database to establish the right to use Oracle Database on the new instance.
	// When true, your Oracle Cloud account will be charged a lesser amount for the new instance because the right to use Oracle Database is covered by your perpetual license agreement.
	// Valid values are true and false. Default value is false.
	// Optional
	IsBYOL *bool `json:"isBYOL,omitempty"`
	// This parameter is not available on Oracle Cloud at Customer.
	// Applicable only if region is an Oracle Cloud Infrastructure Classic region.
	// The three-part name of a custom IP network to use. For example: /Compute-identity_domain/user/object.
	// A region must be specified in order to use ipNetwork. Only IP networks created in the specified region can be used.
	// ipNetwork cannot be used with ipReservations.
	// Optional
	IPNetwork string `json:"ipNetwork,omitempty"`
	// Applicable only if region is an Oracle Cloud Infrastructure Classic region.
	// A single IP reservation name or multiple IP reservation names separated by commas. Only IP reservations created in the specified region can be used.
	// When IP reservations are used, all compute nodes of an instance must be provisioned with IP reservations, so the number of names in ipReservations must match the number of compute nodes in the service instance.
	// Optional
	IPReservations string `json:"ipReservations,omitempty"`
	// Service level for the service instance
	// Required.
	Level ServiceInstanceLevel `json:"level"`
	// Array of one JSON object that specifies configuration details of the services instance.
	// This array is not required if the level value is BASIC.
	// Required if level value is PAAS.
	Parameter ParameterInput `json:"-"`
	// Name of Database Cloud Service instance. The service name:
	// Must not exceed 50 characters.
	// Must start with a letter.
	// Must contain only letters, numbers, or hyphens.
	// Must not contain any other special characters.
	// Must be unique within the identity domain.
	// Required.
	Name string `json:"serviceName"`
	// Specifies the list of compute nodes that host database instances for the database deployment.
	// Separate compute node names with a comma. If nodelist is not specified the database is deployed across all compute nodes
	// Optional. Exadata Cloud Service only.
	NodeList string `json:"nodelist,omitempty"`
	// Required if enableNotification is set to true.
	// The email address to send completion notifications to.
	// This parameter is not available on Oracle Cloud at Customer.
	// Optional
	NotificationEmail string `json:"notificationEmail,omitempty"`
	// Applicable only to accounts that support regions.
	// Name of the Oracle Cloud Infrastructure or Oracle Cloud Infrastructure Classic region where the Oracle Database Cloud Service instance is to be provisioned.
	// Optional
	Region string `json:"region,omitempty"`
	// Desired compute shape. A shape defines the number of Oracle Compute Units (OCPUs) and amount
	// of memory (RAM).
	// Required.
	Shape ServiceInstanceShape `json:"shape,omitempty"`
	// Required if region is an Oracle Cloud Infrastructure region.
	// Name of the subnet within the region where the Oracle Database Cloud Service instance is to be provisioned.
	// Optional
	Subnet string `json:"subnet,omitempty"`
	// Billing unit. Valid values are:
	// HOURLY: Pay only for the number of hours used during your billing period. This is the default.
	// MONTHLY: Pay one price for the full month irrespective of the number of hours used.
	// Required.
	SubscriptionType ServiceInstanceSubscriptionType `json:"subscriptionType"`
	// Applicable only in Oracle Cloud Infrastructure regions.
	// Array of one JSON object that specifies configuration details of the standby database when failoverDatabase is set to true. disasterRecovery must be set to true.
	Standbys []StandBy `json:"standbys,omitempty"`
	// Specify if high performance storage should be used for the Database Cloud Service instance. Default data storage will allocate your database
	// block storage on spinning devices. By checking this box, your block storage will be allocated on solid state devices. Valid values are true and false.
	// Default value is false.
	// Optional
	UseHighPerformanceStorage bool `json:"useHighPerformanceStorage,omitempty"`
	// Oracle Database software version
	// Required.
	Version ServiceInstanceVersion `json:"version"`
	// Public key for the secure shell (SSH). This key will be used for authentication when
	// connecting to the Database Cloud Service instance using an SSH client. You generate an
	// SSH public-private key pair using a standard SSH key generation tool. See Connecting to
	// a Compute Node Through Secure Shell (SSH) in Using Oracle Database Cloud Service.
	// Required. (Not required for Exadata)
	VMPublicKey string `json:"vmPublicKeyText,omitempty"`
}

CreateServiceInstanceInput specifies the create request for a database service instance

type CreateServiceInstanceRequest added in v0.2.0

type CreateServiceInstanceRequest struct {
	CreateServiceInstanceInput
	ParameterRequest []ParameterRequest `json:"parameters"`
}

CreateServiceInstanceRequest specifies the create request attributes for a database service instance

type DefaultAccessRuleInfo added in v0.8.4

type DefaultAccessRuleInfo struct {
	// Name of the DBaaS service instance.
	ServiceInstanceID string `json:"-"`
	// Enabled for every DB Service Instance
	EnableSSH *bool
	// Single Instance Rules
	EnableHTTP       *bool
	EnableHTTPSSL    *bool
	EnableDBConsole  *bool
	EnableDBExpress  *bool
	EnableDBListener *bool
	// RAC Rules
	EnableEMConsole     *bool
	EnableRACDBListener *bool
	EnableScanListener  *bool
	EnableRACOns        *bool
}

DefaultAccessRuleInfo specifies the default access rule information from a service instance

type DeleteAccessRuleInput added in v0.4.0

type DeleteAccessRuleInput struct {
	// Name of the DBaaS Service Instance.
	// Required
	ServiceInstanceID string `json:"-"`
	// Name of the Access Rule. Used in the request's URI, not as a body parameter.
	// Required
	Name string `json:"-"`
	// Type of Operation being performed. This should never be set in the Provider,
	// as we're explicitly calling an Delete function here, so the SDK uses the constant
	// defined for Deleting an AccessRule
	// Do not set.
	Operation AccessRuleOperation `json:"operation"`
	// Desired Status of the Access Rule. This is the only attribute that can actually be
	// modified on an access rule.
	// Required
	Status AccessRuleStatus `json:"status"`
	// Time to wait between checking access rule state
	PollInterval time.Duration `json:"-"`
	// Time to wait for an access rule to be ready
	Timeout time.Duration `json:"-"`
}

DeleteAccessRuleInput defines the Delete parameters needed to delete an AccessRule for a DBaaS Service Instance. There's no dedicated DELETE method on the API, so this mimics the same behavior of the Update method, but using the Delete operational constant. Instead of implementing, choosing to be verbose here for ease of use in the Provider, and clarity.

type DeleteIPReservationInfo added in v0.13.0

type DeleteIPReservationInfo struct {
	// Name of the IP reservation to create.
	Name string `json:"ipResName"`
	// Location (region) of the IP reservation.
	ComputeSiteName string `json:"computeSite"`
	// Create IP Reservation Job ID
	JobID string `json:"jobId"`
}

DeleteIPReservationInfo represents the Delete IP Reservation API Response

type DeleteServiceInstanceInput

type DeleteServiceInstanceInput struct {
	// Name of the Database Cloud Service instance.
	// Required.
	Name string
	// Flag that when set to true deletes all backups of the service instance from Oracle Cloud Storage container.
	// Use caution in specifying this option. If this option is specified, instance can not be recovered as all backups
	// will be deleted. This option is not currently supported for Cluster Databases.
	// Default value is false.
	// Optional
	DeleteBackup bool
}

DeleteServiceInstanceInput specifies what instance to delete and whether or not to delete backups

type DesiredStateInput added in v0.9.2

type DesiredStateInput struct {
	// Name of the service instance to update.
	// Required
	Name string `json:"-"`
	// Type of the request.
	// Required
	LifecycleState ServiceInstanceLifecycleState `json:"lifecycleState"`
	// Timeout (minutes) for each request. The range of valid values are 1 to 300 minutes (inclusive).
	// This value defaults to 60 minutes.
	// Optional
	LifecycleTimeout string `json:"lifecycleTimeout,omitempty"`
	// Name of compute node to stop, start, or restart.
	// Optional
	VMName string `json:"vmName,omitempty"`
}

DesiredStateInput defines the attributes available when setting the desired state of a service instance

type Details added in v0.13.0

type Details struct {
	JobID   string `json:"jobId"`
	Message string `json:"message"`
}

Details details the attributes of the specific job that is running on the service instance

type GetAccessRuleInput added in v0.4.0

type GetAccessRuleInput struct {
	// Name of the DBaaS service instance.
	// Required
	ServiceInstanceID string `json:"-"`
	// Name of the Access Rule.
	// Because there is no native "GET" to return a single AccessRuleInfo object, we don't
	// need to marshal a request body for the GET request. Instead the request returns a slice
	// of AccessRuleInfo structs, which we iterate on to interpret the desired AccessRuleInfo struct
	// Required
	Name string `json:"-"`
}

GetAccessRuleInput defines the input parameters needed to retrieve information on an AccessRule for a DBaas Service Instance.

type GetComputeNodesInput added in v0.14.0

type GetComputeNodesInput struct {
	// Name of the DBaaS service instance.
	// Required
	ServiceInstanceID string `json:"-"`
}

GetComputeNodesInput Get Request input to query compute nodes for a service instance

type GetDefaultAccessRuleInput added in v0.8.4

type GetDefaultAccessRuleInput struct {
	// Name of the DBaaS service instance.
	// Required
	ServiceInstanceID string `json:"-"`
}

GetDefaultAccessRuleInput defines the input parameters needed to retrieve information on an all the DefaultAccessRule for a DBaas Service Instance.

type GetJobInput added in v0.13.0

type GetJobInput struct {
	// ID of the job.
	// Required.
	ID string
}

GetJobInput specifies which job to retrieve

type GetSSHKeyInput added in v0.4.0

type GetSSHKeyInput struct {
	// Name of the DBaaS service instance.
	// Required
	ServiceInstanceID string `json:"-"`
}

GetSSHKeyInput defines all of the necessary input parameters to retrieve the necessary information on a specific SSH Key.

type GetServiceInstanceInput

type GetServiceInstanceInput struct {
	// Name of the Database Cloud Service instance.
	// Required.
	Name string `json:"serviceId"`
}

GetServiceInstanceInput specifies what service instance to obtain

type IPReservationClient added in v0.13.0

type IPReservationClient struct {
	IPReservationResourceClient
	PollInterval time.Duration
	Timeout      time.Duration
}

IPReservationClient IP Reservation API Client

func (*IPReservationClient) CreateIPReservation added in v0.13.0

func (c *IPReservationClient) CreateIPReservation(input *CreateIPReservationInput) (*IPReservationInfo, error)

CreateIPReservation creates a new IP Reservation.

func (*IPReservationClient) DeleteIPReservation added in v0.13.0

func (c *IPReservationClient) DeleteIPReservation(name string) error

DeleteIPReservation deletes an IP Reservation.

func (*IPReservationClient) GetIPReservation added in v0.13.0

func (c *IPReservationClient) GetIPReservation(name string) (*IPReservationInfo, error)

GetIPReservation get the details of an IP Reservation.

type IPReservationInfo added in v0.13.0

type IPReservationInfo struct {
	// Id of the IP reservation.
	ID int `json:"id"`
	// Name of the IP reservation.
	Name string `json:"name"`
	// Location (region) of the IP reservation.
	ComputeSiteName string `json:"computeSiteName"`
	// Name of the compute node using the IP reservation.
	// This parameter is returned only when the IP reservation is in use.
	Hostname string `json:"hostName"`
	// The identity domain ID of the IP reservation.
	IdentityDomain string `json:"identityDomain"`
	// The public IP address for the IP reservation.
	IPAddress string `json:"ipAddress"`
	// Indicates whether the IP reservation is intended for instances attached to IP networks or the shared network.
	NetworkType string `json:"networkType"`
	// The service entitlement Id of Database Cloud Service within the Cloud account.
	ServiceEntitlementID string `json:"serviceEntitlementId"`
	// Name of the Database Cloud Service instance where the named IP reservation is used.
	// This parameter is returned only when the IP reservation is in use.
	ServiceName string `json:"serviceName"`
	// The Service Type the IP Reservation is valid for. `DBaaS`.
	ServiceType string `json:"serviceType"`
	// Status of the IP reservation. Valid values: `INITIALIZING`, `UNUSED`, `USED`.
	Status IPReservationStatus `json:"status"`
}

IPReservationInfo represents the Get IP Reservation API Response

type IPReservationResourceClient added in v0.13.0

type IPReservationResourceClient struct {
	*Client
	ContainerPath    string
	ResourceRootPath string
}

IPReservationResourceClient is a client for the IP Reservation functions of the Database API.

type IPReservationStatus added in v0.13.0

type IPReservationStatus string

IPReservationStatus IP Reservation Status values

const (
	// IPReservationStatusInitializing Initializing
	IPReservationStatusInitializing IPReservationStatus = "INITIALIZING"
	// IPReservationStatusUnused Unused IP Reservation
	IPReservationStatusUnused IPReservationStatus = "UNUSED"
	// IPReservationStatusUsed Used IP Reservation
	IPReservationStatusUsed IPReservationStatus = "USED"
)

type IPReservations added in v0.13.0

type IPReservations struct {
	IPReservations []IPReservationInfo `json:"ipReservations"`
}

IPReservations - used for the GET request that returns all reservations

type Job added in v0.13.0

type Job struct {
	// Job ID
	ID int `json:"jobId"`
	// Status of the job
	Status JobStatus `json:"status"`
}

Job details the attributes related to a job

type JobClient added in v0.13.0

type JobClient struct {
	ResourceClient
	PollInterval time.Duration
	Timeout      time.Duration
}

JobClient is a client for the Service functions of the Job API.

func (*JobClient) GetJob added in v0.13.0

func (c *JobClient) GetJob(getInput *GetJobInput) (*Job, error)

GetJob retrieves the job with the given id

func (*JobClient) WaitForJobCompletion added in v0.13.0

func (c *JobClient) WaitForJobCompletion(input *GetJobInput, pollInterval, timeoutSeconds time.Duration) error

WaitForJobCompletion waits for a service instance to be in the desired state

type JobResponse added in v0.13.0

type JobResponse struct {
	Details Details `json:"details"`
}

JobResponse details the job information received after submitting a request

type JobStatus added in v0.13.0

type JobStatus string

JobStatus defines the constants for the status of a job

const (
	// JobStatusNew - the job is new.
	JobStatusNew JobStatus = "NEW"
	// JobStatusRunning - the job is still running.
	JobStatusRunning JobStatus = "RUNNING"
	// JobStatusFailed - the job has failed.
	JobStatusFailed JobStatus = "FAILED"
	// JobStatusSucceed - the job has succeeded.
	JobStatusSucceed JobStatus = "SUCCEED"
)

type NetworkingInfo added in v0.14.0

type NetworkingInfo struct {
	AdminNetwork  string         `json:"admin_network"`
	BackupNetwork string         `json:"backup_network"`
	ClientNetwork string         `json:"client_network"`
	Computes      []ComputesInfo `json:"computes"`
	ScanIPs       []string       `json:"scan_ips"`
}

NetworkingInfo returned for Exadata Service Instances

type ParameterInput added in v0.2.0

type ParameterInput struct {
	AdditionalParameters AdditionalParameters `json:"additionalParams,omitempty"`
	// Password for Oracle Database administrator users sys and system. The password must meet the following requirements:
	// Starts with a letter
	// Is between 8 and 30 characters long
	// Contains letters, at least one number, and optionally, any number of these special characters: dollar sign ($), pound sign (#), and underscore (_).
	// Required
	AdminPassword string `json:"adminPassword"`
	//Backup destination.
	// Required
	BackupDestination ServiceInstanceBackupDestination `json:"backupDestination"`
	// Character Set for the Database Cloud Service Instance.
	// Valid values are AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS,
	// AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721,
	// AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13,
	// BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111,
	// CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS,
	// EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851,
	// EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS,
	// IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601,
	// KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117,
	// LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866,
	// SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII,
	// US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9,
	// WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8,
	// ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC,
	// ZHT32SOPS, ZHT32TRIS.
	// Default value is AL32UTF8.
	// Optional.
	CharSet string `json:"charset,omitempty"`
	// Name of the Oracle Storage Cloud Service container used to provide storage for your service
	// instance backups. Use the following format to specify the container name:
	// <storageservicename>-<storageidentitydomain>/<containername>
	// Notes:
	// An Oracle Storage Cloud Service container is not required when provisioning a Database
	// Cloud Service - Virtual Image instance.
	// Do not use an Oracle Storage Cloud container that you use to back up Database Cloud Service
	// instances for any other purpose. For example, do not also use it to back up Oracle Java Cloud
	// Service instances. Using the container for multiple purposes can result in billing errors.
	// Optional.
	CloudStorageContainer string `json:"cloudStorageContainer,omitempty"`
	// Password for the Oracle Storage Cloud Service administrator.
	// Optional.
	CloudStoragePassword string `json:"cloudStoragePwd,omitempty"`
	// Username for the Oracle Storage Cloud Service administrator.
	// Optional.
	CloudStorageUsername string `json:"cloudStorageUser,omitempty"`
	// Name of the Oracle Storage Cloud Service container where the backup from on-premise instance is stored. This parameter is required if hdg is set to yes.
	// Optional
	HDGCloudStorageContainer string `json:"hdgCloudStorageContainer,omitempty"`
	// Password of the Oracle Cloud user specified in hdgCloudStorageUser. This parameter is required if hdg is set to yes.
	// Optional
	HDGCloudStoragePassword string `json:"hdgCloudStoragePassword,omitempty"`
	// User name of an Oracle Cloud user who has read access to the container specified in hdgCloudStorageContainer. This parameter is required if hdg is set to yes.
	// Optional
	HDGCloudStorageUser string `json:"hdgCloudStorageUser,omitempty"`
	// Name of the Oracle Storage Cloud Service container where the existing cloud backup is stored. This parameter is required if ibkup is set to yes and ibkupOnPremise is set to yes.
	// Optional
	IBKUPCloudStorageContainer string `json:"ibkupCloudStorageContainer,omitempty"`
	// Name of the Oracle Storage Cloud Service container where the existing cloud backup is stored.
	// This parameter is required if ibkup is set to yes.
	// Optional
	IBKUPCloudStoragePassword string `json:"ibkupCloudStoragePassword,omitempty"`
	// User name of an Oracle Cloud user who has read access to the container specified in
	// ibkupCloudStorageContainer.
	// This parameter is required if ibkup is set to yes.
	// Optional
	IBKUPCloudStorageUser string `json:"ibkupCloudStorageUser,omitempty"`
	// Database id of the database from which the existing cloud backup was created.
	// This parameter is required if ibkup is set to yes.
	// Optional
	IBKUPDatabaseID string `json:"ibkupDatabaseID,omitempty"`
	// Password used to create the existing, password-encrypted cloud backup.
	// This password is used to decrypt the backup.
	// This parameter is required if ibkup is set to yes.
	// Optional
	IBKUPDecryptionKey string `json:"ibkupDecryptionKey,omitempty"`
	// Oracle Databsae Cloud Service instance name from which the database of new Oracle Database Cloud Service instance should be created.
	// This parameter is required if ibkup is set to yes and ibkupOnPremise is set to no.
	// Optional
	IBKUPServiceID string `json:"ibkupServiceID,omitempty"`
	// String containing the xsd:base64Binary representation of the cloud backup's wallet archive file.
	// Optional
	IBKUPWalletFileContent string `json:"ibkupWalletFileContent,omitempty"`
	// National Character Set for the Database Cloud Service instance.
	// Default value is AL16UTF16.
	// Optional.
	NCharSet ServiceInstanceNCharSet `json:"ncharset,omitempty"`
	// Name for the Oracle Home directory location that you want to use for the database deployment.
	// If you specify the name for an existing Oracle Home directory location, then the database
	// deployment shares the existing Oracle Database binaries at that location. Otherwise a new
	// Oracle Home is created.
	// Optional. Exadata Cloud Service only
	OracleHomeName string `json:"oracleHomeName,omitempty"`
	// Note: This attribute is valid when Database Cloud Service instance is configured with version 12c.
	// Pluggable Database Name for the Database Cloud Service instance.
	// Default value is pdb1.
	// Optional.
	PDBName string `json:"pdbName,omitempty"`
	// Database Name (sid) for the Database Cloud Service instance.
	// Default value is ORCL.
	// Required.
	SID string `json:"sid"`
	// The name of the snapshot of the service instance specified by sourceServiceName
	// that is to be used to create a "snapshot clone".
	// This parameter is valid only if sourceServiceName is specified.
	// Optional.
	SnapshotName string `json:"snapshotName,omitempty"`
	// When present, indicates that the service instance should be created as a
	// "snapshot clone" of another service instance. Provide the name of the existing service
	// instance whose snapshot is to be used.
	// Optional.
	SourceServiceName string `json:"sourceServiceName,omitempty"`
	// Time Zone for the Database Cloud Service instance.
	// Valid values are Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Monrovia,
	// Africa/Nairobi, Africa/Tripoli, Africa/Windhoek, America/Araguaina, America/Asuncion,
	// America/Bogota, America/Caracas, America/Chihuahua, America/Cuiaba, America/Denver,
	// America/Fortaleza, America/Guatemala, America/Halifax, America/Manaus, America/Matamoros,
	// America/Monterrey, America/Montevideo, America/Phoenix, America/Santiago, America/Tijuana,
	// Asia/Amman, Asia/Ashgabat, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Beirut, Asia/Calcutta,
	// Asia/Damascus, Asia/Dhaka, Asia/Irkutsk, Asia/Jerusalem, Asia/Kabul, Asia/Karachi,
	// Asia/Kathmandu, Asia/Krasnoyarsk, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh,
	// Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Taipei, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar,
	// Asia/Vladivostok, Asia/Yakutsk, Asia/Yerevan, Atlantic/Azores, Australia/Adelaide,
	// Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Perth, Australia/Sydney,
	// Brazil/East, Canada/Newfoundland, Canada/Saskatchewan, Europe/Amsterdam, Europe/Athens,
	// Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Moscow,
	// Europe/Paris, Europe/Prague, Europe/Sarajevo, Pacific/Auckland, Pacific/Fiji, Pacific/Guam,
	// Pacific/Honolulu, Pacific/Samoa, US/Alaska, US/Central, US/Eastern, US/East-Indiana,
	// US/Pacific, UTC.
	// Default value is UTC.
	// Optional.
	Timezone string `json:"timezone,omitempty"`
	// Component type to which the set of parameters applies.
	// Valid values are: db - Oracle Database
	// Required.
	Type ServiceInstanceType `json:"type"`
	// Storage size for data (in GB). Minimum value is 15. Maximum value depends on the backup
	// destination: if BOTH is specified, the maximum value is 1200; if OSS or NONE is specified,
	// the maximum value is 2048.
	// Optional.
	UsableStorage string `json:"usableStorage,omitempty"`
	// Specify if the given cloudStorageContainer is to be created if it does not already exist.
	// Default value is false.
	// Optional.
	CreateStorageContainerIfMissing bool `json:"createStorageContainerIfMissing,omitempty"`
	// Specify if an Oracle Data Guard configuration is created using the Disaster Recovery option
	// or the High Availability option.
	// true - The Disaster Recovery option is used, which places the compute node hosting the primary
	// database and the compute node hosting the standby database in compute zones of different data centers.
	// false - The High Availability option is used, which places the compute node hosting the primary
	// database and the compute node hosting the standby database in different compute zones of the same
	// data center.
	// Default value is false.
	// This option is applicable only when failoverDatabase is set to true.
	// Optional
	DisasterRecovery bool `json:"-"`
	// Specify if an Oracle Data Guard configuration comprising a primary database and a
	// standby database is created. Default value is false.
	// You cannot set both failoverDatabase and isRac to false.
	// Optional
	FailoverDatabase bool `json:"-"`
	// Specify if the database should be configured for use as the replication database of an
	// Oracle GoldenGate Cloud Service instance. Default value is false.
	// You cannot set goldenGate to true if either isRac or failoverDatabase is set to true.
	// Optional
	GoldenGate bool `json:"-"`
	// Specify if an Oracle Hybrid Disaster Recovery configuration comprising a primary database on customer premisesand a standby database in Oracle Public Cloud should be configured.
	// Valid values are yes and no. Default value is no.
	// You cannot set failoverDatabase or isRac to yes if Hybrid Disaster Recovery options is chosen.
	// Optional
	HDG bool `json:"-"`
	// Specify if the service instance's database should, after the instance is created, be replaced
	// by a database stored in an existing cloud backup that was created using Oracle Database Backup
	// Cloud Service. Default value is false.
	// Optional
	IBKUP bool `json:"-"`
	// Specify if the existing cloud backup being used to replace the database is from an on-premises database or another Database Cloud Service instance.
	// Valid values are true for an on-premises database and false for a Database Cloud Service instance. Default value is true.
	// Optional
	IBKUPOnPremise bool `json:"ibkupOnPremise,omitempty"`
	// Specify if a cluster database using Oracle Real Application Clusters should be configured.
	// Valid values are yes and no. Default value is no.
	// Optional
	IsRAC bool `json:"-"`
}

ParameterInput specifies the parameters for the database service instance with the yes/no values of the recovery attributes with booleans

type ParameterRequest added in v0.2.0

type ParameterRequest struct {
	ParameterInput
	DisasterRecoveryString string `json:"disasterRecovery,omitempty"`
	FailoverDatabaseString string `json:"failoverDatabase,omitempty"`
	GoldenGateString       string `json:"goldenGate,omitempty"`
	HDGString              string `json:"hdg,omitempty"`
	IsRACString            string `json:"isRac,omitempty"`
	IBKUPString            string `json:"ibkup,omitempty"`
}

ParameterRequest specifies database request including the yes/no values of the specific recovery strings

type ResourceClient

type ResourceClient struct {
	*Client
	ContainerPath    string
	ResourceRootPath string
}

ResourceClient is an AuthenticatedClient with some additional information about the resources to be addressed.

type SSHKeyInfo added in v0.4.0

type SSHKeyInfo struct {
	// This will likely always be "DB".
	ComponentType string `json:"componentType"`
	// The fully qualified name of the SSH Key object in OPC Cloud Storage
	// where the SSH public key value is stored.
	ComputeKeyName string `json:"computeKeyName"`
	// Should always be 'vmspublickey'
	CredName string `json:"credName"`
	// Should always be SSH
	CredType string `json:"credType"`
	// The string description of the key
	Description string `json:"description"`

	// The message returned from the last update of the SSH Key.
	LastUpdateMessage string `json:"lastUpdateMessage"`
	// Status of the last update of the SSH key
	LastUpdateStatus string `json:"lastUpdateStatus"`
	// Date and time of the last update of the SSH Key
	LastUpdateTime string `json:"lastUpdateTime"`
	// The value "opc"
	OsUserName string `json:"osUserName"`
	// The value "SERVICE"
	ParentType string `json:"parentType"`
	// The Value of the SSH Public Key with any slashes (/) it contains
	// preceded by backslashes: \/.
	PublicKey string `json:"publicKey"`
	// The name of the DatabaseCloudService Instance
	ServiceName string `json:"serviceName"`
	// The value "DBaaS"
	ServiceType string `json:"serviceType"`
}

SSHKeyInfo holds all the known information for a single SSH Key

type ServiceInstance

type ServiceInstance struct {
	// The URL to use to connect to Oracle Application Express on the service instance.
	ApexURL string `json:"apex_url"`
	// Applicable only in Oracle Cloud Infrastructure regions.
	// Name of the availability domain within the region where the Oracle Database Cloud Service instance is provisioned.
	AvailabilityDomain string `json:"availability_domain"`
	// The backup configuration of the service instance.
	BackupDestination string `json:"backup_destination"`
	// The version of cloud tooling for backup and recovery supported by the service instance.
	BackupSupportedVersion string `json:"backup_supported_version"`
	// The database character set of the database.
	CharSet string `json:"charset"`
	// The Oracle Storage Cloud container for backups.
	CloudStorageContainer string `json:"cloud_storage_container"`
	// Name of the cluster supporting the Exadata Cloud Service database deployment.
	ClusterName string `json:"cluster_names"`
	// The Oracle Cloud location housing the service instance.
	ComputeSiteName string `json:"compute_site_name"`
	// The connection descriptor for Oracle Net Services (SQL*Net).
	ConnectDescriptor string `json:"connect_descriptor"`
	// The connection descriptor for Oracle Net Services (SQL*Net) with IP addresses instead of host names.
	ConnectDescriptorWithPublicIP string `json:"connect_descriptor_with_public_ip"`
	// The user name of the Oracle Cloud user who created the service instance.
	CreatedBy string `json:"created_by"`
	// The job id of the job that created the service instance.
	CreationJobID string `json:"creation_job_id"`
	// The date-and-time stamp when the service instance was created.
	CreationTime string `json:"creation_time"`
	// The Oracle Database version on the service instance, including the patch level.
	CurrentVersion string `json:"current_version"`
	// The URL to use to connect to Oracle DBaaS Monitor on the service instance.
	DBAASMonitorURL string `json:"dbaasmonitor_url"`
	// The description of the service instance, if one was provided when the instance was created.
	Description string `json:"description"`
	// The software edition of the service instance.
	Edition ServiceInstanceEdition `json:"edition"`
	// The URL to use to connect to Enterprise Manager on the service instance.
	EMURL string `json:"em_url"`
	// The URL to use to connect to the Oracle GlassFish Server Administration Console on the service instance.
	GlassFishURL string `json:"glassfish_url"`
	// Data Guard Role of the on-premise instance in Oracle Hybrid Disaster Recovery configuration.
	HDGPremIP string `json:"hdgPremIP"`
	// Indicates whether the service instance hosts an Oracle Hybrid Disaster Recovery configuration.
	HybridDG string `json:"hybrid_db"`
	// The identity domain housing the service instance.
	IdentityDomain string `json:"identity_domain"`
	// This attribute is only applicable to accounts where regions are supported.
	// The three-part name of an IP network to which the service instance is added.
	// For example: /Compute-identity_domain/user/object
	IPNetwork string `json:"ipNetwork"`
	// Groups one or more IP reservations in use on this service instance.
	// This attribute is only applicable to accounts where regions are supported.
	// This attribute is returned when you set the ?outputLevel=verbose query parameter.
	IPReservations string `json:"ipReservations"`
	// The Oracle Java Cloud Service instances using this Database Cloud Service instance.
	JAASInstancesUsingService string `json:"jaas_instances_using_service"`
	// The date-and-time stamp when the service instance was last modified.
	LastModifiedTime string `json:"last_modified_time"`
	// The service level of the service instance.
	Level ServiceInstanceLevel `json:"level"`
	// The national character set of the database.
	NCharSet string `json:"ncharset"`
	// The number of Oracle Compute Service IP reservations assigned to the service instance.
	NumIPReservations int `json:"num_ip_reservations"`
	// The number of compute nodes in the service instance.
	NumNodes string `json:"num_nodes"`
	// Name for the Oracle Home directory location (Exadata Cloud Service only)
	OracleHomeName string `json:"oracleHomeName"`
	// The name of the default PDB (pluggable database) created when the service instance was created.
	PDBName string `json:"pdbName"`
	// This attribute is only applicable to accounts where regions are supported.
	// Location where the service instance is provisioned (only for accounts where regions are supported).
	Region string `json:"region"`
	// The name of the service instance.
	Name string `json:"service_name"`
	// The REST endpoint URI of the service instance.
	URI string `json:"service_uri"`
	// The Oracle Compute Cloud shape of the service instance.
	Shape string `json:"shape"`
	// The SID of the database.
	SID string `json:"sid"`
	// The version of the cloud tooling service manager plugin supported by the service instance.
	SMPluginVersion string `json:"sm_plugin_version"`
	// The status of the service instance
	Status ServiceInstanceState `json:"status"`
	// Applicable only in Oracle Cloud Infrastructure regions.
	// Name of the subnet within the region where the Oracle Database Cloud Service instance is provisioned.
	Subnet string `json:"subnet"`
	// The subscription name
	SubscriptionName string `json:"subscription_name"`
	// The billing frequency of the service instance; either MONTHLY or HOURLY.
	SubscriptionType ServiceInstanceSubscriptionType `json:"subscriptionType"`
	// The time zone of the operating system.
	Timezone string `json:"timezone"`
	// The Oracle Database version on the service instance.
	Version string `json:"version"`
	// Indicates whether the service instance hosts an Oracle Data Guard configuration.
	FailoverDatabase bool `json:"failover_database"`
	// Indicates whether service instance was provisioned with the 'Bring Your Own License' (BYOL) option.
	IsBYOL *bool `json:"isBYOL"`
	// Indicates whether the service instance hosts an Oracle RAC database.
	RACDatabase bool `json:"rac_database"`
	// Indicates whether the service instance was provisioned with high performance storage.
	UseHighPerformanceStorage bool `json:"useHighPerformanceStorage"`
	// The listener port for Oracle Net Services (SQL*Net) connections.
	ListenerPort int `json:"listenerPort"`
	// For service instances hosting an Oracle RAC database, the size in GB of the storage shared
	// and accessed by the nodes of the RAC database.
	TotalSharedStorage int `json:"total_shared_storage"`
	// Exadata networking info
	NetworkingInfo NetworkingInfo `json:"networking_info"`
}

ServiceInstance specifies the service instance obtained from a GET request

type ServiceInstanceBackupDestination

type ServiceInstanceBackupDestination string

ServiceInstanceBackupDestination is the allowable backup destinations a service instance can use

const (
	// ServiceInstanceBackupDestinationBoth - Both Cloud Storage and Local Storage
	ServiceInstanceBackupDestinationBoth ServiceInstanceBackupDestination = "BOTH"
	// ServiceInstanceBackupDestinationOSS - Cloud Storage only
	ServiceInstanceBackupDestinationOSS ServiceInstanceBackupDestination = "OSS"
	// ServiceInstanceBackupDestinationNone - None
	ServiceInstanceBackupDestinationNone ServiceInstanceBackupDestination = "NONE"
)

type ServiceInstanceClient

type ServiceInstanceClient struct {
	ResourceClient
	PollInterval time.Duration
	Timeout      time.Duration
}

ServiceInstanceClient is a client for the Service functions of the Database API.

func (*ServiceInstanceClient) CreateServiceInstance

func (c *ServiceInstanceClient) CreateServiceInstance(input *CreateServiceInstanceInput) (*ServiceInstance, error)

CreateServiceInstance creates a new ServiceInstace.

func (*ServiceInstanceClient) DeleteServiceInstance

func (c *ServiceInstanceClient) DeleteServiceInstance(input *DeleteServiceInstanceInput) error

DeleteServiceInstance deletes the service instance with the specified input

func (*ServiceInstanceClient) GetServiceInstance

func (c *ServiceInstanceClient) GetServiceInstance(getInput *GetServiceInstanceInput) (*ServiceInstance, error)

GetServiceInstance retrieves the SeriveInstance with the given name.

func (*ServiceInstanceClient) UpdateDesiredState added in v0.9.2

func (c *ServiceInstanceClient) UpdateDesiredState(input *DesiredStateInput) (*ServiceInstance, error)

UpdateDesiredState updates the specified desired state of a service instance

func (*ServiceInstanceClient) UpdateServiceInstance added in v0.9.1

func (c *ServiceInstanceClient) UpdateServiceInstance(input *UpdateServiceInstanceInput) (*ServiceInstance, error)

UpdateServiceInstance updates the specified service instance

func (*ServiceInstanceClient) WaitForServiceInstanceDeleted

func (c *ServiceInstanceClient) WaitForServiceInstanceDeleted(input *GetServiceInstanceInput, pollInterval, timeoutSeconds time.Duration) error

WaitForServiceInstanceDeleted waits for a service instance to be fully deleted.

func (*ServiceInstanceClient) WaitForServiceInstanceState added in v0.9.2

func (c *ServiceInstanceClient) WaitForServiceInstanceState(input *GetServiceInstanceInput, desiredState ServiceInstanceLifecycleState, pollInterval, timeoutSeconds time.Duration) (*ServiceInstance, error)

WaitForServiceInstanceState waits for a service instance to be in the desired state

type ServiceInstanceDatabaseTemplate added in v0.14.0

type ServiceInstanceDatabaseTemplate string
const (
	// oltp: configures the starter database for a transactional workload
	ServiceInstanceTemplateOLPT ServiceInstanceDatabaseTemplate = "oltp"
	// dw: configures the starter database for a decision support or data warehouse workload
	ServiceInstanceTemplateDW ServiceInstanceDatabaseTemplate = "dw"
)

type ServiceInstanceEdition

type ServiceInstanceEdition string

ServiceInstanceEdition is the allowable edition a service instance can be

const (
	// ServiceInstanceStandardEdition - SE: Standard Edition
	ServiceInstanceStandardEdition ServiceInstanceEdition = "SE"
	// ServiceInstanceEnterpriseEdition - EE: Enterprise Edition
	ServiceInstanceEnterpriseEdition ServiceInstanceEdition = "EE"
	// ServiceInstanceEnterpriseEditionHighPerformance  - EE_HP: Enterprise Edition - High Performance
	ServiceInstanceEnterpriseEditionHighPerformance ServiceInstanceEdition = "EE_HP"
	// ServiceInstanceEnterpriseEditionExtremePerformance - EE_EP: Enterprise Edition - Extreme Performance
	ServiceInstanceEnterpriseEditionExtremePerformance ServiceInstanceEdition = "EE_EP"
)

type ServiceInstanceLevel

type ServiceInstanceLevel string

ServiceInstanceLevel is the allowable levels a service instance can be

const (
	// ServiceInstanceLevelPAAS - PAAS: The Oracle Database Cloud Service service level
	ServiceInstanceLevelPAAS ServiceInstanceLevel = "PAAS"
	// PAAS_EXADATA: The Oracle Exadata Cloud Service service level
	ServiceInstanceLevelEXADATA ServiceInstanceLevel = "PAAS_EXADATA"
	// BASIC: The Oracle Database Cloud Service - Virtual Image service level
	ServiceInstanceLevelBasic ServiceInstanceLevel = "BASIC"
)

type ServiceInstanceLifecycleState added in v0.9.2

type ServiceInstanceLifecycleState string

ServiceInstanceLifecycleState defines the constants for the lifecycle state

const (
	// ServiceInstanceLifecycleStateStop - stop: Stops the Database Cloud Service instance or compute node.
	ServiceInstanceLifecycleStateStop ServiceInstanceLifecycleState = "stop"
	// ServiceInstanceLifecycleStateStart - start: Starts the Database Cloud Service instance or compute node.
	ServiceInstanceLifecycleStateStart ServiceInstanceLifecycleState = "start"
	// ServiceInstanceLifecycleStateRestart - restart: Restarts the Database Cloud Service instance or compute node.
	ServiceInstanceLifecycleStateRestart ServiceInstanceLifecycleState = "restart"
)

type ServiceInstanceNCharSet

type ServiceInstanceNCharSet string

ServiceInstanceNCharSet is the allowable char sets a service instance can use

const (
	// ServiceInstanceNCharSetUTF16 - AL16UTF16
	ServiceInstanceNCharSetUTF16 ServiceInstanceNCharSet = "AL16UTF16"
	// ServiceInstanceNCharSetUTF8 - UTF8
	ServiceInstanceNCharSetUTF8 ServiceInstanceNCharSet = "UTF8"
)

type ServiceInstanceShape

type ServiceInstanceShape string

ServiceInstanceShape specifies the allowable shapes a service instance can be

const (

	// ServiceInstanceShapeOC3 - oc3: 1 OCPU, 7.5 GB memory
	ServiceInstanceShapeOC3 ServiceInstanceShape = "oc3"
	// ServiceInstanceShapeOC4 - oc4: 2 OCPUs, 15 GB memory
	ServiceInstanceShapeOC4 ServiceInstanceShape = "oc4"
	// ServiceInstanceShapeOC5 - oc5: 4 OCPUs, 30 GB memory
	ServiceInstanceShapeOC5 ServiceInstanceShape = "oc5"
	// ServiceInstanceShapeOC6 - oc6: 8 OCPUs, 60 GB memory
	ServiceInstanceShapeOC6 ServiceInstanceShape = "oc6"
	// ServiceInstanceShapeOC7 - oc7: 16 OCPUS, 120 GB memory
	ServiceInstanceShapeOC7 ServiceInstanceShape = "oc7"
	// ServiceInstanceShapeOC1M - oc1m: 1 OCPU, 15 GB memory
	ServiceInstanceShapeOC1M ServiceInstanceShape = "oc1m"
	// ServiceInstanceShapeOC2M - oc2m: 2 OCPUs, 30 GB memory
	ServiceInstanceShapeOC2M ServiceInstanceShape = "oc2m"
	// ServiceInstanceShapeOC3M - oc3m: 4 OCPUs, 60 GB memory
	ServiceInstanceShapeOC3M ServiceInstanceShape = "oc3m"
	// ServiceInstanceShapeOC4M - oc4m: 8 OCPUs, 120 GB memory
	ServiceInstanceShapeOC4M ServiceInstanceShape = "oc4m"
	// ServiceInstanceShapeOC5M - oc5m: 16 OCPUS, 240 GB memory
	ServiceInstanceShapeOC5M ServiceInstanceShape = "oc5m"

	// ServiceInstanceShapeVMStandard1_1 - VM.Standard1.1: 1 OCPU, 7 GB memory
	ServiceInstanceShapeVMStandard1_1 ServiceInstanceShape = "VM.Standard1.1"
	// ServiceInstanceShapeVMStandard1_2 - VM.Standard1.2: 2 OCPU, 14 GB memory
	ServiceInstanceShapeVMStandard1_2 ServiceInstanceShape = "VM.Standard1.2"
	// ServiceInstanceShapeVMStandard1_4 - VM.Standard1.4: 4 OCPU, 28 GB memory
	ServiceInstanceShapeVMStandard1_4 ServiceInstanceShape = "VM.Standard1.4"
	// ServiceInstanceShapeVMStandard1_8 - VM.Standard1.8: 8 OCPU, 56 GB memory
	ServiceInstanceShapeVMStandard1_8 ServiceInstanceShape = "VM.Standard1.8"
	// ServiceInstanceShapeVMStandard1_16 - VM.Standard1.16: 16 OCPU, 112 GB memory
	ServiceInstanceShapeVMStandard1_16 ServiceInstanceShape = "VM.Standard1.16"
	// ServiceInstanceShapeVMStandard2_1 - VM.Standard2.1: 1 OCPU, 15 GB memory
	ServiceInstanceShapeVMStandard2_1 ServiceInstanceShape = "VM.Standard2.1"
	// ServiceInstanceShapeVMStandard2_2 - VM.Standard2.2: 2 OCPU, 30 GB memory
	ServiceInstanceShapeVMStandard2_2 ServiceInstanceShape = "VM.Standard2.2"
	// ServiceInstanceShapeVMStandard2_4 - VM.Standard2.4: 4 OCPU, 60 GB memory
	ServiceInstanceShapeVMStandard2_4 ServiceInstanceShape = "VM.Standard2.4"
	// ServiceInstanceShapeVMStandard2_8 - VM.Standard2.8: 8 OCPU, 120 GB memory
	ServiceInstanceShapeVMStandard2_8 ServiceInstanceShape = "VM.Standard2.8"
	// ServiceInstanceShapeVMStandard2_16 - VM.Standard2.16: 16 OCPU, 240 GB memory
	ServiceInstanceShapeVMStandard2_16 ServiceInstanceShape = "VM.Standard2.16"
	// ServiceInstanceShapeVMStandard2_24 - VM.Standard2.24: 24 OCPU, 320 GB memory
	ServiceInstanceShapeVMStandard2_24 ServiceInstanceShape = "VM.Standard2.24"

	// ServiceInstanceShapeBMStandard1_36 - BM.Standard1.36: 36 OCPU, 256 GB memory
	ServiceInstanceShapeBMStandard1_36 ServiceInstanceShape = "BM.Standard1.36"
	// ServiceInstanceShapeBMStandard2_52 - BM.Standard2.52: 52 OCPU, 768 GB memory
	ServiceInstanceShapeBMStandard2_52 ServiceInstanceShape = "BM.Standard2.52"
)

type ServiceInstanceState

type ServiceInstanceState string

ServiceInstanceState specifies the allowed states a service instance can be in

const (
	// ServiceInstanceConfigured - the service instance has been configured.
	ServiceInstanceConfigured ServiceInstanceState = "Configured"
	// ServiceInstanceInProgress - the service instance is being created.
	ServiceInstanceInProgress ServiceInstanceState = "In Progress"
	// ServiceInstanceMaintenance - the service instance is being stopped, started, restarted or scaled.
	ServiceInstanceMaintenance ServiceInstanceState = "Maintenance"
	// ServiceInstanceRunning  - the service instance is running.
	ServiceInstanceRunning ServiceInstanceState = "Running"
	// ServiceInstanceStopped - the service instance is stopped.
	ServiceInstanceStopped ServiceInstanceState = "Stopped"
	// ServiceInstanceTerminating - the service instance is being deleted.
	ServiceInstanceTerminating ServiceInstanceState = "Terminating"
)

type ServiceInstanceSubscriptionType

type ServiceInstanceSubscriptionType string

ServiceInstanceSubscriptionType specifies the allowable subscription types a service instance can be in

const (
	// ServiceInstanceSubscriptionTypeHourly - HOURLY
	ServiceInstanceSubscriptionTypeHourly ServiceInstanceSubscriptionType = "HOURLY"
	// ServiceInstanceSubscriptionTypeMonthly - MONTHLY
	ServiceInstanceSubscriptionTypeMonthly ServiceInstanceSubscriptionType = "MONTHLY"
)

type ServiceInstanceType

type ServiceInstanceType string

ServiceInstanceType is the allowable types a service instance can be

const (
	// ServiceInstanceTypeDB - db
	ServiceInstanceTypeDB ServiceInstanceType = "db"
)

type ServiceInstanceUsage added in v0.9.1

type ServiceInstanceUsage string

ServiceInstanceUsage defines the constants for a service instance usage

const (
	// ServiceInstanceUsageData extends the Data Storage Volume
	ServiceInstanceUsageData ServiceInstanceUsage = "data"
	// ServiceInstanceUsageFra extends the Backup Storage Volume
	ServiceInstanceUsageFra ServiceInstanceUsage = "fra"
)

type ServiceInstanceVersion

type ServiceInstanceVersion string

ServiceInstanceVersion speicifes the constancts for service instance versions

const (
	// ServiceInstanceVersion18000 - 18.0.0.0
	ServiceInstanceVersion18000 ServiceInstanceVersion = "18.0.0.0"
	// ServiceInstanceVersion12201 - 12.2.0.1
	ServiceInstanceVersion12201 ServiceInstanceVersion = "12.2.0.1"
	// ServiceInstanceVersion12102 - 12.1.0.2
	ServiceInstanceVersion12102 ServiceInstanceVersion = "12.1.0.2"
	// ServiceInstanceVersion11204 - 11.2.0.4
	ServiceInstanceVersion11204 ServiceInstanceVersion = "11.2.0.4"
)

type StandBy added in v0.8.9

type StandBy struct {
	// Name of the availability domain within the region where the standby database of the Oracle Database
	// Cloud Service instance is to be provisioned.
	// Required.
	AvailabilityDomain string `json:"availabilityDomain"`
	// Name of the subnet within the region where the standby database of the Oracle Database Cloud Service
	// instance is to be provisioned.
	// Required.
	Subnet string `json:"subnet"`
}

StandBy specifies the standby attributes for a database service instance

type UpdateAccessRuleInput added in v0.4.0

type UpdateAccessRuleInput struct {
	// Name of the DBaaS Service Instance.
	// Required
	ServiceInstanceID string `json:"-"`
	// Name of the Access Rule. Used in the request's URI, not as a body parameter.
	// Required
	Name string `json:"-"`
	// Type of Operation being performed. This should never be set in the Provider,
	// as we're explicitly calling an Update function here, so the SDK uses the constant
	// defined for Updating an AccessRule
	// Do not set.
	Operation AccessRuleOperation `json:"operation"`
	// Desired Status of the Access Rule. This is the only attribute that can actually be
	// modified on an access rule.
	// Required
	Status AccessRuleStatus `json:"status"`
}

UpdateAccessRuleInput defines the Update parameters needed to update an AccessRule for a DBaaS Service Instance.

type UpdateServiceInstanceInput added in v0.9.1

type UpdateServiceInstanceInput struct {
	// Name of the service instance to update.
	// Required
	Name string `json:"-"`
	// Specify size of additional storage in Giga Bytes. This parameter is optional. User can change shape
	// only without adding storage. If additionalStorage is specified, minimum value is 1GB and maximum value is 1TB.
	// Optional
	AdditionalStorage string `json:"additionalStorage,omitempty"`
	// (Applies only to service instances that use Oracle RAC and Oracle Data Guard together.)
	// Specifies whether the scaling operation applies to the primary database or standby database of the
	// Data Guard configuration. Specify the value DB_1 for the primary database or the value DB_2 for the
	// standby database.
	// Optional
	ComponentInstanceName string `json:"componentInstanceName,omitempty"`
	// Specify new shape for the Database Cloud Service instance. User can specify a higher shape (Scale Up) or
	// a lower shape (Scale Down). Shape is optional. User can add storage only without changing shape.
	// Optional
	Shape ServiceInstanceShape `json:"shape,omitempty"`
	// This parameter specifies usage of additional storage and is applicable only when additionalStorage is
	// specified. Specify usage to extend Data or Backup storage volumes of Database Cloud Service instance.
	// Valid values are data to extend Data Storage Volume and fra to extend Backup Storage Volume. If usage is
	// not specified, new storage volume will be created.
	// Optional
	Usage ServiceInstanceUsage `json:"usage,omitempty"`
}

UpdateServiceInstanceInput defines the attributes available to update for a service instance

type UtilityClient added in v0.4.0

type UtilityClient struct {
	UtilityResourceClient
}

The UtilityClient which extends the UtilityResourceClient. This is purely because utility resources (SSH Keys + Access Rules) include the service instance name in the URL path for managing these resources, so we cannot use the same resource client that the service instance uses. We're still using the same OPC client, just abstracting the path helper functions to make life a little easier.

func (*UtilityClient) CreateAccessRule added in v0.4.0

func (c *UtilityClient) CreateAccessRule(input *CreateAccessRuleInput) (*AccessRuleInfo, error)

CreateAccessRule Creates an AccessRule with the supplied input struct. The API call to Create returns a nil body object, and a 202 status code on success. Thus, the Create method will return the resulting object from an internal GET call during the WaitForReady timeout.

func (*UtilityClient) CreateSSHKey added in v0.4.0

func (c *UtilityClient) CreateSSHKey(input *CreateSSHKeyInput) (*SSHKeyInfo, error)

CreateSSHKey creates an SSH Key with the supplied input struct.

func (*UtilityClient) DeleteAccessRule added in v0.4.0

func (c *UtilityClient) DeleteAccessRule(input *DeleteAccessRuleInput) error

DeleteAccessRule - Deletes an AccessRule with the provided input struct. Returns any errors that occurred.

func (*UtilityClient) GetAccessRule added in v0.4.0

func (c *UtilityClient) GetAccessRule(input *GetAccessRuleInput) (*AccessRuleInfo, error)

GetAccessRule - Gets a slice of every AccessRule, and iterates on the result until we find the correctly matching access rule. This is likely an expensive operation depending on how many access rules the customer has. However, since there's no direct GET API endpoint for a single Access Rule, it's not able to be optimized yet.

func (*UtilityClient) GetComputeNodes added in v0.14.0

func (c *UtilityClient) GetComputeNodes(input *GetComputeNodesInput) (*ComputeNodesInfo, error)

GetComputeNodes gets details of all Compute Nodes for a Service Instance

func (*UtilityClient) GetDefaultAccessRules added in v0.8.4

func (c *UtilityClient) GetDefaultAccessRules(input *GetDefaultAccessRuleInput) (*DefaultAccessRuleInfo, error)

GetDefaultAccessRules retrieves all the default access rules pertaining to Database Service Instance

func (*UtilityClient) GetSSHKey added in v0.4.0

func (c *UtilityClient) GetSSHKey(input *GetSSHKeyInput) (*SSHKeyInfo, error)

GetSSHKey gets information on a single SSH Key

func (*UtilityClient) UpdateAccessRule added in v0.4.0

func (c *UtilityClient) UpdateAccessRule(input *UpdateAccessRuleInput,
) (*AccessRuleInfo, error)

UpdateAccessRule - Updates an AccessRule with the provided input struct. Returns a fully populated Info struct and any errors encountered

func (*UtilityClient) UpdateDefaultAccessRules added in v0.8.4

func (c *UtilityClient) UpdateDefaultAccessRules(input *DefaultAccessRuleInfo) (*DefaultAccessRuleInfo, error)

UpdateDefaultAccessRules Updates all the specified/relevant default access rules for a database service instance

type UtilityResourceClient added in v0.4.0

type UtilityResourceClient struct {
	*Client
	ContainerPath     string
	ResourceRootPath  string
	ServiceInstanceID string
}

UtilityResourceClient is a client to manage resources on an already created service instance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL