mysql

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Manages the access rules for the MySQL CS Service Instance. The only fields that can be updated for an access rule is the desired state: Enabled / Disabled. AccessRules are dependent on the existance of ServiceInstance.

Index

Constants

View Source
const AUTH_HEADER = "Authorization"
View Source
const CONTENT_TYPE_JSON = "application/json"
View Source
const CONTENT_TYPE_ORA_JSON = "application/vnd.com.oracle.oracloud.provisioning.Service+json"
View Source
const TENANT_HEADER = "X-ID-TENANT-NAME"
View Source
const WaitForAccessRulePollInterval = time.Duration(2 * time.Second)

Default polling interval for Access Rule operations

View Source
const WaitForAccessRuleTimeout = time.Duration(30 * time.Second)

Default Timeout value for Access Rule operations

View Source
const WaitForServiceInstanceDeletePollInterval = time.Duration(60 * time.Second)

WaitForServiceInstanceDeletePollInterval is the default polling value for deleting a service instance and waiting for the instance to be completely removed.

View Source
const WaitForServiceInstanceDeleteTimeout = time.Duration(3600 * time.Second)

WaitForServiceInstanceDeleteTimeout is the default Timeout value for deleting a service instance and waiting for the instance to be completely removed.

View Source
const WaitForServiceInstanceReadyPollInterval = time.Duration(60 * time.Second)

WaitForServiceInstanceReadyPollInterval is the default polling interval value for Creating a service instance and waiting for the instance to be ready

View Source
const WaitForServiceInstanceReadyTimeout = time.Duration(3600 * time.Second)

WaitForServiceInstanceReadyTimeout is the default Timeout value for Creating a service instance and waiting for the instance to be ready

Variables

View Source
var (
	MySQLAccessRuleContainerPath = "/paas/api/v1.1/instancemgmt/%s/services/MySQLCS/instances/%s/accessrules"
	MySQLAccessRuleRootPath      = "/paas/api/v1.1/instancemgmt/%s/services/MySQLCS/instances/%s/accessrules/%s"
)

API URI Paths for the Container and Root objects.

View Source
var (
	ServiceInstanceContainerPath = "/paas/api/v1.1/instancemgmt/%[1]s/services/MySQLCS/instances/"
	ServiceInstanceResourcePath  = "/paas/api/v1.1/instancemgmt/%[1]s/services/MySQLCS/instances/%[2]s"
)

API URI Paths for the Container and Root objects.

Functions

This section is empty.

Types

type AccessRuleActivity

type AccessRuleActivity struct {
	AccessRuleActivityInfo AccessRuleActivityInfo `json:"activity"`
}

AccessRuleActivity describes a single activity operation that have been performed on the access rules. Example of activies include created, disabled.

type AccessRuleActivityInfo

type AccessRuleActivityInfo struct {
	// The name of the rule
	RuleName string `json:"ruleName"`
	// The system generated message on the activity that was performed.
	Message string `json:"message"`
	// Error messages that have been reported during the activity.
	Errors string `json:"errors"`
	// The status of the activity
	Status string `json:"status"`
}

AccessRuleActivityInfo describes an activity/operation that has been performed

type AccessRuleInfo

type AccessRuleInfo struct {
	// Description of the Access Rule
	Description string `json:"description"`
	// The destination of the Access Rule. This is the service object to allow traffic to. e.g. mysql_MASTER
	Destination string `json:"destination,omitempty"`
	// The port(s) to allow traffic to pass through. This can be a single or port range.
	Ports string `json:"ports"`
	// The protocol for the rule. e.g. UDP / TCP
	Protocol string `json:"protocol"`
	// The name of the rule.
	// Required.
	RuleName string `json:"ruleName"`
	// Type of rule. One of "DEFAULT", "SYSTEM" or "USER".
	// Computed value
	RuleType string `json:"ruleType,omitempty"`
	// The hosts which traffic is permitted from. It can be IP address or subnets.
	// Required
	Source string `json:"source"`
	// The status of the rule.
	Status string `json:"status,omitempty"`
}

AccessRuleInfo holds the information for a single AccessRule

type AccessRuleList

type AccessRuleList struct {
	AccessRules []AccessRuleInfo     `json:"accessRules"`
	Activities  []AccessRuleActivity `json:"activities"`
}

AccessRulesList holds a list of all the AccessRules and a list of Access Rule activities that have been performed

type AccessRuleOperation

type AccessRuleOperation string

Operations constants for either updating or deleting an access rule.

const (
	AccessRuleUpdate AccessRuleOperation = "update"
	AccessRuleDelete AccessRuleOperation = "delete"
)

type AccessRuleStatus

type AccessRuleStatus string

Status Constants for an Access Rule

const (
	AccessRuleEnabled  AccessRuleStatus = "enabled"
	AccessRuleDisabled AccessRuleStatus = "disabled"
)

type AccessRulesClient

type AccessRulesClient struct {
	AccessRulesResourceClient
}

func (*AccessRulesClient) CreateAccessRule

func (c *AccessRulesClient) CreateAccessRule(input *CreateAccessRuleInput) error

CreateAccessRule creates an AccessRule with the supplied input. The API returns a http 202 on success.

func (*AccessRulesClient) DeleteAccessRule

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

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

func (*AccessRulesClient) GetAccessRule

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

GetAccessRule gets a single access rule info object from the MySQL CS Service Instance. The method gets the full list and iterates locally for the matching rule name.

func (*AccessRulesClient) GetAllAccessRules

func (c *AccessRulesClient) GetAllAccessRules(input *GetAccessRuleInput) (*AccessRuleList, error)

GetAllAccessRules gets all the access rules from a MySQL CS Service instance. We make use of the same GetAccessRuleInput, but we ignore the name attribute.

func (*AccessRulesClient) UpdateAccessRule

func (c *AccessRulesClient) 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 (*AccessRulesClient) WaitForAccessRuleDeleted

func (c *AccessRulesClient) WaitForAccessRuleDeleted(input *GetAccessRuleInput, pollInterval time.Duration, timeout time.Duration) (*AccessRuleInfo, error)

WaitForAccessRuleDeleted waits for the access rule to be delete completely. As the operations are asynchronous, we invoke the delete an poll the API to check that the AccessRule is completely removed from the access rule list.

func (*AccessRulesClient) WaitForAccessRuleReady

func (c *AccessRulesClient) WaitForAccessRuleReady(input *GetAccessRuleInput, pollInterval time.Duration, timeoutSeconds time.Duration) error

WaitForAccessRuleReady gets into a wait loop for access rule to be created successfully and available. The creation typically takes some time before the rule is available, so we get into a wait loop until the access rule is ready.

type AccessRulesResourceClient

type AccessRulesResourceClient struct {
	*MySQLClient
	ResourceDescription string
	ContainerPath       string
	ResourceRootPath    string
	ServiceInstanceID   string
}

type ActivityLogInfo

type ActivityLogInfo struct {
	ActivityLogId  string                `json:"activityLogId"`
	AuthDomain     string                `json:"authDomain"`
	AuthUser       string                `json:"authUser"`
	EndDate        string                `json:"endDate"`
	IdentityDomain string                `json:"identityDomain"`
	InitiatedBy    string                `json:"initiatedBy"`
	JobId          string                `json:"jobId"`
	Messages       []ActivityMessageInfo `json:"messages"`
	OperationId    string                `json:"operationId"`
	OperationType  string                `json:"operationType"`
	ServiceId      string                `json:"serviceId"`
	ServiceName    string                `json:"serviceName"`
	StartDate      string                `json:"startDate"`
	Status         string                `json:"status"`
	SummaryMessage string                `json:"summaryMessage"`
	ServiceType    string                `json:"serviceType"` // Not in API
}

ActivityLogInfo describes the list of activities that have occurred on the ServiceInstance.

type ActivityMessageInfo

type ActivityMessageInfo struct {
	ActivityDate string `json:"activityDate"`
	Messages     string `json:"message"`
}

ActivityMessageInfo is the specific message that

type AttributeInfo

type AttributeInfo struct {
	DisplayName  string `json:"displayName"`
	Type         string `json:"type"`
	Value        string `json:"value"`
	DisplayValue string `json:"displayValue"`
	IsKeyBinding bool   `json:"isKeyBinding"`
}

type ComponentInfo

type ComponentInfo struct {
	Mysql MysqlInfo `json:"mysql"`
}

type ComponentParameters

type ComponentParameters struct {
	Mysql MySQLParameters `json:"mysql"`
}

ComponentParameters used for creating the MySQL Service Instance. This wraps the MySQLParamters.

type CreateAccessRuleInput

type CreateAccessRuleInput struct {
	// Name of the MySQL CS Service Instance.
	// Required.
	ServiceInstanceID string `json:"-"`
	// Description of the Access Rule.
	// Required
	Description string `json:"description"`
	// The Destination to which traffic is allowed.
	// Required
	Destination string `json:"destination"`
	// The ports to allow traffic on. Can be a single port or range
	// Required.
	Ports string `json:"ports"`
	// Protocol for the port. Can be tcp or udp
	// Required.
	Protocol string `json:"protocol,omitempty"`
	// Name of the rule.
	// Required.
	RuleName string `json:"ruleName"`
	// The IP Addresses and subnets from which traffic is allowed.
	// Valid values include:
	//   - "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"`
	// The desired status of the rule. Either "disabled" or "enabled".
	Status string `json:"status,omitempty"`
	// Time to wait between polling 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.

type CreateServiceInstanceInput

type CreateServiceInstanceInput struct {
	// MySQL Component parameters for they MySQL Service.
	ComponentParameters ComponentParameters `json:"componentParameters"`
	// Service parameters for the MySQL Service
	ServiceParameters ServiceParameters `json:"serviceParameters"`
}

Details for the CreateServiceInstance to create the MySQL Service Instance

type DeleteAccessRuleInput

type DeleteAccessRuleInput struct {
	// Name of the MySQL CS Service Instance.
	// Required.
	ServiceInstanceID string `json:"-"`
	// Name of the AccessRule.
	// Required.
	Name string `json:"-"`
	// Type of Operation being performed. This should not be set.
	// The SDK will set the operation to use the constant defined for delete.
	// Do not set.
	Operation AccessRuleOperation `json:"operation"`
	// The Desired staut sof the Access Rule. Because we are calling a delete, this attribute is
	// ignored.
	Status AccessRuleStatus `json:"status"`
	// Time to wait between checking for access rule state.
	PollInterval time.Duration `json:"-"`
	// Time to wait for an access rule to be deleted completely.
	Timeout time.Duration `json:"-"`
}

DeleteAccessRuleInput defines the Delete parameters to delete an access rule on the MySQL CS service instance.

type DeleteServiceInput

type DeleteServiceInput struct {
}

DeleteServiceInput defines the parameters needed to delete a MySQL Instance.

type GetAccessRuleInput

type GetAccessRuleInput struct {
	// The name of the MySQL CS Service instance. This is used in forming the URI to retrieve the access rules.
	// Required.
	ServiceInstanceID string `json:"-"`
	// Name of the AccessRule.
	// There is no native "GET" to return a single AccessRuleInfo Object, so what we do is get back
	// the full list and search for the access rule locally.
	Name string `json:"-"`
}

GetAccessRuleInput defines the input parameters needed to retrieve information on AccessRules for a MySQL CS Service Instance.

type GetServiceInstanceInput

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

GetServiceInstanceInput defines the parameters needed to retrieve information on ServiceInstance.

type HostInfo

type HostInfo struct {
	Vmid               int                   `json:"vmId"`
	Id                 int                   `json:"id"`
	Uuid               string                `json:"uuid"`
	HostName           string                `json:"hostName"`
	Label              string                `json:"label"`
	UsageType          string                `json:"usageType"`
	Role               string                `json:"role"`
	ComponentType      string                `json:"componentType"`
	State              string                `json:"state"`
	VMStateDisplayName string                `json:"vmStateDisplayName"`
	ShapeId            string                `json:"shapeId"`
	TotalStorage       int                   `json:"totalStorage"`
	CreationDate       string                `json:"creationDate"`
	IsAdminNode        bool                  `json:"isAdminNode"`
	Servers            map[string]ServerInfo `json:"servers"`
}

type MySQLClient

type MySQLClient struct {
	ServiceInstanceID string
	// contains filtered or unexported fields
}

func GetMySQLTestClient

func GetMySQLTestClient(c *opc.Config) (*MySQLClient, error)

func NewMySQLClient

func NewMySQLClient(c *opc.Config) (*MySQLClient, error)

func (*MySQLClient) AccessRules

func (c *MySQLClient) AccessRules() *AccessRulesClient

AccessRulesClient returns a AccessRulesClient for managing Access Rules for the MySQL CS Service Instance.

func (*MySQLClient) ServiceInstanceClient

func (c *MySQLClient) ServiceInstanceClient() *ServiceInstanceClient

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

type MySQLParameters

type MySQLParameters struct {
	// The name of the MySQL Database. This defaults to mydatabase if the value is omitted or blank.
	DBName string `json:"dbName,omitempty"`
	// The Storage Volume size (in GB) for the MySQL Data. The value must be between 25 and 1024. The default value is 25.
	DBStorage string `json:"dbStorage, omitempty"`
	// Indicate whether the MySQL Enterprise Monitor should be configured. Values : [ "Yes, "No"]. The default is "No"
	EnterpriseMonitor string `json:"enterpriseMonitor,omitempty"`
	// Password for the EM Agent. The password must be at least 8 characters long, and have at least one lower case letter, one upper case letter, one number and one special character
	EnterpriseMonitorAgentPassword string `json:"enterpriseMonitorAgentPassword,omitempty"`
	// Username for the EM Agent. The Name must start with a letter, and consist of letters and numbers. and be between 2 and 32 characters.
	EnterpriseMonitorAgentUser string `json:"enterpriseMonitorAgentUser,omitempty"`
	// Password for the EM Manager. The password must be at least 8 characters long, and have at least one lower case letter, one upper case letter, one number and one special character
	EnterpriseMonitorManagerPassword string `json:"enterpriseMonitorManagerPassword,omitempty"`
	// Username for the EM Manager. The Name must start with a letter, and consist of letters and numbers. and be between 2 and 32 characters.
	EnterpriseMonitorManagerUser string `json:"enterpriseMonitorManagerUser,omitempty"`
	// The MySQL Server Character set. Default Value: 'utbmb4'
	MysqlCharset string `json:"mysqlCharset,omitempty"`
	// The MySQL Server collation.
	MysqlCollation string `json:"mysqlCollation,omitempty"`
	// The Port for the MySQL Enterprise Monitor. The default is 18443
	MysqlEMPort string `json:"mysqlEMPort,omitempty"`
	// The port for the MySQL Service. The default is 3306
	MysqlPort string `json:"mysqlPort,omitempty"`

	// The MySQL Administration user for connecting to the service. The Name must start with a letter, and consist of letters and numbers. and be between 2 and 32 characters. Default Value: root.
	MysqlUserName string `json:"mysqlUserName,omitempty"`
	// The password for the MySQL Username. The password must start with a letter, be between 8 and 30 characters long, and contains letters, at least one number, and any number of special chacters ($#_)
	MysqlUserPassword string `json:"mysqlUserPassword,omitempty"`
	// Desired compute shape. Default: oc3
	Shape string `json:"shape,omitempty"`
	// 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.
	SnapshotName string `json:"snapshot,omitempty"`
	//  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. dbName, mysqlCharset, mysqlCollation, mysqlEMPort, enterpriseMonitor, and associated MySQL server component parameters do not apply when cloning a service from a snapshot.
	SourceServiceName string `json:"sourceServiceName,omitempty"`
	// This attribute is relevant to only Oracle Cloud Infrastructure. Specify the Oracle Cloud Identifier (OCID) of a subnet from a virtual cloud network (VCN) that you had created previously in Oracle Cloud Infrastructure. For the instructions to create a VCN and subnet
	Subnet string `json:"subnet,omitempty"`
}

MySQLParameters used for create the MySQL Service Instance.

type MysqlInfo

type MysqlInfo struct {
	ServiceId                 string                    `json:"serviceId"`
	ComponentId               string                    `json:"componentId"`
	State                     string                    `json:"state"`
	ComponentStateDisplayName string                    `json:"componentStateDisplayName"`
	Version                   string                    `json:"version"`
	ComponentType             string                    `json:"componentType"` // Not in API
	CreationDate              string                    `json:"creationDate"`
	InstanceName              string                    `json:"instanceName"`
	InstanceRole              string                    `json:"instanceRole"`
	IsKeyComponent            bool                      `json:"isKeyComponent"` // Not in API
	Attributes                map[string]AttributeInfo  `json:"attributes"`
	VMInstances               map[string]VMInstanceInfo `json:"vmInstances"`
	AdminHostName             string                    `json:"adminHostName"`
	Hosts                     map[string]HostInfo       `json:"hosts"`       // Not in API
	DisplayName               string                    `json:"displayName"` // Not in API

}

type PatchingInfo

type PatchingInfo struct {
	CurrentOperation      map[string]string `json:"currentOperation"`
	TotalAvailablePatches string            `json:"totalAvailablePatches"`
}

type ResourceClient

type ResourceClient struct {
	*MySQLClient
	ResourceDescription string
	ContainerPath       string
	ResourceRootPath    string
	ServiceInstanceID   string
}

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

type ServerInfo

type ServerInfo struct {
	ServerId               string `json:"serverId"`
	ServerName             string `json:"serverName"`
	ServerType             string `json:"serverType"`
	ServerRole             string `json:"serverRole"`
	State                  string `json:"state"`
	ServerStateDisplayName string `json:"serverStateDisplayName"`
	CreationDate           string `json:"creationDate"`
}

type ServiceInstance

type ServiceInstance struct {
	ServiceId                    string                   `json:"serviceId"`
	ServiceUuid                  string                   `json:"serviceUuid"` // Not in API
	ServiceLogicalUuid           string                   `json:"serviceLogicalUuid"`
	ServiceName                  string                   `json:"serviceName"`
	ServiceType                  string                   `json:"serviceType"`
	DomainName                   string                   `json:"domainName"`
	ServiceVersion               string                   `json:"serviceVersion"`
	ReleaseVersion               string                   `json:"releaseVersion"`
	BaseReleaseVersion           string                   `json:"baseReleaseVersion"` // Not in API
	MetaVersion                  string                   `json:"metaVersion"`
	ServiceDescription           string                   `json:"serviceDescription"` // Not in API
	ServiceLevel                 string                   `json:"serviceLevel"`
	Subscription                 string                   `json:"subscription"`
	MeteringFrequency            string                   `json:"meteringFrequency"`
	Edition                      string                   `json:"edition"`
	TotalSSDStorage              int                      `json:"totalSSDStorage"`
	Status                       ServiceInstanceState     `json:"state"`
	ServiceStateDisplayName      string                   `json:"serviceStateDisplayName"`
	Clone                        bool                     `json:"clone"`
	Creator                      string                   `json:"creator"`
	CreationDate                 string                   `json:"creationDate"`
	IsBYOL                       bool                     `json:"isBYOL"`
	IsManaged                    bool                     `json:"isManaged"`
	IaasProvider                 string                   `json:"iaasProvider"`
	Attributes                   map[string]AttributeInfo `json:"attributes"`
	Components                   ComponentInfo            `json:"components"`
	ActivityLogs                 []ActivityLogInfo        `json:"activityLogs"`
	LayeringMode                 string                   `json:"layeringMode"`
	ServiceLevelDisplayName      string                   `json:"serviceLevelDisplayName"`
	EditionDisplayName           string                   `json:"editionDisplayName"`
	MeteringFrequencyDisplayName string                   `json:"meteringFrequencyDisplayName"`
	BackupFilePath               string                   `json:"BACKUP_FILE_PATH"`
	DataVolumeSize               string                   `json:"DATA_VOLUME_SIZE"`
	UseSSD                       string                   `json:"USE_SSD"`
	ProvisionEngine              string                   `json:"provisionEngine"`
	MysqlPort                    string                   `json:"MYSQL_PORT"`
	CloudStorageContainer        string                   `json:"CLOUD_STORAGE_CONTAINER"`
	BackupDestination            string                   `json:"BACKUP_DESTINATION"`
	TotalSharedStorage           int                      `json:"totalSharedStorage"`
	ComputeSiteName              string                   `json:"computeSiteName"`
	Patching                     PatchingInfo             `json:"patching"`

	// The reason for the instance going to error state, if available.
	ErrorReason string `json:"error_reason"`
}

ServiceInstance defines the instance information that is returned from the Get method when quering the instance.

type ServiceInstanceBackupDestination

type ServiceInstanceBackupDestination string

Constants for the Backup Destination

const (
	ServiceInstanceBackupDestinationBoth ServiceInstanceBackupDestination = "BOTH"
	ServiceInstanceBackupDestinationNone ServiceInstanceBackupDestination = "NONE"
	ServiceInstanceBackupDestinationOSS  ServiceInstanceBackupDestination = "OSS"
)

type ServiceInstanceClient

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

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

func (*ServiceInstanceClient) CreateServiceInstance

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

CreateServiceInstance calls the MySQL CS APIs to create the service instance. The method is used internally by the startServiceInstance method. The method returns a http 202 on success.

func (*ServiceInstanceClient) DeleteServiceInstance

func (c *ServiceInstanceClient) DeleteServiceInstance(serviceName string) error

DeleteServiceInstance delete the MySQL instance, then waits for the actual instance to be removed before returning.

func (*ServiceInstanceClient) GetServiceInstance

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

GetServiceInstance retrieves the ServiceInstance with the given name.

func (*ServiceInstanceClient) WaitForServiceInstanceDeleted

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

WaitForServiceInstanceDeleted waits for a service instance to be fully deleted.

func (*ServiceInstanceClient) WaitForServiceInstanceRunning

func (c *ServiceInstanceClient) WaitForServiceInstanceRunning(input *GetServiceInstanceInput, pollingInterval time.Duration, timeoutSeconds time.Duration) (*ServiceInstance, error)

WaitForServiceInstanceRunning waits for an instance to be created and completely initialized and available.

type ServiceInstanceEnterpriseMonitor

type ServiceInstanceEnterpriseMonitor string

Constants for whether the Enterprise Monitor should be installed

const (
	ServiceInstanceEnterpriseMonitorYes ServiceInstanceEnterpriseMonitor = "Yes"
	ServiceInstanceEnterpriseMonitorNo  ServiceInstanceEnterpriseMonitor = "No"
)

type ServiceInstanceMeteringFrequency

type ServiceInstanceMeteringFrequency string

Constants for the metering frequency for the MySQL CS Service Instance.

const (
	ServiceInstanceMeteringFrequencyHourly  ServiceInstanceMeteringFrequency = "HOURLY"
	ServiceInstanceMeteringFrequencyMonthly ServiceInstanceMeteringFrequency = "MONTHLY"
)

type ServiceInstanceState

type ServiceInstanceState string

Constants for the state of the Service Instance State

const (
	ServiceInstanceReady        ServiceInstanceState = "READY"
	ServiceInstanceInitializing ServiceInstanceState = "INITIALIZING"
	ServiceInstanceStarting     ServiceInstanceState = "STARTING"
	ServiceInstanceStopping     ServiceInstanceState = "STOPPING"
	ServiceInstanceStopped      ServiceInstanceState = "STOPPED"
	ServiceInstanceConfiguring  ServiceInstanceState = "CONFIGURING"
	ServiceInstanceError        ServiceInstanceState = "ERROR"
	ServiceInstanceTerminating  ServiceInstanceState = "TERMINATING"
)

type ServiceParameters

type ServiceParameters struct {
	// ONLY FOR OCI. Name of the data center location for the OCI Region. e.g. FQCn:US-ASHBURN-AD1"
	AvailabilityDomain string `json:"availabilityDomain,omitempty"`
	// Backup Destination. Value values are : BOTH, OSS, NONE. Default: NONE
	BackupDestination string `json:"backupDestination,omitempty"`
	// The URI of the object storage container for storing the MySQL CS Instance backups. On OCI-C, the container does NOT need to be created before provisioning. On OCI the container MUST BE created before provisioning.
	// Use one of the following formats: Storage-<IdentityDomainID>/<Container Name>, <StorageServiceName>-<IdentityDomainId>/<ContainerName>, <restEndPointURL>/<ContainerName>
	CloudStorageContainer string `json:"cloudStorageContainer,omitempty"`
	// Specifies whether to creat the storage container if it does not exist. Not applicable to OCI. Only for OCI-C. Default: False
	CloudStorageContainerAutoGenerate bool `json:"cloudStorageContainerAutoGenerate,omitempty"`
	// Password for the object storage user. The password must be specified if cloudStorageContainer is set.
	CloudStoragePassword string `json:"cloudStoragePassword,omitempty"`
	// User name for the object storage user. The user name must be specified if cloudStorageContainer is set.
	CloudStorageUsername string `json:"cloudStorageUser,omitempty"`
	// Flag that specifies whether to enable (true) or disable (false) notifications by email. If this property is set to true, you must specify a value in notificationEmail.
	EnableNotification bool `json:"enableNotification,omitempty"`
	// The three-part name of a custom IP network to attach this service instance to. For example: /Compute-identity_domain/user/object. This attribute is applicable only to accounts where regions are supported. This is not applicable to OCI
	IPNetwork string `json:"ipNetwork"`
	// The billing frequency of the service instance; either MONTHLY or HOURLY. Default: MONTHLY
	MeteringFrequency string `json:"meteringFrequency,omitempty"`
	// The email that will be used to send notifications to.
	NotificationEmail string `json:"notificationEmail,omitempty"`
	// Name of the region where the MySQL Service instance is to be provisioned. This attribute is applicable only to accounts where regions are supported
	Region string `json:"region,omitempty"`
	// Text that provides addition information about the service instance.
	ServiceDescription string `json:"serviceDescription,omitempty"`
	// Name of the Service Instance. The name must be between 1 to 50 characters, start with a letter, contain only letters, numbers or hyphens, must not end with a hyphen, and must be unique within the identity domain.
	ServiceName string `json:"serviceName"`
	// Public key for the secure shell (SSH). This key will be used for authentication when connecting to the MySQL Cloud Service instance using an SSH client.
	VMPublicKeyText string `json:"vmPublicKeyText,omitempty"`
	// VM operating system user that is valid for variations of compute based services. It will default to the username opc when not specified.
	VMUser string `json:"vmUser,omitempty"`
}

ServiceParameters details the service parameters for the create instance operation

type StorageVolumeInfo

type StorageVolumeInfo struct {
	Name       string `json:"name"`
	Partitions string `json:"partitions"`
	Size       string `json:"size"`
}

type UpdateAccessRuleInput

type UpdateAccessRuleInput struct {
	// Name of the MySQL CS Service Instance. This is used in the request URI.
	// Required.
	ServiceInstanceID string `json:"-"`
	// Name of the Access Rule. This is used in the request URI.
	// Required.
	Name string `json:"-"`
	// The type of operation being performed. The value is implicit and will
	// be set when calling the Update Access rule method.
	// 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"`
	// Sets the time to wait before checking the status of the update. This
	// attribute is implicit and is set by the default pollinterval for the
	// provider.
	PollInterval time.Duration `json:"-"`
	// Time to wait for the update to be ready.
	Timeout time.Duration `json:"-"`
}

UpdateAccessRuleInput defines the Update parameters needed to update an AccessRule for the MySQL CS Service Instance

type VMInstanceInfo

type VMInstanceInfo struct {
	VmId               string `json:"vmId"`
	Id                 int    `json:"id"`
	Uuid               string `json:"uuid"`
	HostName           string `json:"hostName"`
	Label              string `json:"label"`
	IPAddress          string `json:"ipAddress"`
	PublicIPAddress    string `json:"publicIpAddress"`
	UsageType          string `json:"usageType"`
	Role               string `json:"role"`
	ComponentType      string `json:"componentType"`
	State              string `json:"state"`
	VmStateDisplayName string `json:"vmStateDisplayName"`
	ShapeId            string `json:"shapeId"`
	TotalStorage       int    `json:"totalStorage"`
	CreationDate       string `json:"creationDate"`
	IsAdminNode        bool   `json:"isAdminNode"`
}

Jump to

Keyboard shortcuts

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