api: google.golang.org/api/sqladmin/v1beta4 Index | Files

package sqladmin

import "google.golang.org/api/sqladmin/v1beta4"

Package sqladmin provides access to the Cloud SQL Admin API.

For product documentation, see: https://developers.google.com/cloud-sql/

Creating a client

Usage example:

import "google.golang.org/api/sqladmin/v1beta4"
...
ctx := context.Background()
sqladminService, err := sqladmin.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:

sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope))

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Package Files

sqladmin-gen.go

Constants

const (
    // View and manage your data across Google Cloud Platform services
    CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

    // Manage your Google SQL Service instances
    SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin"
)

OAuth2 scopes used by this API.

type AclEntry Uses

type AclEntry struct {
    // ExpirationTime: The time when this access control entry expires in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    ExpirationTime string `json:"expirationTime,omitempty"`

    // Kind: This is always <code>sql#aclEntry</code>.
    Kind string `json:"kind,omitempty"`

    // Name: Optional. A label to identify this entry.
    Name string `json:"name,omitempty"`

    // Value: The whitelisted value for the access control list.
    Value string `json:"value,omitempty"`

    // ForceSendFields is a list of field names (e.g. "ExpirationTime") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ExpirationTime") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

AclEntry: An entry for an Access Control list.

func (*AclEntry) MarshalJSON Uses

func (s *AclEntry) MarshalJSON() ([]byte, error)

type ApiWarning Uses

type ApiWarning struct {
    // Code: Code to uniquely identify the warning type.
    //
    // Possible values:
    //   "SQL_API_WARNING_CODE_UNSPECIFIED" - An unknown or unset warning
    // type from Cloud SQL API.
    //   "REGION_UNREACHABLE" - Warning when one or more regions are not
    // reachable.  The returned result
    // set may be incomplete.
    Code string `json:"code,omitempty"`

    // Message: The warning message.
    Message string `json:"message,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Code") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Code") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

ApiWarning: An Admin API warning message.

func (*ApiWarning) MarshalJSON Uses

func (s *ApiWarning) MarshalJSON() ([]byte, error)

type BackupConfiguration Uses

type BackupConfiguration struct {
    // BinaryLogEnabled: (MySQL only) Whether binary log is enabled. If
    // backup configuration is
    // disabled, binarylog must be disabled as well.
    BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"`

    // Enabled: Whether this configuration is enabled.
    Enabled bool `json:"enabled,omitempty"`

    // Kind: This is always <code>sql#backupConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // Location: Location of the backup
    Location string `json:"location,omitempty"`

    // PointInTimeRecoveryEnabled: Reserved for future use.
    PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"`

    // ReplicationLogArchivingEnabled: Reserved for future use.
    ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"`

    // StartTime: Start time for the daily backup configuration in UTC
    // timezone in the 24
    // hour format - <code>HH:MM</code>.
    StartTime string `json:"startTime,omitempty"`

    // ForceSendFields is a list of field names (e.g. "BinaryLogEnabled") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BinaryLogEnabled") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

BackupConfiguration: Database instance backup configuration.

func (*BackupConfiguration) MarshalJSON Uses

func (s *BackupConfiguration) MarshalJSON() ([]byte, error)

type BackupRun Uses

type BackupRun struct {
    // Description: The description of this run, only applicable to
    // on-demand backups.
    Description string `json:"description,omitempty"`

    // DiskEncryptionConfiguration: Encryption configuration specific to a
    // backup.
    // Applies only to Second Generation instances.
    DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`

    // DiskEncryptionStatus: Encryption status specific to a backup.
    // Applies only to Second Generation instances.
    DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`

    // EndTime: The time the backup operation completed in UTC timezone in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    EndTime string `json:"endTime,omitempty"`

    // EnqueuedTime: The time the run was enqueued in UTC timezone in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    EnqueuedTime string `json:"enqueuedTime,omitempty"`

    // Error: Information about why the backup operation failed. This is
    // only present if
    // the run has the FAILED status.
    Error *OperationError `json:"error,omitempty"`

    // Id: The identifier for this backup run. Unique only for a specific
    // Cloud SQL
    // instance.
    Id  int64 `json:"id,omitempty,string"`

    // Instance: Name of the database instance.
    Instance string `json:"instance,omitempty"`

    // Kind: This is always <code>sql#backupRun</code>.
    Kind string `json:"kind,omitempty"`

    // Location: Location of the backups.
    Location string `json:"location,omitempty"`

    // SelfLink: The URI of this resource.
    SelfLink string `json:"selfLink,omitempty"`

    // StartTime: The time the backup operation actually started in UTC
    // timezone in <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    StartTime string `json:"startTime,omitempty"`

    // Status: The status of this run.
    //
    // Possible values:
    //   "SQL_BACKUP_RUN_STATUS_UNSPECIFIED" - The status of the run is
    // unknown.
    //   "ENQUEUED" - The backup operation was enqueued.
    //   "OVERDUE" - The backup is overdue across a given backup window.
    // Indicates a
    // problem. Example: Long-running operation in progress during
    // the whole window.
    //   "RUNNING" - The backup is in progress.
    //   "FAILED" - The backup failed.
    //   "SUCCESSFUL" - The backup was successful.
    //   "SKIPPED" - The backup was skipped (without problems) for a given
    // backup
    // window. Example: Instance was idle.
    //   "DELETION_PENDING" - The backup is about to be deleted.
    //   "DELETION_FAILED" - The backup deletion failed.
    //   "DELETED" - The backup has been deleted.
    Status string `json:"status,omitempty"`

    // Type: The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
    //
    // Possible values:
    //   "SQL_BACKUP_RUN_TYPE_UNSPECIFIED" - This is an unknown BackupRun
    // type.
    //   "AUTOMATED" - The backup schedule automatically triggers a backup.
    //   "ON_DEMAND" - The user manually triggers a backup.
    Type string `json:"type,omitempty"`

    // WindowStartTime: The start time of the backup window during which
    // this the backup was
    // attempted in <a href="https://tools.ietf.org/html/rfc3339">RFC
    // 3339</a>
    // format, for example <code>2012-11-15T16:19:00.094Z</code>.
    WindowStartTime string `json:"windowStartTime,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Description") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Description") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

BackupRun: A BackupRun resource.

func (*BackupRun) MarshalJSON Uses

func (s *BackupRun) MarshalJSON() ([]byte, error)

type BackupRunsDeleteCall Uses

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

func (*BackupRunsDeleteCall) Context Uses

func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BackupRunsDeleteCall) Do Uses

func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.backupRuns.delete" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BackupRunsDeleteCall) Fields Uses

func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BackupRunsDeleteCall) Header Uses

func (c *BackupRunsDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type BackupRunsGetCall Uses

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

func (*BackupRunsGetCall) Context Uses

func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BackupRunsGetCall) Do Uses

func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error)

Do executes the "sql.backupRuns.get" call. Exactly one of *BackupRun or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BackupRun.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BackupRunsGetCall) Fields Uses

func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BackupRunsGetCall) Header Uses

func (c *BackupRunsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*BackupRunsGetCall) IfNoneMatch Uses

func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type BackupRunsInsertCall Uses

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

func (*BackupRunsInsertCall) Context Uses

func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BackupRunsInsertCall) Do Uses

func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.backupRuns.insert" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BackupRunsInsertCall) Fields Uses

func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BackupRunsInsertCall) Header Uses

func (c *BackupRunsInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type BackupRunsListCall Uses

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

func (*BackupRunsListCall) Context Uses

func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BackupRunsListCall) Do Uses

func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error)

Do executes the "sql.backupRuns.list" call. Exactly one of *BackupRunsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BackupRunsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BackupRunsListCall) Fields Uses

func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BackupRunsListCall) Header Uses

func (c *BackupRunsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*BackupRunsListCall) IfNoneMatch Uses

func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*BackupRunsListCall) MaxResults Uses

func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of backup runs per response.

func (*BackupRunsListCall) PageToken Uses

func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall

PageToken sets the optional parameter "pageToken": A previously-returned page token representing part of the larger set of results to view.

func (*BackupRunsListCall) Pages Uses

func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type BackupRunsListResponse Uses

type BackupRunsListResponse struct {
    // Items: A list of backup runs in reverse chronological order of the
    // enqueued time.
    Items []*BackupRun `json:"items,omitempty"`

    // Kind: This is always <code>sql#backupRunsList</code>.
    Kind string `json:"kind,omitempty"`

    // NextPageToken: The continuation token, used to page through large
    // result sets. Provide
    // this value in a subsequent request to return the next page of
    // results.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

BackupRunsListResponse: Backup run list results.

func (*BackupRunsListResponse) MarshalJSON Uses

func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error)

type BackupRunsService Uses

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

func NewBackupRunsService Uses

func NewBackupRunsService(s *Service) *BackupRunsService

func (*BackupRunsService) Delete Uses

func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall

Delete: Deletes the backup taken by a backup run.

func (*BackupRunsService) Get Uses

func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall

Get: Retrieves a resource containing information about a backup run.

func (*BackupRunsService) Insert Uses

func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall

Insert: Creates a new backup run on demand. This method is applicable only to Second Generation instances.

func (*BackupRunsService) List Uses

func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall

List: Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.

type BinLogCoordinates Uses

type BinLogCoordinates struct {
    // BinLogFileName: Name of the binary log file for a Cloud SQL instance.
    BinLogFileName string `json:"binLogFileName,omitempty"`

    // BinLogPosition: Position (offset) within the binary log file.
    BinLogPosition int64 `json:"binLogPosition,omitempty,string"`

    // Kind: This is always <code>sql#binLogCoordinates</code>.
    Kind string `json:"kind,omitempty"`

    // ForceSendFields is a list of field names (e.g. "BinLogFileName") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BinLogFileName") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

BinLogCoordinates: Binary log coordinates.

func (*BinLogCoordinates) MarshalJSON Uses

func (s *BinLogCoordinates) MarshalJSON() ([]byte, error)

type CloneContext Uses

type CloneContext struct {
    // BinLogCoordinates: Binary log coordinates, if specified, identify the
    // position up to which the
    // source instance should be cloned. If not specified, the source
    // instance is
    // cloned up to the most recent binary log coordinates.
    BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"`

    // DestinationInstanceName: Name of the Cloud SQL instance to be created
    // as a clone.
    DestinationInstanceName string `json:"destinationInstanceName,omitempty"`

    // Kind: This is always <code>sql#cloneContext</code>.
    Kind string `json:"kind,omitempty"`

    // PitrTimestampMs: Reserved for future use.
    PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"`

    // PointInTime: Reserved for future use.
    PointInTime string `json:"pointInTime,omitempty"`

    // ForceSendFields is a list of field names (e.g. "BinLogCoordinates")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BinLogCoordinates") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

CloneContext: Database instance clone context.

func (*CloneContext) MarshalJSON Uses

func (s *CloneContext) MarshalJSON() ([]byte, error)

type Database Uses

type Database struct {
    // Charset: The MySQL charset value.
    Charset string `json:"charset,omitempty"`

    // Collation: The MySQL collation value.
    Collation string `json:"collation,omitempty"`

    // Etag: This field is deprecated and will be removed from a future
    // version of the
    // API.
    Etag string `json:"etag,omitempty"`

    // Instance: The name of the Cloud SQL instance. This does not include
    // the project ID.
    Instance string `json:"instance,omitempty"`

    // Kind: This is always <code>sql#database</code>.
    Kind string `json:"kind,omitempty"`

    // Name: The name of the database in the Cloud SQL instance. This does
    // not include
    // the project ID or instance name.
    Name string `json:"name,omitempty"`

    // Project: The project ID of the project containing the Cloud SQL
    // database. The Google
    // apps domain is prefixed if applicable.
    Project string `json:"project,omitempty"`

    // SelfLink: The URI of this resource.
    SelfLink string `json:"selfLink,omitempty"`

    SqlserverDatabaseDetails *SqlServerDatabaseDetails `json:"sqlserverDatabaseDetails,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Charset") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Charset") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

Database: Represents a SQL database on the Cloud SQL instance.

func (*Database) MarshalJSON Uses

func (s *Database) MarshalJSON() ([]byte, error)

type DatabaseFlags Uses

type DatabaseFlags struct {
    // Name: The name of the flag. These flags are passed at instance
    // startup, so
    // include both server options and system variables for MySQL. Flags
    // should be
    // specified with underscores, not hyphens. For more information, see
    // <a
    // href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the
    // Cloud
    // SQL documentation.
    Name string `json:"name,omitempty"`

    // Value: The value of the flag. Booleans should be set to
    // <code>on</code> for true
    // and <code>off</code> for false. This field must be omitted if the
    // flag
    // doesn't take a value.
    Value string `json:"value,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Name") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Name") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DatabaseFlags: Database flags for Cloud SQL instances.

func (*DatabaseFlags) MarshalJSON Uses

func (s *DatabaseFlags) MarshalJSON() ([]byte, error)

type DatabaseInstance Uses

type DatabaseInstance struct {
    // BackendType: <code>FIRST_GEN</code>: First Generation instance. MySQL
    // only. <br
    // /><code>SECOND_GEN</code>: Second Generation instance or
    // PostgreSQL
    // instance. <br /><code>EXTERNAL</code>: A database server that is
    // not
    // managed by Google. <br>This property is read-only; use
    // the
    // <code>tier</code> property in the <code>settings</code> object to
    // determine
    // the database type and Second or First Generation.
    //
    // Possible values:
    //   "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type
    // for instance.
    //   "FIRST_GEN" - V1 speckle instance.
    //   "SECOND_GEN" - V2 speckle instance.
    //   "EXTERNAL" - On premises instance.
    BackendType string `json:"backendType,omitempty"`

    // ConnectionName: Connection name of the Cloud SQL instance used in
    // connection strings.
    ConnectionName string `json:"connectionName,omitempty"`

    // CurrentDiskSize: The current disk usage of the instance in bytes.
    // This property has been
    // deprecated. Users should use
    // the
    // "cloudsql.googleapis.com/database/disk/bytes_used" metric in
    // Cloud
    // Monitoring API instead. Please see
    // <a
    // href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7
    // -F9EBhT0/BtvFtdFeAgAJ">this
    // announcement</a> for details.
    CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"`

    // DatabaseVersion: The database engine type and version. The
    // <code>databaseVersion</code>
    // field can not be changed after instance creation.  MySQL Second
    // Generation
    // instances: <code>MYSQL_5_7</code> (default) or
    // <code>MYSQL_5_6</code>.
    // PostgreSQL instances: <code>POSTGRES_9_6</code> (default)
    // or
    // <code>POSTGRES_11 Beta</code> MySQL First Generation
    // instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code>
    //
    // Possible values:
    //   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
    // version.
    //   "MYSQL_5_1" - The database version is MySQL 5.1.
    //   "MYSQL_5_5" - The database version is MySQL 5.5.
    //   "MYSQL_5_6" - The database version is MySQL 5.6.
    //   "MYSQL_5_7" - The database version is MySQL 5.7.
    //   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
    //   "POSTGRES_11" - The database version is PostgreSQL 11.
    //   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
    // Standard.
    //   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
    // 2017 Enterprise.
    //   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
    // Express.
    //   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
    //   "POSTGRES_10" - The database version is PostgreSQL 10.
    //   "POSTGRES_12" - The database version is PostgreSQL 12.
    DatabaseVersion string `json:"databaseVersion,omitempty"`

    // DiskEncryptionConfiguration: Disk encryption configuration specific
    // to an instance.
    // Applies only to Second Generation instances.
    DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`

    // DiskEncryptionStatus: Disk encryption status specific to an
    // instance.
    // Applies only to Second Generation instances.
    DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`

    // Etag: This field is deprecated and will be removed from a future
    // version of the
    // API. Use the <code>settings.settingsVersion</code> field instead.
    Etag string `json:"etag,omitempty"`

    // FailoverReplica: The name and status of the failover replica. This
    // property is applicable
    // only to Second Generation instances.
    FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"`

    // GceZone: The Compute Engine zone that the instance is currently
    // serving from. This
    // value could be different from the zone that was specified when the
    // instance
    // was created if the instance has failed over to its secondary zone.
    GceZone string `json:"gceZone,omitempty"`

    // InstanceType: The instance type. This can be one of the
    // following.
    // <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is
    // not
    // replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>:
    // An
    // instance running on the
    // customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud
    // SQL
    // instance configured as a read-replica.
    //
    // Possible values:
    //   "SQL_INSTANCE_TYPE_UNSPECIFIED" - This is an unknown Cloud SQL
    // instance type.
    //   "CLOUD_SQL_INSTANCE" - A regular Cloud SQL instance.
    //   "ON_PREMISES_INSTANCE" - An instance running on the customer's
    // premises that is not managed by
    // Cloud SQL.
    //   "READ_REPLICA_INSTANCE" - A Cloud SQL instance acting as a
    // read-replica.
    InstanceType string `json:"instanceType,omitempty"`

    // IpAddresses: The assigned IP addresses for the instance.
    IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`

    // Ipv6Address: The IPv6 address assigned to the instance. This property
    // is applicable only
    // to First Generation instances.
    Ipv6Address string `json:"ipv6Address,omitempty"`

    // Kind: This is always <code>sql#instance</code>.
    Kind string `json:"kind,omitempty"`

    // MasterInstanceName: The name of the instance which will act as master
    // in the replication setup.
    MasterInstanceName string `json:"masterInstanceName,omitempty"`

    // MaxDiskSize: The maximum disk size of the instance in bytes.
    MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"`

    // Name: Name of the Cloud SQL instance. This does not include the
    // project ID.
    Name string `json:"name,omitempty"`

    // OnPremisesConfiguration: Configuration specific to on-premises
    // instances.
    OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"`

    // Project: The project ID of the project containing the Cloud SQL
    // instance. The Google
    // apps domain is prefixed if applicable.
    Project string `json:"project,omitempty"`

    // Region: The geographical region. Can be
    // <code>us-central</code>
    // (<code>FIRST_GEN</code> instances only),
    // <code>us-central1</code>
    // (<code>SECOND_GEN</code> instances only), <code>asia-east1</code>
    // or
    // <code>europe-west1</code>. Defaults to <code>us-central</code>
    // or
    // <code>us-central1</code> depending on the instance type (First
    // Generation
    // or Second Generation). The region can not be changed after
    // instance
    // creation.
    Region string `json:"region,omitempty"`

    // ReplicaConfiguration: Configuration specific to failover replicas and
    // read replicas.
    ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"`

    // ReplicaNames: The replicas of the instance.
    ReplicaNames []string `json:"replicaNames,omitempty"`

    // RootPassword: Initial root password. Use only on creation.
    RootPassword string `json:"rootPassword,omitempty"`

    // ScheduledMaintenance: The start time of any upcoming scheduled
    // maintenance for this instance.
    ScheduledMaintenance *SqlScheduledMaintenance `json:"scheduledMaintenance,omitempty"`

    // SelfLink: The URI of this resource.
    SelfLink string `json:"selfLink,omitempty"`

    // ServerCaCert: SSL configuration.
    ServerCaCert *SslCert `json:"serverCaCert,omitempty"`

    // ServiceAccountEmailAddress: The service account email address
    // assigned to the instance. This property
    // is applicable only to Second Generation instances.
    ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`

    // Settings: The user settings.
    Settings *Settings `json:"settings,omitempty"`

    // State: The current serving state of the Cloud SQL instance. This can
    // be one of the
    // following. <br><code>RUNNABLE</code>: The instance is running, or is
    // ready
    // to run when accessed. <br><code>SUSPENDED</code>: The instance is
    // not
    // available, for example due to problems with
    // billing.
    // <br><code>PENDING_CREATE</code>: The instance is being
    // created.
    // <br><code>MAINTENANCE</code>: The instance is down for
    // maintenance.
    // <br><code>FAILED</code>: The instance creation
    // failed.
    // <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown.
    //
    // Possible values:
    //   "SQL_INSTANCE_STATE_UNSPECIFIED" - The state of the instance is
    // unknown.
    //   "RUNNABLE" - The instance is running.
    //   "SUSPENDED" - The instance is currently offline, but it may run
    // again in the future.
    //   "PENDING_DELETE" - The instance is being deleted.
    //   "PENDING_CREATE" - The instance is being created.
    //   "MAINTENANCE" - The instance is down for maintenance.
    //   "FAILED" - The instance failed to be created.
    State string `json:"state,omitempty"`

    // SuspensionReason: If the instance state is SUSPENDED, the reason for
    // the suspension.
    //
    // Possible values:
    //   "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension
    // reason.
    //   "BILLING_ISSUE" - The instance is suspended due to billing issues
    // (e.g., GCP account issue)
    //   "LEGAL_ISSUE" - The instance is suspended due to illegal content
    // (e.g., child pornography,
    // copyrighted material, etc.).
    //   "OPERATIONAL_ISSUE" - The instance is causing operational issues
    // (e.g., causing the database
    // to crash).
    //   "KMS_KEY_ISSUE" - The KMS key used by the instance is either
    // revoked or denied access to
    SuspensionReason []string `json:"suspensionReason,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "BackendType") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BackendType") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DatabaseInstance: A Cloud SQL instance resource.

func (*DatabaseInstance) MarshalJSON Uses

func (s *DatabaseInstance) MarshalJSON() ([]byte, error)

type DatabaseInstanceFailoverReplica Uses

type DatabaseInstanceFailoverReplica struct {
    // Available: The availability status of the failover replica. A false
    // status indicates
    // that the failover replica is out of sync. The master can only
    // failover to
    // the failover replica when the status is true.
    Available bool `json:"available,omitempty"`

    // Name: The name of the failover replica. If specified at instance
    // creation, a
    // failover replica is created for the instance. The name
    // doesn't include the project ID. This property is applicable only
    // to
    // Second Generation instances.
    Name string `json:"name,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Available") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Available") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DatabaseInstanceFailoverReplica: The name and status of the failover replica. This property is applicable only to Second Generation instances.

func (*DatabaseInstanceFailoverReplica) MarshalJSON Uses

func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error)

type DatabasesDeleteCall Uses

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

func (*DatabasesDeleteCall) Context Uses

func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DatabasesDeleteCall) Do Uses

func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.databases.delete" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DatabasesDeleteCall) Fields Uses

func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DatabasesDeleteCall) Header Uses

func (c *DatabasesDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type DatabasesGetCall Uses

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

func (*DatabasesGetCall) Context Uses

func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DatabasesGetCall) Do Uses

func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error)

Do executes the "sql.databases.get" call. Exactly one of *Database or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Database.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DatabasesGetCall) Fields Uses

func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DatabasesGetCall) Header Uses

func (c *DatabasesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*DatabasesGetCall) IfNoneMatch Uses

func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type DatabasesInsertCall Uses

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

func (*DatabasesInsertCall) Context Uses

func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DatabasesInsertCall) Do Uses

func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.databases.insert" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DatabasesInsertCall) Fields Uses

func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DatabasesInsertCall) Header Uses

func (c *DatabasesInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type DatabasesListCall Uses

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

func (*DatabasesListCall) Context Uses

func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DatabasesListCall) Do Uses

func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error)

Do executes the "sql.databases.list" call. Exactly one of *DatabasesListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DatabasesListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DatabasesListCall) Fields Uses

func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DatabasesListCall) Header Uses

func (c *DatabasesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*DatabasesListCall) IfNoneMatch Uses

func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type DatabasesListResponse Uses

type DatabasesListResponse struct {
    // Items: List of database resources in the instance.
    Items []*Database `json:"items,omitempty"`

    // Kind: This is always <code>sql#databasesList</code>.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DatabasesListResponse: Database list response.

func (*DatabasesListResponse) MarshalJSON Uses

func (s *DatabasesListResponse) MarshalJSON() ([]byte, error)

type DatabasesPatchCall Uses

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

func (*DatabasesPatchCall) Context Uses

func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DatabasesPatchCall) Do Uses

func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.databases.patch" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DatabasesPatchCall) Fields Uses

func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DatabasesPatchCall) Header Uses

func (c *DatabasesPatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type DatabasesService Uses

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

func NewDatabasesService Uses

func NewDatabasesService(s *Service) *DatabasesService

func (*DatabasesService) Delete Uses

func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall

Delete: Deletes a database from a Cloud SQL instance.

func (*DatabasesService) Get Uses

func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall

Get: Retrieves a resource containing information about a database inside a Cloud SQL instance.

func (*DatabasesService) Insert Uses

func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall

Insert: Inserts a resource containing information about a database inside a Cloud SQL instance.

func (*DatabasesService) List Uses

func (r *DatabasesService) List(project string, instance string) *DatabasesListCall

List: Lists databases in the specified Cloud SQL instance.

func (*DatabasesService) Patch Uses

func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall

Patch: Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.

func (*DatabasesService) Update Uses

func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall

Update: Updates a resource containing information about a database inside a Cloud SQL instance.

type DatabasesUpdateCall Uses

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

func (*DatabasesUpdateCall) Context Uses

func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DatabasesUpdateCall) Do Uses

func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.databases.update" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DatabasesUpdateCall) Fields Uses

func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DatabasesUpdateCall) Header Uses

func (c *DatabasesUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type DemoteMasterConfiguration Uses

type DemoteMasterConfiguration struct {
    // Kind: This is always <code>sql#demoteMasterConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // MysqlReplicaConfiguration: MySQL specific configuration when
    // replicating from a MySQL on-premises
    // master. Replication configuration information such as the
    // username,
    // password, certificates, and keys are not stored in the instance
    // metadata.
    // The configuration information is used only to set up the
    // replication
    // connection and is stored by MySQL in a file named
    // <code>master.info</code>
    // in the data directory.
    MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DemoteMasterConfiguration: Read-replica configuration for connecting to the on-premises master.

func (*DemoteMasterConfiguration) MarshalJSON Uses

func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error)

type DemoteMasterContext Uses

type DemoteMasterContext struct {
    // Kind: This is always <code>sql#demoteMasterContext</code>.
    Kind string `json:"kind,omitempty"`

    // MasterInstanceName: The name of the instance which will act as
    // on-premises master in the
    // replication setup.
    MasterInstanceName string `json:"masterInstanceName,omitempty"`

    // ReplicaConfiguration: Configuration specific to read-replicas
    // replicating from the on-premises
    // master.
    ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"`

    // VerifyGtidConsistency: Verify GTID consistency for demote operation.
    // Default value:
    // <code>True</code>. Second Generation instances only.  Setting this
    // flag to
    // false enables you to bypass GTID consistency check between
    // on-premises
    // master and Cloud SQL instance during the demotion operation but
    // also
    // exposes you to the risk of future replication failures. Change the
    // value
    // only if you know the reason for the GTID divergence and are confident
    // that
    // doing so will not cause any replication issues.
    VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DemoteMasterContext: Database instance demote master context.

func (*DemoteMasterContext) MarshalJSON Uses

func (s *DemoteMasterContext) MarshalJSON() ([]byte, error)

type DemoteMasterMySqlReplicaConfiguration Uses

type DemoteMasterMySqlReplicaConfiguration struct {
    // CaCertificate: PEM representation of the trusted CA's x509
    // certificate.
    CaCertificate string `json:"caCertificate,omitempty"`

    // ClientCertificate: PEM representation of the slave's x509
    // certificate.
    ClientCertificate string `json:"clientCertificate,omitempty"`

    // ClientKey: PEM representation of the slave's private key. The
    // corresponsing public key
    // is encoded in the client's certificate. The format of the slave's
    // private
    // key can be either PKCS #1 or PKCS #8.
    ClientKey string `json:"clientKey,omitempty"`

    // Kind: This is always
    // <code>sql#demoteMasterMysqlReplicaConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // Password: The password for the replication connection.
    Password string `json:"password,omitempty"`

    // Username: The username for the replication connection.
    Username string `json:"username,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CaCertificate") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CaCertificate") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DemoteMasterMySqlReplicaConfiguration: Read-replica configuration specific to MySQL databases.

func (*DemoteMasterMySqlReplicaConfiguration) MarshalJSON Uses

func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error)

type DiskEncryptionConfiguration Uses

type DiskEncryptionConfiguration struct {
    // Kind: This is always <code>sql#diskEncryptionConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // KmsKeyName: Resource name of KMS key for disk encryption
    KmsKeyName string `json:"kmsKeyName,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DiskEncryptionConfiguration: Disk encryption configuration for an instance.

func (*DiskEncryptionConfiguration) MarshalJSON Uses

func (s *DiskEncryptionConfiguration) MarshalJSON() ([]byte, error)

type DiskEncryptionStatus Uses

type DiskEncryptionStatus struct {
    // Kind: This is always <code>sql#diskEncryptionStatus</code>.
    Kind string `json:"kind,omitempty"`

    // KmsKeyVersionName: KMS key version used to encrypt the Cloud SQL
    // instance resource
    KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

DiskEncryptionStatus: Disk encryption status for an instance.

func (*DiskEncryptionStatus) MarshalJSON Uses

func (s *DiskEncryptionStatus) MarshalJSON() ([]byte, error)

type ExportContext Uses

type ExportContext struct {
    // CsvExportOptions: Options for exporting data as CSV.
    CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"`

    // Databases: Databases to be exported. <br /> <b>MySQL instances:</b>
    // If
    // <code>fileType</code> is <code>SQL</code> and no database is
    // specified, all
    // databases are exported, except for the <code>mysql</code> system
    // database.
    // If <code>fileType</code> is <code>CSV</code>, you can specify one
    // database,
    // either by using this property or by using
    // the
    // <code>csvExportOptions.selectQuery</code> property, which takes
    // precedence
    // over this property. <br /> <b>PostgreSQL instances:</b> You must
    // specify
    // one database to be exported. If <code>fileType</code> is
    // <code>CSV</code>,
    // this database must match the one specified in
    // the
    // <code>csvExportOptions.selectQuery</code> property.
    Databases []string `json:"databases,omitempty"`

    // FileType: The file type for the specified uri. <br><code>SQL</code>:
    // The file
    // contains SQL statements. <br><code>CSV</code>: The file contains CSV
    // data.
    //
    // Possible values:
    //   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
    //   "SQL" - File containing SQL statements.
    //   "CSV" - File in CSV format.
    //   "BAK"
    FileType string `json:"fileType,omitempty"`

    // Kind: This is always <code>sql#exportContext</code>.
    Kind string `json:"kind,omitempty"`

    // SqlExportOptions: Options for exporting data as SQL statements.
    SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"`

    // Uri: The path to the file in Google Cloud Storage where the export
    // will be
    // stored. The URI is in the form
    // <code>gs:
    // //bucketName/fileName</code>. If the file already exists, the
    // requests
    // // succeeds, but the operation fails. If <code>fileType</code> is
    // // <code>SQL</code> and the filename ends with .gz, the contents
    // are
    // // compressed.
    Uri string `json:"uri,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CsvExportOptions") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CsvExportOptions") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

ExportContext: Database instance export context.

func (*ExportContext) MarshalJSON Uses

func (s *ExportContext) MarshalJSON() ([]byte, error)

type ExportContextCsvExportOptions Uses

type ExportContextCsvExportOptions struct {
    // SelectQuery: The select query used to extract the data.
    SelectQuery string `json:"selectQuery,omitempty"`

    // ForceSendFields is a list of field names (e.g. "SelectQuery") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "SelectQuery") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

ExportContextCsvExportOptions: Options for exporting data as CSV.

func (*ExportContextCsvExportOptions) MarshalJSON Uses

func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error)

type ExportContextSqlExportOptions Uses

type ExportContextSqlExportOptions struct {
    // MysqlExportOptions: Options for exporting from MySQL.
    MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"`

    // SchemaOnly: Export only schemas.
    SchemaOnly bool `json:"schemaOnly,omitempty"`

    // Tables: Tables to export, or that were exported, from the specified
    // database. If
    // you specify tables, specify one and only one database. For
    // PostgreSQL
    // instances, you can specify only one table.
    Tables []string `json:"tables,omitempty"`

    // ForceSendFields is a list of field names (e.g. "MysqlExportOptions")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "MysqlExportOptions") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

ExportContextSqlExportOptions: Options for exporting data as SQL statements.

func (*ExportContextSqlExportOptions) MarshalJSON Uses

func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error)

type ExportContextSqlExportOptionsMysqlExportOptions Uses

type ExportContextSqlExportOptionsMysqlExportOptions struct {
    // MasterData: Option to include SQL statement required to set up
    // replication.
    // If set to <code>1</code>, the dump file includes
    //  a CHANGE MASTER TO statement with the binary log coordinates.
    // If set to <code>2</code>, the CHANGE MASTER TO statement is written
    // as
    //  a SQL comment, and has no effect.
    // All other values are ignored.
    MasterData int64 `json:"masterData,omitempty"`

    // ForceSendFields is a list of field names (e.g. "MasterData") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "MasterData") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

ExportContextSqlExportOptionsMysqlExportOptions: Options for exporting from MySQL.

func (*ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON Uses

func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error)

type FailoverContext Uses

type FailoverContext struct {
    // Kind: This is always <code>sql#failoverContext</code>.
    Kind string `json:"kind,omitempty"`

    // SettingsVersion: The current settings version of this instance.
    // Request will be rejected if
    // this version doesn't match the current settings version.
    SettingsVersion int64 `json:"settingsVersion,omitempty,string"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

FailoverContext: Database instance failover context.

func (*FailoverContext) MarshalJSON Uses

func (s *FailoverContext) MarshalJSON() ([]byte, error)

type Flag Uses

type Flag struct {
    // AllowedIntValues: Use this field if only certain integers are
    // accepted. Can be combined
    // with min_value and max_value to add additional values.
    AllowedIntValues googleapi.Int64s `json:"allowedIntValues,omitempty"`

    // AllowedStringValues: For <code>STRING</code> flags, a list of strings
    // that the value can be set
    // to.
    AllowedStringValues []string `json:"allowedStringValues,omitempty"`

    // AppliesTo: The database version this flag applies to. Can be
    // <code>MYSQL_5_5</code>,
    // <code>MYSQL_5_6</code>, or <code>MYSQL_5_7</code>.
    // <code>MYSQL_5_7</code>
    // is applicable only to Second Generation instances.
    //
    // Possible values:
    //   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
    // version.
    //   "MYSQL_5_1" - The database version is MySQL 5.1.
    //   "MYSQL_5_5" - The database version is MySQL 5.5.
    //   "MYSQL_5_6" - The database version is MySQL 5.6.
    //   "MYSQL_5_7" - The database version is MySQL 5.7.
    //   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
    //   "POSTGRES_11" - The database version is PostgreSQL 11.
    //   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
    // Standard.
    //   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
    // 2017 Enterprise.
    //   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
    // Express.
    //   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
    //   "POSTGRES_10" - The database version is PostgreSQL 10.
    //   "POSTGRES_12" - The database version is PostgreSQL 12.
    AppliesTo []string `json:"appliesTo,omitempty"`

    // InBeta: Whether or not the flag is considered in beta.
    InBeta bool `json:"inBeta,omitempty"`

    // Kind: This is always <code>sql#flag</code>.
    Kind string `json:"kind,omitempty"`

    // MaxValue: For <code>INTEGER</code> flags, the maximum allowed value.
    MaxValue int64 `json:"maxValue,omitempty,string"`

    // MinValue: For <code>INTEGER</code> flags, the minimum allowed value.
    MinValue int64 `json:"minValue,omitempty,string"`

    // Name: This is the name of the flag. Flag names always use
    // underscores, not
    // hyphens, e.g. <code>max_allowed_packet</code>
    Name string `json:"name,omitempty"`

    // RequiresRestart: Indicates whether changing this flag will trigger a
    // database restart. Only
    // applicable to Second Generation instances.
    RequiresRestart bool `json:"requiresRestart,omitempty"`

    // Type: The type of the flag. Flags are typed to being
    // <code>BOOLEAN</code>,
    // <code>STRING</code>, <code>INTEGER</code> or
    // <code>NONE</code>.
    // <code>NONE</code> is used for flags which do not take a value, such
    // as
    // <code>skip_grant_tables</code>.
    //
    // Possible values:
    //   "SQL_FLAG_TYPE_UNSPECIFIED" - This is an unknown flag type.
    //   "BOOLEAN" - Boolean type flag.
    //   "STRING" - String type flag.
    //   "INTEGER" - Integer type flag.
    //   "NONE" - Flag type used for a server startup option.
    //   "MYSQL_TIMEZONE_OFFSET" - Type introduced specically for MySQL
    // TimeZone offset. Accept a string value
    // with the format [-12:59, 13:00].
    //   "FLOAT" - Float type flag.
    //   "REPEATED_STRING" - Comma-separated list of the strings in a
    // SqlFlagType enum.
    Type string `json:"type,omitempty"`

    // ForceSendFields is a list of field names (e.g. "AllowedIntValues") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "AllowedIntValues") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

Flag: A flag resource.

func (*Flag) MarshalJSON Uses

func (s *Flag) MarshalJSON() ([]byte, error)

type FlagsListCall Uses

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

func (*FlagsListCall) Context Uses

func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FlagsListCall) DatabaseVersion Uses

func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall

DatabaseVersion sets the optional parameter "databaseVersion": Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.

func (*FlagsListCall) Do Uses

func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error)

Do executes the "sql.flags.list" call. Exactly one of *FlagsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *FlagsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FlagsListCall) Fields Uses

func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*FlagsListCall) Header Uses

func (c *FlagsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*FlagsListCall) IfNoneMatch Uses

func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type FlagsListResponse Uses

type FlagsListResponse struct {
    // Items: List of flags.
    Items []*Flag `json:"items,omitempty"`

    // Kind: This is always <code>sql#flagsList</code>.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

FlagsListResponse: Flags list response.

func (*FlagsListResponse) MarshalJSON Uses

func (s *FlagsListResponse) MarshalJSON() ([]byte, error)

type FlagsService Uses

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

func NewFlagsService Uses

func NewFlagsService(s *Service) *FlagsService

func (*FlagsService) List Uses

func (r *FlagsService) List() *FlagsListCall

List: List all available database flags for Cloud SQL instances.

type ImportContext Uses

type ImportContext struct {
    // BakImportOptions: Import parameters specific to SQL Server .BAK files
    BakImportOptions *ImportContextBakImportOptions `json:"bakImportOptions,omitempty"`

    // CsvImportOptions: Options for importing data as CSV.
    CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"`

    // Database: The target database for the import. If
    // <code>fileType</code> is
    // <code>SQL</code>, this field is required only if the import file does
    // not
    // specify a database, and is overridden by any database specification
    // in the
    // import file. If <code>fileType</code> is <code>CSV</code>, one
    // database
    // must be specified.
    Database string `json:"database,omitempty"`

    // FileType: The file type for the specified uri. <br><code>SQL</code>:
    // The file
    // contains SQL statements. <br><code>CSV</code>: The file contains CSV
    // data.
    //
    // Possible values:
    //   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
    //   "SQL" - File containing SQL statements.
    //   "CSV" - File in CSV format.
    //   "BAK"
    FileType string `json:"fileType,omitempty"`

    // ImportUser: The PostgreSQL user for this import operation. PostgreSQL
    // instances only.
    ImportUser string `json:"importUser,omitempty"`

    // Kind: This is always <code>sql#importContext</code>.
    Kind string `json:"kind,omitempty"`

    // Uri: Path to the import file in Cloud Storage, in the
    // form
    // <code>gs:
    // //bucketName/fileName</code>. Compressed gzip files (.gz) are
    // supported
    // // when <code>fileType</code> is <code>SQL</code>. The instance must
    // have
    // // write permissions to the bucket and read access to the file.
    Uri string `json:"uri,omitempty"`

    // ForceSendFields is a list of field names (e.g. "BakImportOptions") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BakImportOptions") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

ImportContext: Database instance import context.

func (*ImportContext) MarshalJSON Uses

func (s *ImportContext) MarshalJSON() ([]byte, error)

type ImportContextBakImportOptions Uses

type ImportContextBakImportOptions struct {
    EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"`

    // ForceSendFields is a list of field names (e.g. "EncryptionOptions")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "EncryptionOptions") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

ImportContextBakImportOptions: Import parameters specific to SQL Server .BAK files

func (*ImportContextBakImportOptions) MarshalJSON Uses

func (s *ImportContextBakImportOptions) MarshalJSON() ([]byte, error)

type ImportContextBakImportOptionsEncryptionOptions Uses

type ImportContextBakImportOptionsEncryptionOptions struct {
    // CertPath: Path to the Certificate (.cer) in Cloud Storage, in the
    // form
    // <code>gs://bucketName/fileName</code>. The instance must have
    // write permissions to the bucket and read access to the file.
    CertPath string `json:"certPath,omitempty"`

    // PvkPassword: Password that encrypts the private key
    PvkPassword string `json:"pvkPassword,omitempty"`

    // PvkPath: Path to the Certificate Private Key (.pvk)  in Cloud
    // Storage, in the
    // form <code>gs://bucketName/fileName</code>. The instance must
    // have
    // write permissions to the bucket and read access to the file.
    PvkPath string `json:"pvkPath,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CertPath") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CertPath") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*ImportContextBakImportOptionsEncryptionOptions) MarshalJSON Uses

func (s *ImportContextBakImportOptionsEncryptionOptions) MarshalJSON() ([]byte, error)

type ImportContextCsvImportOptions Uses

type ImportContextCsvImportOptions struct {
    // Columns: The columns to which CSV data is imported. If not specified,
    // all columns
    // of the database table are loaded with CSV data.
    Columns []string `json:"columns,omitempty"`

    // Table: The table to which CSV data is imported.
    Table string `json:"table,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Columns") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Columns") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

ImportContextCsvImportOptions: Options for importing data as CSV.

func (*ImportContextCsvImportOptions) MarshalJSON Uses

func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error)

type InstancesAddServerCaCall Uses

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

func (*InstancesAddServerCaCall) Context Uses

func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesAddServerCaCall) Do Uses

func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.addServerCa" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesAddServerCaCall) Fields Uses

func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesAddServerCaCall) Header Uses

func (c *InstancesAddServerCaCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesCloneCall Uses

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

func (*InstancesCloneCall) Context Uses

func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesCloneCall) Do Uses

func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.clone" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesCloneCall) Fields Uses

func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesCloneCall) Header Uses

func (c *InstancesCloneCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesCloneRequest Uses

type InstancesCloneRequest struct {
    // CloneContext: Contains details about the clone operation.
    CloneContext *CloneContext `json:"cloneContext,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CloneContext") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CloneContext") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

InstancesCloneRequest: Database instance clone request.

func (*InstancesCloneRequest) MarshalJSON Uses

func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error)

type InstancesDeleteCall Uses

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

func (*InstancesDeleteCall) Context Uses

func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesDeleteCall) Do Uses

func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.delete" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesDeleteCall) Fields Uses

func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesDeleteCall) Header Uses

func (c *InstancesDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesDemoteMasterCall Uses

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

func (*InstancesDemoteMasterCall) Context Uses

func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesDemoteMasterCall) Do Uses

func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.demoteMaster" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesDemoteMasterCall) Fields Uses

func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesDemoteMasterCall) Header Uses

func (c *InstancesDemoteMasterCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesDemoteMasterRequest Uses

type InstancesDemoteMasterRequest struct {
    // DemoteMasterContext: Contains details about the demoteMaster
    // operation.
    DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"`

    // ForceSendFields is a list of field names (e.g. "DemoteMasterContext")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "DemoteMasterContext") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

InstancesDemoteMasterRequest: Database demote master request.

func (*InstancesDemoteMasterRequest) MarshalJSON Uses

func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error)

type InstancesExportCall Uses

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

func (*InstancesExportCall) Context Uses

func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesExportCall) Do Uses

func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.export" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesExportCall) Fields Uses

func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesExportCall) Header Uses

func (c *InstancesExportCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesExportRequest Uses

type InstancesExportRequest struct {
    // ExportContext: Contains details about the export operation.
    ExportContext *ExportContext `json:"exportContext,omitempty"`

    // ForceSendFields is a list of field names (e.g. "ExportContext") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ExportContext") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

InstancesExportRequest: Database instance export request.

func (*InstancesExportRequest) MarshalJSON Uses

func (s *InstancesExportRequest) MarshalJSON() ([]byte, error)

type InstancesFailoverCall Uses

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

func (*InstancesFailoverCall) Context Uses

func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesFailoverCall) Do Uses

func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.failover" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesFailoverCall) Fields Uses

func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesFailoverCall) Header Uses

func (c *InstancesFailoverCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesFailoverRequest Uses

type InstancesFailoverRequest struct {
    // FailoverContext: Failover Context.
    FailoverContext *FailoverContext `json:"failoverContext,omitempty"`

    // ForceSendFields is a list of field names (e.g. "FailoverContext") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "FailoverContext") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

InstancesFailoverRequest: Instance failover request.

func (*InstancesFailoverRequest) MarshalJSON Uses

func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error)

type InstancesGetCall Uses

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

func (*InstancesGetCall) Context Uses

func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesGetCall) Do Uses

func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error)

Do executes the "sql.instances.get" call. Exactly one of *DatabaseInstance or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DatabaseInstance.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesGetCall) Fields Uses

func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesGetCall) Header Uses

func (c *InstancesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*InstancesGetCall) IfNoneMatch Uses

func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type InstancesImportCall Uses

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

func (*InstancesImportCall) Context Uses

func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesImportCall) Do Uses

func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.import" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesImportCall) Fields Uses

func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesImportCall) Header Uses

func (c *InstancesImportCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesImportRequest Uses

type InstancesImportRequest struct {
    // ImportContext: Contains details about the import operation.
    ImportContext *ImportContext `json:"importContext,omitempty"`

    // ForceSendFields is a list of field names (e.g. "ImportContext") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ImportContext") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

InstancesImportRequest: Database instance import request.

func (*InstancesImportRequest) MarshalJSON Uses

func (s *InstancesImportRequest) MarshalJSON() ([]byte, error)

type InstancesInsertCall Uses

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

func (*InstancesInsertCall) Context Uses

func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesInsertCall) Do Uses

func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.insert" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesInsertCall) Fields Uses

func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesInsertCall) Header Uses

func (c *InstancesInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesListCall Uses

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

func (*InstancesListCall) Context Uses

func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesListCall) Do Uses

func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error)

Do executes the "sql.instances.list" call. Exactly one of *InstancesListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *InstancesListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesListCall) Fields Uses

func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesListCall) Filter Uses

func (c *InstancesListCall) Filter(filter string) *InstancesListCall

Filter sets the optional parameter "filter": A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'.

Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.

func (*InstancesListCall) Header Uses

func (c *InstancesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*InstancesListCall) IfNoneMatch Uses

func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*InstancesListCall) MaxResults Uses

func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall

MaxResults sets the optional parameter "maxResults": The maximum number of results to return per response.

func (*InstancesListCall) PageToken Uses

func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall

PageToken sets the optional parameter "pageToken": A previously-returned page token representing part of the larger set of results to view.

func (*InstancesListCall) Pages Uses

func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type InstancesListResponse Uses

type InstancesListResponse struct {
    // Items: List of database instance resources.
    Items []*DatabaseInstance `json:"items,omitempty"`

    // Kind: This is always <code>sql#instancesList</code>.
    Kind string `json:"kind,omitempty"`

    // NextPageToken: The continuation token, used to page through large
    // result sets. Provide
    // this value in a subsequent request to return the next page of
    // results.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // Warnings: List of warnings that occurred while handling the request.
    Warnings []*ApiWarning `json:"warnings,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

InstancesListResponse: Database instances list response.

func (*InstancesListResponse) MarshalJSON Uses

func (s *InstancesListResponse) MarshalJSON() ([]byte, error)

type InstancesListServerCasCall Uses

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

func (*InstancesListServerCasCall) Context Uses

func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesListServerCasCall) Do Uses

func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error)

Do executes the "sql.instances.listServerCas" call. Exactly one of *InstancesListServerCasResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *InstancesListServerCasResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesListServerCasCall) Fields Uses

func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesListServerCasCall) Header Uses

func (c *InstancesListServerCasCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*InstancesListServerCasCall) IfNoneMatch Uses

func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type InstancesListServerCasResponse Uses

type InstancesListServerCasResponse struct {
    ActiveVersion string `json:"activeVersion,omitempty"`

    // Certs: List of server CA certificates for the instance.
    Certs []*SslCert `json:"certs,omitempty"`

    // Kind: This is always <code>sql#instancesListServerCas</code>.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "ActiveVersion") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ActiveVersion") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

InstancesListServerCasResponse: Instances ListServerCas response.

func (*InstancesListServerCasResponse) MarshalJSON Uses

func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error)

type InstancesPatchCall Uses

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

func (*InstancesPatchCall) Context Uses

func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesPatchCall) Do Uses

func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.patch" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesPatchCall) Fields Uses

func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesPatchCall) Header Uses

func (c *InstancesPatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesPromoteReplicaCall Uses

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

func (*InstancesPromoteReplicaCall) Context Uses

func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesPromoteReplicaCall) Do Uses

func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.promoteReplica" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesPromoteReplicaCall) Fields Uses

func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesPromoteReplicaCall) Header Uses

func (c *InstancesPromoteReplicaCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesResetSslConfigCall Uses

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

func (*InstancesResetSslConfigCall) Context Uses

func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesResetSslConfigCall) Do Uses

func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.resetSslConfig" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesResetSslConfigCall) Fields Uses

func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesResetSslConfigCall) Header Uses

func (c *InstancesResetSslConfigCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesRestartCall Uses

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

func (*InstancesRestartCall) Context Uses

func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesRestartCall) Do Uses

func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.restart" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesRestartCall) Fields Uses

func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesRestartCall) Header Uses

func (c *InstancesRestartCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesRestoreBackupCall Uses

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

func (*InstancesRestoreBackupCall) Context Uses

func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesRestoreBackupCall) Do Uses

func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.restoreBackup" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesRestoreBackupCall) Fields Uses

func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesRestoreBackupCall) Header Uses

func (c *InstancesRestoreBackupCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesRestoreBackupRequest Uses

type InstancesRestoreBackupRequest struct {
    // RestoreBackupContext: Parameters required to perform the restore
    // backup operation.
    RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"`

    // ForceSendFields is a list of field names (e.g.
    // "RestoreBackupContext") to unconditionally include in API requests.
    // By default, fields with empty values are omitted from API requests.
    // However, any non-pointer, non-interface field appearing in
    // ForceSendFields will be sent to the server regardless of whether the
    // field is empty or not. This may be used to include empty fields in
    // Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "RestoreBackupContext") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

InstancesRestoreBackupRequest: Database instance restore backup request.

func (*InstancesRestoreBackupRequest) MarshalJSON Uses

func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error)

type InstancesRotateServerCaCall Uses

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

func (*InstancesRotateServerCaCall) Context Uses

func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesRotateServerCaCall) Do Uses

func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.rotateServerCa" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesRotateServerCaCall) Fields Uses

func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesRotateServerCaCall) Header Uses

func (c *InstancesRotateServerCaCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesRotateServerCaRequest Uses

type InstancesRotateServerCaRequest struct {
    // RotateServerCaContext: Contains details about the rotate server CA
    // operation.
    RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"`

    // ForceSendFields is a list of field names (e.g.
    // "RotateServerCaContext") to unconditionally include in API requests.
    // By default, fields with empty values are omitted from API requests.
    // However, any non-pointer, non-interface field appearing in
    // ForceSendFields will be sent to the server regardless of whether the
    // field is empty or not. This may be used to include empty fields in
    // Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "RotateServerCaContext") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

InstancesRotateServerCaRequest: Rotate Server CA request.

func (*InstancesRotateServerCaRequest) MarshalJSON Uses

func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error)

type InstancesService Uses

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

func NewInstancesService Uses

func NewInstancesService(s *Service) *InstancesService

func (*InstancesService) AddServerCa Uses

func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall

AddServerCa: Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.

func (*InstancesService) Clone Uses

func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall

Clone: Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.

func (*InstancesService) Delete Uses

func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall

Delete: Deletes a Cloud SQL instance.

func (*InstancesService) DemoteMaster Uses

func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall

DemoteMaster: Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.

func (*InstancesService) Export Uses

func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall

Export: Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.

func (*InstancesService) Failover Uses

func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall

Failover: Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.

func (*InstancesService) Get Uses

func (r *InstancesService) Get(project string, instance string) *InstancesGetCall

Get: Retrieves a resource containing information about a Cloud SQL instance.

func (*InstancesService) Import Uses

func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall

Import: Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.

func (*InstancesService) Insert Uses

func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall

Insert: Creates a new Cloud SQL instance.

func (*InstancesService) List Uses

func (r *InstancesService) List(project string) *InstancesListCall

List: Lists instances under a given project.

func (*InstancesService) ListServerCas Uses

func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall

ListServerCas: Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.

func (*InstancesService) Patch Uses

func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall

Patch: Updates settings of a Cloud SQL instance. This method supports patch semantics.

func (*InstancesService) PromoteReplica Uses

func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall

PromoteReplica: Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.

func (*InstancesService) ResetSslConfig Uses

func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall

ResetSslConfig: Deletes all client certificates and generates a new server SSL certificate for the instance.

func (*InstancesService) Restart Uses

func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall

Restart: Restarts a Cloud SQL instance.

func (*InstancesService) RestoreBackup Uses

func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall

RestoreBackup: Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.

func (*InstancesService) RotateServerCa Uses

func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall

RotateServerCa: Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.

func (*InstancesService) StartReplica Uses

func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall

StartReplica: Starts the replication in the read replica instance.

func (*InstancesService) StopReplica Uses

func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall

StopReplica: Stops the replication in the read replica instance.

func (*InstancesService) TruncateLog Uses

func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall

TruncateLog: Truncate MySQL general and slow query log tables

func (*InstancesService) Update Uses

func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall

Update: Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.

type InstancesStartReplicaCall Uses

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

func (*InstancesStartReplicaCall) Context Uses

func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesStartReplicaCall) Do Uses

func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.startReplica" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesStartReplicaCall) Fields Uses

func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesStartReplicaCall) Header Uses

func (c *InstancesStartReplicaCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesStopReplicaCall Uses

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

func (*InstancesStopReplicaCall) Context Uses

func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesStopReplicaCall) Do Uses

func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.stopReplica" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesStopReplicaCall) Fields Uses

func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesStopReplicaCall) Header Uses

func (c *InstancesStopReplicaCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesTruncateLogCall Uses

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

func (*InstancesTruncateLogCall) Context Uses

func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesTruncateLogCall) Do Uses

func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.truncateLog" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesTruncateLogCall) Fields Uses

func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesTruncateLogCall) Header Uses

func (c *InstancesTruncateLogCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type InstancesTruncateLogRequest Uses

type InstancesTruncateLogRequest struct {
    // TruncateLogContext: Contains details about the truncate log
    // operation.
    TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"`

    // ForceSendFields is a list of field names (e.g. "TruncateLogContext")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "TruncateLogContext") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

InstancesTruncateLogRequest: Instance truncate log request.

func (*InstancesTruncateLogRequest) MarshalJSON Uses

func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error)

type InstancesUpdateCall Uses

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

func (*InstancesUpdateCall) Context Uses

func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstancesUpdateCall) Do Uses

func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.instances.update" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstancesUpdateCall) Fields Uses

func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstancesUpdateCall) Header Uses

func (c *InstancesUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type IpConfiguration Uses

type IpConfiguration struct {
    // AuthorizedNetworks: The list of external networks that are allowed to
    // connect to the instance
    // using the IP. In
    // <a
    // href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CID
    // R
    // notation</a>, also known as 'slash' notation
    // (e.g.
    // <code>192.168.100.0/24</code>).
    AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"`

    // Ipv4Enabled: Whether the instance should be assigned an IP address or
    // not.
    Ipv4Enabled bool `json:"ipv4Enabled,omitempty"`

    // PrivateNetwork: The resource link for the VPC network from which the
    // Cloud SQL instance is
    // accessible for private IP. For
    // example,
    // <code>/projects/myProject/global/networks/default</code>. This
    // setting can
    // be updated, but it cannot be removed after it is set.
    PrivateNetwork string `json:"privateNetwork,omitempty"`

    // RequireSsl: Whether SSL connections over IP should be enforced or
    // not.
    RequireSsl bool `json:"requireSsl,omitempty"`

    // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "AuthorizedNetworks") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

IpConfiguration: IP Management configuration.

func (*IpConfiguration) MarshalJSON Uses

func (s *IpConfiguration) MarshalJSON() ([]byte, error)

type IpMapping Uses

type IpMapping struct {
    // IpAddress: The IP address assigned.
    IpAddress string `json:"ipAddress,omitempty"`

    // TimeToRetire: The due time for this IP to be retired in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>. This field is only available
    // when
    // the IP is scheduled to be retired.
    TimeToRetire string `json:"timeToRetire,omitempty"`

    // Type: The type of this IP address. A <code>PRIMARY</code> address is
    // a public
    // address that can accept incoming connections. A
    // <code>PRIVATE</code>
    // address is a private address that can accept incoming connections.
    // An
    // <code>OUTGOING</code> address is the source address of
    // connections
    // originating from the instance, if supported.
    //
    // Possible values:
    //   "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" - This is an unknown IP address
    // type.
    //   "PRIMARY" - IP address the customer is supposed to connect to.
    // Usually this is the
    // load balancer's IP address
    //   "OUTGOING" - Source IP address of the connection a read replica
    // establishes to its
    // external master. This IP address can be whitelisted by the
    // customer
    // in case it has a firewall that filters incoming connection to its
    // on premises master.
    //   "PRIVATE" - Private IP used when using private IPs and network
    // peering.
    //   "MIGRATED_1ST_GEN" - V1 IP of a migrated instance. We want the user
    // to
    // decommission this IP as soon as the migration is complete.
    // Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
    Type string `json:"type,omitempty"`

    // ForceSendFields is a list of field names (e.g. "IpAddress") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "IpAddress") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

IpMapping: Database instance IP Mapping.

func (*IpMapping) MarshalJSON Uses

func (s *IpMapping) MarshalJSON() ([]byte, error)

type LocationPreference Uses

type LocationPreference struct {
    // FollowGaeApplication: The AppEngine application to follow, it must be
    // in the same region as the
    // Cloud SQL instance.
    FollowGaeApplication string `json:"followGaeApplication,omitempty"`

    // Kind: This is always <code>sql#locationPreference</code>.
    Kind string `json:"kind,omitempty"`

    // Zone: The preferred Compute Engine zone (e.g. us-central1-a,
    // us-central1-b,
    // etc.).
    Zone string `json:"zone,omitempty"`

    // ForceSendFields is a list of field names (e.g.
    // "FollowGaeApplication") to unconditionally include in API requests.
    // By default, fields with empty values are omitted from API requests.
    // However, any non-pointer, non-interface field appearing in
    // ForceSendFields will be sent to the server regardless of whether the
    // field is empty or not. This may be used to include empty fields in
    // Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "FollowGaeApplication") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

LocationPreference: Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.

func (*LocationPreference) MarshalJSON Uses

func (s *LocationPreference) MarshalJSON() ([]byte, error)

type MaintenanceWindow Uses

type MaintenanceWindow struct {
    // Day: day of week (1-7), starting on Monday.
    Day int64 `json:"day,omitempty"`

    // Hour: hour of day - 0 to 23.
    Hour int64 `json:"hour,omitempty"`

    // Kind: This is always <code>sql#maintenanceWindow</code>.
    Kind string `json:"kind,omitempty"`

    // UpdateTrack: Maintenance timing setting: <code>canary</code>
    // (Earlier) or
    // <code>stable</code> (Later). <br
    // /><a
    // href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndg
    // en">
    // Learn more</a>.
    //
    // Possible values:
    //   "SQL_UPDATE_TRACK_UNSPECIFIED" - This is an unknown maintenance
    // timing preference.
    //   "canary" - For instance update that requires a restart, this update
    // track indicates
    // your instance prefer to restart for new version early in
    // maintenance
    // window.
    //   "stable" - For instance update that requires a restart, this update
    // track indicates
    // your instance prefer to let Cloud SQL choose the timing of restart
    // (within
    // its Maintenance window, if applicable).
    UpdateTrack string `json:"updateTrack,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Day") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Day") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

MaintenanceWindow: Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance purposes.

func (*MaintenanceWindow) MarshalJSON Uses

func (s *MaintenanceWindow) MarshalJSON() ([]byte, error)

type MySqlReplicaConfiguration Uses

type MySqlReplicaConfiguration struct {
    // CaCertificate: PEM representation of the trusted CA's x509
    // certificate.
    CaCertificate string `json:"caCertificate,omitempty"`

    // ClientCertificate: PEM representation of the slave's x509
    // certificate.
    ClientCertificate string `json:"clientCertificate,omitempty"`

    // ClientKey: PEM representation of the slave's private key. The
    // corresponsing public key
    // is encoded in the client's certificate.
    ClientKey string `json:"clientKey,omitempty"`

    // ConnectRetryInterval: Seconds to wait between connect retries.
    // MySQL's default is 60 seconds.
    ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"`

    // DumpFilePath: Path to a SQL dump file in Google Cloud Storage from
    // which the slave
    // instance is to be created. The URI is in the form
    // gs:
    // //bucketName/fileName. Compressed gzip files (.gz) are also
    // supported.
    // // Dumps should have the binlog co-ordinates from which replication
    // should
    // // begin. This can be accomplished by setting --master-data to 1 when
    // using
    // // mysqldump.
    DumpFilePath string `json:"dumpFilePath,omitempty"`

    // Kind: This is always <code>sql#mysqlReplicaConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // MasterHeartbeatPeriod: Interval in milliseconds between replication
    // heartbeats.
    MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"`

    // Password: The password for the replication connection.
    Password string `json:"password,omitempty"`

    // SslCipher: A list of permissible ciphers to use for SSL encryption.
    SslCipher string `json:"sslCipher,omitempty"`

    // Username: The username for the replication connection.
    Username string `json:"username,omitempty"`

    // VerifyServerCertificate: Whether or not to check the master's Common
    // Name value in the certificate
    // that it sends during the SSL handshake.
    VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CaCertificate") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CaCertificate") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

MySqlReplicaConfiguration: Read-replica configuration specific to MySQL databases.

func (*MySqlReplicaConfiguration) MarshalJSON Uses

func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error)

type OnPremisesConfiguration Uses

type OnPremisesConfiguration struct {
    // CaCertificate: PEM representation of the trusted CA's x509
    // certificate.
    CaCertificate string `json:"caCertificate,omitempty"`

    // ClientCertificate: PEM representation of the slave's x509
    // certificate.
    ClientCertificate string `json:"clientCertificate,omitempty"`

    // ClientKey: PEM representation of the slave's private key. The
    // corresponsing public key
    // is encoded in the client's certificate.
    ClientKey string `json:"clientKey,omitempty"`

    // DumpFilePath: The dump file to create the Cloud SQL replica.
    DumpFilePath string `json:"dumpFilePath,omitempty"`

    // HostPort: The host and port of the on-premises instance in host:port
    // format
    HostPort string `json:"hostPort,omitempty"`

    // Kind: This is always <code>sql#onPremisesConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // Password: The password for connecting to on-premises instance.
    Password string `json:"password,omitempty"`

    // Username: The username for connecting to on-premises instance.
    Username string `json:"username,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CaCertificate") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CaCertificate") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

OnPremisesConfiguration: On-premises instance configuration.

func (*OnPremisesConfiguration) MarshalJSON Uses

func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error)

type Operation Uses

type Operation struct {
    // EndTime: The time this operation finished in UTC timezone in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    EndTime string `json:"endTime,omitempty"`

    // Error: If errors occurred during processing of this operation, this
    // field will be
    // populated.
    Error *OperationErrors `json:"error,omitempty"`

    // ExportContext: The context for export operation, if applicable.
    ExportContext *ExportContext `json:"exportContext,omitempty"`

    // ImportContext: The context for import operation, if applicable.
    ImportContext *ImportContext `json:"importContext,omitempty"`

    // InsertTime: The time this operation was enqueued in UTC timezone in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    InsertTime string `json:"insertTime,omitempty"`

    // Kind: This is always <code>sql#operation</code>.
    Kind string `json:"kind,omitempty"`

    // Name: An identifier that uniquely identifies the operation. You can
    // use this
    // identifier to retrieve the Operations resource that has information
    // about
    // the operation.
    Name string `json:"name,omitempty"`

    // OperationType: The type of the operation. Valid values are
    // <code>CREATE</code>,
    // <code>DELETE</code>, <code>UPDATE</code>,
    // <code>RESTART</code>,
    // <code>IMPORT</code>, <code>EXPORT</code>,
    // <code>BACKUP_VOLUME</code>,
    // <code>RESTORE_VOLUME</code>,
    // <code>CREATE_USER</code>,
    // <code>DELETE_USER</code>,
    // <code>CREATE_DATABASE</code>,
    // <code>DELETE_DATABASE</code> .
    //
    // Possible values:
    //   "SQL_OPERATION_TYPE_UNSPECIFIED" - Unknown operation type.
    //   "IMPORT" - Imports data into a Cloud SQL instance.
    //   "EXPORT" - Exports data from a Cloud SQL instance to a Cloud
    // Storage
    // bucket.
    //   "CREATE" - Creates a new Cloud SQL instance.
    //   "UPDATE" - Updates the settings of a Cloud SQL instance.
    //   "DELETE" - Deletes a Cloud SQL instance.
    //   "RESTART" - Restarts the Cloud SQL instance.
    //   "BACKUP"
    //   "SNAPSHOT"
    //   "BACKUP_VOLUME" - Performs instance backup.
    //   "DELETE_VOLUME" - Deletes an instance backup.
    //   "RESTORE_VOLUME" - Restores an instance backup.
    //   "INJECT_USER" - Injects a privileged user in mysql for MOB
    // instances.
    //   "CLONE" - Clones a Cloud SQL instance.
    //   "STOP_REPLICA" - Stops replication on a Cloud SQL read replica
    // instance.
    //   "START_REPLICA" - Starts replication on a Cloud SQL read replica
    // instance.
    //   "PROMOTE_REPLICA" - Promotes a Cloud SQL replica instance.
    //   "CREATE_REPLICA" - Creates a Cloud SQL replica instance.
    //   "CREATE_USER" - Creates a new user in a Cloud SQL instance.
    //   "DELETE_USER" - Deletes a user from a Cloud SQL instance.
    //   "UPDATE_USER" - Updates an existing user in a Cloud SQL instance.
    //   "CREATE_DATABASE" - Creates a database in the Cloud SQL instance.
    //   "DELETE_DATABASE" - Deletes a database in the Cloud SQL instance.
    //   "UPDATE_DATABASE" - Updates a database in the Cloud SQL instance.
    //   "FAILOVER" - Performs failover of an HA-enabled Cloud SQL
    // failover replica.
    //   "DELETE_BACKUP" - Deletes the backup taken by a backup run.
    //   "RECREATE_REPLICA"
    //   "TRUNCATE_LOG" - Truncates a general or slow log table in MySQL.
    //   "DEMOTE_MASTER" - Demotes the stand-alone instance to be a Cloud
    // SQL
    // read replica for an external database server.
    //   "MAINTENANCE" - Indicates that the instance is currently in
    // maintenance. Maintenance
    // typically causes the instance to be unavailable for 1-3 minutes.
    //   "ENABLE_PRIVATE_IP" - This field is deprecated, and will be removed
    // in future version of API.
    //   "DEFER_MAINTENANCE"
    //   "CREATE_CLONE" - Creates clone instance.
    //   "RESCHEDULE_MAINTENANCE" - Reschedule maintenance to another time.
    //   "START_EXTERNAL_SYNC" - Starts external sync of a Cloud SQL EM
    // replica to an external master.
    OperationType string `json:"operationType,omitempty"`

    // SelfLink: The URI of this resource.
    SelfLink string `json:"selfLink,omitempty"`

    // StartTime: The time this operation actually started in UTC timezone
    // in <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    StartTime string `json:"startTime,omitempty"`

    // Status: The status of an operation. Valid values are
    // <code>PENDING</code>,
    // <code>RUNNING</code>,
    // <code>DONE</code>,
    // <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>.
    //
    // Possible values:
    //   "SQL_OPERATION_STATUS_UNSPECIFIED" - The state of the operation is
    // unknown.
    //   "PENDING" - The operation has been queued, but has not started yet.
    //   "RUNNING" - The operation is running.
    //   "DONE" - The operation completed.
    Status string `json:"status,omitempty"`

    // TargetId: Name of the database instance related to this operation.
    TargetId string `json:"targetId,omitempty"`

    TargetLink string `json:"targetLink,omitempty"`

    // TargetProject: The project ID of the target instance related to this
    // operation.
    TargetProject string `json:"targetProject,omitempty"`

    // User: The email address of the user who initiated this operation.
    User string `json:"user,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "EndTime") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "EndTime") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

Operation: An Operation resource.&nbsp;For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.

func (*Operation) MarshalJSON Uses

func (s *Operation) MarshalJSON() ([]byte, error)

type OperationError Uses

type OperationError struct {
    // Code: Identifies the specific error that occurred.
    Code string `json:"code,omitempty"`

    // Kind: This is always <code>sql#operationError</code>.
    Kind string `json:"kind,omitempty"`

    // Message: Additional information about the error encountered.
    Message string `json:"message,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Code") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Code") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

OperationError: Database instance operation error.

func (*OperationError) MarshalJSON Uses

func (s *OperationError) MarshalJSON() ([]byte, error)

type OperationErrors Uses

type OperationErrors struct {
    // Errors: The list of errors encountered while processing this
    // operation.
    Errors []*OperationError `json:"errors,omitempty"`

    // Kind: This is always <code>sql#operationErrors</code>.
    Kind string `json:"kind,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Errors") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Errors") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

OperationErrors: Database instance operation errors list wrapper.

func (*OperationErrors) MarshalJSON Uses

func (s *OperationErrors) MarshalJSON() ([]byte, error)

type OperationsGetCall Uses

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

func (*OperationsGetCall) Context Uses

func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OperationsGetCall) Do Uses

func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.operations.get" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OperationsGetCall) Fields Uses

func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*OperationsGetCall) Header Uses

func (c *OperationsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*OperationsGetCall) IfNoneMatch Uses

func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type OperationsListCall Uses

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

func (*OperationsListCall) Context Uses

func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OperationsListCall) Do Uses

func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error)

Do executes the "sql.operations.list" call. Exactly one of *OperationsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *OperationsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OperationsListCall) Fields Uses

func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*OperationsListCall) Header Uses

func (c *OperationsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*OperationsListCall) IfNoneMatch Uses

func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*OperationsListCall) Instance Uses

func (c *OperationsListCall) Instance(instance string) *OperationsListCall

Instance sets the optional parameter "instance": Cloud SQL instance ID. This does not include the project ID.

func (*OperationsListCall) MaxResults Uses

func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of operations per response.

func (*OperationsListCall) PageToken Uses

func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall

PageToken sets the optional parameter "pageToken": A previously-returned page token representing part of the larger set of results to view.

func (*OperationsListCall) Pages Uses

func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OperationsListResponse Uses

type OperationsListResponse struct {
    // Items: List of operation resources.
    Items []*Operation `json:"items,omitempty"`

    // Kind: This is always <code>sql#operationsList</code>.
    Kind string `json:"kind,omitempty"`

    // NextPageToken: The continuation token, used to page through large
    // result sets. Provide
    // this value in a subsequent request to return the next page of
    // results.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

OperationsListResponse: Database instance list operations response.

func (*OperationsListResponse) MarshalJSON Uses

func (s *OperationsListResponse) MarshalJSON() ([]byte, error)

type OperationsService Uses

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

func NewOperationsService Uses

func NewOperationsService(s *Service) *OperationsService

func (*OperationsService) Get Uses

func (r *OperationsService) Get(project string, operation string) *OperationsGetCall

Get: Retrieves an instance operation that has been performed on an instance.

func (*OperationsService) List Uses

func (r *OperationsService) List(project string) *OperationsListCall

List: Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.

type ProjectsInstancesRescheduleMaintenanceCall Uses

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

func (*ProjectsInstancesRescheduleMaintenanceCall) Context Uses

func (c *ProjectsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsInstancesRescheduleMaintenanceCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsInstancesRescheduleMaintenanceCall) Do Uses

func (c *ProjectsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.projects.instances.rescheduleMaintenance" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsInstancesRescheduleMaintenanceCall) Fields Uses

func (c *ProjectsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesRescheduleMaintenanceCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProjectsInstancesRescheduleMaintenanceCall) Header Uses

func (c *ProjectsInstancesRescheduleMaintenanceCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type ProjectsInstancesService Uses

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

func NewProjectsInstancesService Uses

func NewProjectsInstancesService(s *Service) *ProjectsInstancesService

func (*ProjectsInstancesService) RescheduleMaintenance Uses

func (r *ProjectsInstancesService) RescheduleMaintenance(project string, instance string, sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody) *ProjectsInstancesRescheduleMaintenanceCall

RescheduleMaintenance: Reschedules the maintenance on the given instance.

func (*ProjectsInstancesService) StartExternalSync Uses

func (r *ProjectsInstancesService) StartExternalSync(project string, instance string) *ProjectsInstancesStartExternalSyncCall

StartExternalSync: Start External master migration.

func (*ProjectsInstancesService) VerifyExternalSyncSettings Uses

func (r *ProjectsInstancesService) VerifyExternalSyncSettings(project string, instance string) *ProjectsInstancesVerifyExternalSyncSettingsCall

VerifyExternalSyncSettings: Verify External master external sync settings.

type ProjectsInstancesStartExternalSyncCall Uses

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

func (*ProjectsInstancesStartExternalSyncCall) Context Uses

func (c *ProjectsInstancesStartExternalSyncCall) Context(ctx context.Context) *ProjectsInstancesStartExternalSyncCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsInstancesStartExternalSyncCall) Do Uses

func (c *ProjectsInstancesStartExternalSyncCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.projects.instances.startExternalSync" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsInstancesStartExternalSyncCall) Fields Uses

func (c *ProjectsInstancesStartExternalSyncCall) Fields(s ...googleapi.Field) *ProjectsInstancesStartExternalSyncCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProjectsInstancesStartExternalSyncCall) Header Uses

func (c *ProjectsInstancesStartExternalSyncCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*ProjectsInstancesStartExternalSyncCall) SyncMode Uses

func (c *ProjectsInstancesStartExternalSyncCall) SyncMode(syncMode string) *ProjectsInstancesStartExternalSyncCall

SyncMode sets the optional parameter "syncMode": External sync mode

Possible values:

"EXTERNAL_SYNC_MODE_UNSPECIFIED"
"ONLINE"
"OFFLINE"

type ProjectsInstancesVerifyExternalSyncSettingsCall Uses

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

func (*ProjectsInstancesVerifyExternalSyncSettingsCall) Context Uses

func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Context(ctx context.Context) *ProjectsInstancesVerifyExternalSyncSettingsCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsInstancesVerifyExternalSyncSettingsCall) Do Uses

func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Do(opts ...googleapi.CallOption) (*SqlInstancesVerifyExternalSyncSettingsResponse, error)

Do executes the "sql.projects.instances.verifyExternalSyncSettings" call. Exactly one of *SqlInstancesVerifyExternalSyncSettingsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SqlInstancesVerifyExternalSyncSettingsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsInstancesVerifyExternalSyncSettingsCall) Fields Uses

func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Fields(s ...googleapi.Field) *ProjectsInstancesVerifyExternalSyncSettingsCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProjectsInstancesVerifyExternalSyncSettingsCall) Header Uses

func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*ProjectsInstancesVerifyExternalSyncSettingsCall) SyncMode Uses

func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) SyncMode(syncMode string) *ProjectsInstancesVerifyExternalSyncSettingsCall

SyncMode sets the optional parameter "syncMode": External sync mode

Possible values:

"EXTERNAL_SYNC_MODE_UNSPECIFIED"
"ONLINE"
"OFFLINE"

func (*ProjectsInstancesVerifyExternalSyncSettingsCall) VerifyConnectionOnly Uses

func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) VerifyConnectionOnly(verifyConnectionOnly bool) *ProjectsInstancesVerifyExternalSyncSettingsCall

VerifyConnectionOnly sets the optional parameter "verifyConnectionOnly": Flag to enable verifying connection only

type ProjectsService Uses

type ProjectsService struct {
    Instances *ProjectsInstancesService
    // contains filtered or unexported fields
}

func NewProjectsService Uses

func NewProjectsService(s *Service) *ProjectsService

type ReplicaConfiguration Uses

type ReplicaConfiguration struct {
    // FailoverTarget: Specifies if the replica is the failover target. If
    // the field is set to
    // <code>true</code> the replica will be designated as a failover
    // replica. In
    // case the master instance fails, the replica instance will be promoted
    // as
    // the new master instance.  <p>Only one replica can be specified as
    // failover
    // target, and the replica has to be in different zone with the
    // master
    // instance.
    FailoverTarget bool `json:"failoverTarget,omitempty"`

    // Kind: This is always <code>sql#replicaConfiguration</code>.
    Kind string `json:"kind,omitempty"`

    // MysqlReplicaConfiguration: MySQL specific configuration when
    // replicating from a MySQL on-premises
    // master. Replication configuration information such as the
    // username,
    // password, certificates, and keys are not stored in the instance
    // metadata.
    // The configuration information is used only to set up the
    // replication
    // connection and is stored by MySQL in a file named
    // <code>master.info</code>
    // in the data directory.
    MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`

    // ForceSendFields is a list of field names (e.g. "FailoverTarget") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "FailoverTarget") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

ReplicaConfiguration: Read-replica configuration for connecting to the master.

func (*ReplicaConfiguration) MarshalJSON Uses

func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error)

type Reschedule Uses

type Reschedule struct {
    // RescheduleType: Required. The type of the reschedule.
    //
    // Possible values:
    //   "RESCHEDULE_TYPE_UNSPECIFIED"
    //   "IMMEDIATE" - If the user wants to schedule the maintenance to
    // happen now.
    //   "NEXT_AVAILABLE_WINDOW" - If the user wants to use the existing
    // maintenance policy to find the
    // next available window.
    //   "SPECIFIC_TIME" - If the user wants to reschedule the maintenance
    // to a specific time.
    RescheduleType string `json:"rescheduleType,omitempty"`

    // ScheduleTime: Optional. Timestamp when the maintenance shall be
    // rescheduled to if
    // reschedule_type=SPECIFIC_TIME, in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format,
    // for
    // example <code>2012-11-15T16:19:00.094Z</code>.
    ScheduleTime string `json:"scheduleTime,omitempty"`

    // ForceSendFields is a list of field names (e.g. "RescheduleType") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "RescheduleType") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*Reschedule) MarshalJSON Uses

func (s *Reschedule) MarshalJSON() ([]byte, error)

type RestoreBackupContext Uses

type RestoreBackupContext struct {
    // BackupRunId: The ID of the backup run to restore from.
    BackupRunId int64 `json:"backupRunId,omitempty,string"`

    // InstanceId: The ID of the instance that the backup was taken from.
    InstanceId string `json:"instanceId,omitempty"`

    // Kind: This is always <code>sql#restoreBackupContext</code>.
    Kind string `json:"kind,omitempty"`

    // Project: The full project ID of the source instance.
    Project string `json:"project,omitempty"`

    // ForceSendFields is a list of field names (e.g. "BackupRunId") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BackupRunId") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

RestoreBackupContext: Database instance restore from backup context. Backup context contains source instance id and project id.

func (*RestoreBackupContext) MarshalJSON Uses

func (s *RestoreBackupContext) MarshalJSON() ([]byte, error)

type RotateServerCaContext Uses

type RotateServerCaContext struct {
    // Kind: This is always <code>sql#rotateServerCaContext</code>.
    Kind string `json:"kind,omitempty"`

    // NextVersion: The fingerprint of the next version to be rotated to. If
    // left unspecified,
    // will be rotated to the most recently added server CA version.
    NextVersion string `json:"nextVersion,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

RotateServerCaContext: Instance rotate server CA context.

func (*RotateServerCaContext) MarshalJSON Uses

func (s *RotateServerCaContext) MarshalJSON() ([]byte, error)

type Service Uses

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment

    BackupRuns *BackupRunsService

    Databases *DatabasesService

    Flags *FlagsService

    Instances *InstancesService

    Operations *OperationsService

    Projects *ProjectsService

    SslCerts *SslCertsService

    Tiers *TiersService

    Users *UsersService
    // contains filtered or unexported fields
}

func New Uses

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService Uses

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type Settings Uses

type Settings struct {
    // ActivationPolicy: The activation policy specifies when the instance
    // is activated; it is
    // applicable only when the instance state is <code>RUNNABLE</code>.
    // Valid
    // values: <br><code>ALWAYS</code>: The instance is on, and remains so
    // even in
    // the absence of connection requests. <br><code>NEVER</code>: The
    // instance is
    // off; it is not activated, even if a connection request
    // arrives.
    // <br><code>ON_DEMAND</code>: First Generation instances only. The
    // instance
    // responds to incoming requests, and turns itself off when not in
    // use.
    // Instances with <code>PER_USE</code> pricing turn off after 15 minutes
    // of
    // inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off
    // after
    // 12 hours of inactivity.
    //
    // Possible values:
    //   "SQL_ACTIVATION_POLICY_UNSPECIFIED" - Unknown activation plan.
    //   "ALWAYS" - The instance is always up and running.
    //   "NEVER" - The instance should never spin up.
    //   "ON_DEMAND" - The instance spins up upon receiving requests.
    ActivationPolicy string `json:"activationPolicy,omitempty"`

    // AuthorizedGaeApplications: The App Engine app IDs that can access
    // this instance. First Generation
    // instances only.
    AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"`

    // AvailabilityType: Availability type (PostgreSQL and MySQL instances
    // only). Potential values:
    // <br><code>ZONAL</code>: The instance serves data from only one
    // zone.
    // Outages in that zone affect data accessibility.
    // <br><code>REGIONAL</code>:
    // The instance can serve data from more than one zone in a region (it
    // is
    // highly available). <br>For more information, see
    // <a
    // href="https://cloud.google.com/sql/docs/postgres/high-availability"
    // >Overview
    // of the High Availability Configuration</a>.
    //
    // Possible values:
    //   "SQL_AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown
    // Availability type.
    //   "ZONAL" - Zonal available instance.
    //   "REGIONAL" - Regional available instance.
    AvailabilityType string `json:"availabilityType,omitempty"`

    // BackupConfiguration: The daily backup configuration for the instance.
    BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`

    // CrashSafeReplicationEnabled: Configuration specific to read replica
    // instances. Indicates whether
    // database flags for crash-safe replication are enabled. This property
    // is
    // only applicable to First Generation instances.
    CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"`

    // DataDiskSizeGb: The size of data disk, in GB. The data disk size
    // minimum is 10GB. Not used
    // for First Generation instances.
    DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`

    // DataDiskType: The type of data disk: <code>PD_SSD</code> (default)
    // or
    // <code>PD_HDD</code>. Not used for First Generation instances.
    //
    // Possible values:
    //   "SQL_DATA_DISK_TYPE_UNSPECIFIED" - This is an unknown data disk
    // type.
    //   "PD_SSD" - An SSD data disk.
    //   "PD_HDD" - An HDD data disk.
    //   "OBSOLETE_LOCAL_SSD" - This field is deprecated and will be removed
    // from a future version of the
    // API.
    DataDiskType string `json:"dataDiskType,omitempty"`

    // DatabaseFlags: The database flags passed to the instance at startup.
    DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"`

    // DatabaseReplicationEnabled: Configuration specific to read replica
    // instances. Indicates whether
    // replication is enabled or not.
    DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"`

    // IpConfiguration: The settings for IP Management. This allows to
    // enable or disable the
    // instance IP and manage which external networks can connect to the
    // instance.
    // The IPv4 address cannot be disabled for Second Generation instances.
    IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"`

    // Kind: This is always <code>sql#settings</code>.
    Kind string `json:"kind,omitempty"`

    // LocationPreference: The location preference settings. This allows the
    // instance to be located as
    // near as possible to either an App Engine app or Compute Engine zone
    // for
    // better performance. App Engine co-location is only applicable to
    // First
    // Generation instances.
    LocationPreference *LocationPreference `json:"locationPreference,omitempty"`

    // MaintenanceWindow: The maintenance window for this instance. This
    // specifies when the instance
    // can be restarted for maintenance purposes. Not used for First
    // Generation
    // instances.
    MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`

    // PricingPlan: The pricing plan for this instance. This can be either
    // <code>PER_USE</code>
    // or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for
    // Second
    // Generation instances.
    //
    // Possible values:
    //   "SQL_PRICING_PLAN_UNSPECIFIED" - This is an unknown pricing plan
    // for this instance.
    //   "PACKAGE" - The instance is billed at a monthly flat rate.
    //   "PER_USE" - The instance is billed per usage.
    PricingPlan string `json:"pricingPlan,omitempty"`

    // ReplicationType: The type of replication this instance uses. This can
    // be either
    // <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property
    // is
    // only applicable to First Generation instances.
    //
    // Possible values:
    //   "SQL_REPLICATION_TYPE_UNSPECIFIED" - This is an unknown replication
    // type for a Cloud SQL instance.
    //   "SYNCHRONOUS" - The synchronous replication mode for First
    // Generation instances. It is the
    // default value.
    //   "ASYNCHRONOUS" - The asynchronous replication mode for First
    // Generation instances. It
    // provides a slight performance gain, but if an outage occurs while
    // this
    // option is set to asynchronous, you can lose up to a few seconds of
    // updates
    // to your data.
    ReplicationType string `json:"replicationType,omitempty"`

    // SettingsVersion: The version of instance settings. This is a required
    // field for update
    // method to make sure concurrent updates are handled properly. During
    // update,
    // use the most recent settingsVersion value for this instance and do
    // not try
    // to update this value.
    SettingsVersion int64 `json:"settingsVersion,omitempty,string"`

    // StorageAutoResize: Configuration to increase storage size
    // automatically. The default value is
    // true. Not used for First Generation instances.
    StorageAutoResize *bool `json:"storageAutoResize,omitempty"`

    // StorageAutoResizeLimit: The maximum size to which storage capacity
    // can be automatically increased.
    // The default value is 0, which specifies that there is no limit. Not
    // used
    // for First Generation instances.
    StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`

    // Tier: The tier (or machine type) for this instance, for
    // example
    // <code>db-n1-standard-1</code> (MySQL instances)
    // or
    // <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL
    // instances,
    // this property determines whether the instance is First or
    // Second
    // Generation. For more information, see
    // <a
    // href="/sql/docs/db_path/instance-settings">Instance Settings</a>.
    Tier string `json:"tier,omitempty"`

    // UserLabels: User-provided labels, represented as a dictionary where
    // each label is a
    // single key value pair.
    UserLabels map[string]string `json:"userLabels,omitempty"`

    // ForceSendFields is a list of field names (e.g. "ActivationPolicy") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ActivationPolicy") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

Settings: Database instance settings.

func (*Settings) MarshalJSON Uses

func (s *Settings) MarshalJSON() ([]byte, error)

type SqlExternalSyncSettingError Uses

type SqlExternalSyncSettingError struct {
    // Detail: Additional information about the error encountered.
    Detail string `json:"detail,omitempty"`

    // Kind: This is always <code>sql#migrationSettingError</code>.
    Kind string `json:"kind,omitempty"`

    // Type: Identifies the specific error that occurred.
    //
    // Possible values:
    //   "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED"
    //   "CONNECTION_FAILURE"
    //   "BINLOG_NOT_ENABLED"
    //   "INCOMPATIBLE_DATABASE_VERSION"
    //   "REPLICA_ALREADY_SETUP"
    //   "INSUFFICIENT_PRIVILEGE"
    //   "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type.
    //   "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on
    // databases, applicable for postgres.
    //   "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on
    // databases, applicable for postgres.
    Type string `json:"type,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Detail") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Detail") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SqlExternalSyncSettingError: External master migration setting error.

func (*SqlExternalSyncSettingError) MarshalJSON Uses

func (s *SqlExternalSyncSettingError) MarshalJSON() ([]byte, error)

type SqlInstancesRescheduleMaintenanceRequestBody Uses

type SqlInstancesRescheduleMaintenanceRequestBody struct {
    // Reschedule: Required. The type of the reschedule the user wants.
    Reschedule *Reschedule `json:"reschedule,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Reschedule") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Reschedule") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SqlInstancesRescheduleMaintenanceRequestBody: Reschedule options for maintenance windows.

func (*SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON Uses

func (s *SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON() ([]byte, error)

type SqlInstancesVerifyExternalSyncSettingsResponse Uses

type SqlInstancesVerifyExternalSyncSettingsResponse struct {
    // Errors: List of migration violations.
    Errors []*SqlExternalSyncSettingError `json:"errors,omitempty"`

    // Kind: This is always <code>sql#migrationSettingErrorList</code>.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Errors") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Errors") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SqlInstancesVerifyExternalSyncSettingsResponse: Instance verify external sync settings response.

func (*SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON Uses

func (s *SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON() ([]byte, error)

type SqlScheduledMaintenance Uses

type SqlScheduledMaintenance struct {
    CanDefer bool `json:"canDefer,omitempty"`

    // CanReschedule: If the scheduled maintenance can be rescheduled.
    CanReschedule bool `json:"canReschedule,omitempty"`

    // StartTime: The start time of any upcoming scheduled maintenance for
    // this instance.
    StartTime string `json:"startTime,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CanDefer") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CanDefer") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SqlScheduledMaintenance: Any scheduled maintenancce for this instance.

func (*SqlScheduledMaintenance) MarshalJSON Uses

func (s *SqlScheduledMaintenance) MarshalJSON() ([]byte, error)

type SqlServerDatabaseDetails Uses

type SqlServerDatabaseDetails struct {
    // CompatibilityLevel: The version of SQL Server with which the database
    // is to be made compatible
    CompatibilityLevel int64 `json:"compatibilityLevel,omitempty"`

    // RecoveryModel: The recovery model of a SQL Server database
    RecoveryModel string `json:"recoveryModel,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CompatibilityLevel")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CompatibilityLevel") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

SqlServerDatabaseDetails: Represents a Sql Server database on the Cloud SQL instance.

func (*SqlServerDatabaseDetails) MarshalJSON Uses

func (s *SqlServerDatabaseDetails) MarshalJSON() ([]byte, error)

type SqlServerUserDetails Uses

type SqlServerUserDetails struct {
    // Disabled: If the user has been disabled
    Disabled bool `json:"disabled,omitempty"`

    // ServerRoles: The server roles for this user
    ServerRoles []string `json:"serverRoles,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Disabled") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Disabled") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL instance.

func (*SqlServerUserDetails) MarshalJSON Uses

func (s *SqlServerUserDetails) MarshalJSON() ([]byte, error)

type SslCert Uses

type SslCert struct {
    // Cert: PEM representation.
    Cert string `json:"cert,omitempty"`

    // CertSerialNumber: Serial number, as extracted from the certificate.
    CertSerialNumber string `json:"certSerialNumber,omitempty"`

    // CommonName: User supplied name.  Constrained to [a-zA-Z.-_ ]+.
    CommonName string `json:"commonName,omitempty"`

    // CreateTime: The time when the certificate was created in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>
    CreateTime string `json:"createTime,omitempty"`

    // ExpirationTime: The time when the certificate expires in
    // <a
    // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
    // example
    // <code>2012-11-15T16:19:00.094Z</code>.
    ExpirationTime string `json:"expirationTime,omitempty"`

    // Instance: Name of the database instance.
    Instance string `json:"instance,omitempty"`

    // Kind: This is always <code>sql#sslCert</code>.
    Kind string `json:"kind,omitempty"`

    // SelfLink: The URI of this resource.
    SelfLink string `json:"selfLink,omitempty"`

    // Sha1Fingerprint: Sha1 Fingerprint.
    Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Cert") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Cert") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SslCert: SslCerts Resource

func (*SslCert) MarshalJSON Uses

func (s *SslCert) MarshalJSON() ([]byte, error)

type SslCertDetail Uses

type SslCertDetail struct {
    // CertInfo: The public information about the cert.
    CertInfo *SslCert `json:"certInfo,omitempty"`

    // CertPrivateKey: The private key for the client cert, in pem format.
    // Keep private in order
    // to protect your security.
    CertPrivateKey string `json:"certPrivateKey,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CertInfo") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CertInfo") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SslCertDetail: SslCertDetail.

func (*SslCertDetail) MarshalJSON Uses

func (s *SslCertDetail) MarshalJSON() ([]byte, error)

type SslCertsCreateEphemeralCall Uses

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

func (*SslCertsCreateEphemeralCall) Context Uses

func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SslCertsCreateEphemeralCall) Do Uses

func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error)

Do executes the "sql.sslCerts.createEphemeral" call. Exactly one of *SslCert or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SslCert.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SslCertsCreateEphemeralCall) Fields Uses

func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SslCertsCreateEphemeralCall) Header Uses

func (c *SslCertsCreateEphemeralCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SslCertsCreateEphemeralRequest Uses

type SslCertsCreateEphemeralRequest struct {
    // PublicKey: PEM encoded public key to include in the signed
    // certificate.
    PublicKey string `json:"public_key,omitempty"`

    // ForceSendFields is a list of field names (e.g. "PublicKey") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "PublicKey") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate request.

func (*SslCertsCreateEphemeralRequest) MarshalJSON Uses

func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error)

type SslCertsDeleteCall Uses

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

func (*SslCertsDeleteCall) Context Uses

func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SslCertsDeleteCall) Do Uses

func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.sslCerts.delete" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SslCertsDeleteCall) Fields Uses

func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SslCertsDeleteCall) Header Uses

func (c *SslCertsDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SslCertsGetCall Uses

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

func (*SslCertsGetCall) Context Uses

func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SslCertsGetCall) Do Uses

func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error)

Do executes the "sql.sslCerts.get" call. Exactly one of *SslCert or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SslCert.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SslCertsGetCall) Fields Uses

func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SslCertsGetCall) Header Uses

func (c *SslCertsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SslCertsGetCall) IfNoneMatch Uses

func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SslCertsInsertCall Uses

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

func (*SslCertsInsertCall) Context Uses

func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SslCertsInsertCall) Do Uses

func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error)

Do executes the "sql.sslCerts.insert" call. Exactly one of *SslCertsInsertResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SslCertsInsertResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SslCertsInsertCall) Fields Uses

func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SslCertsInsertCall) Header Uses

func (c *SslCertsInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SslCertsInsertRequest Uses

type SslCertsInsertRequest struct {
    // CommonName: User supplied name.  Must be a distinct name from the
    // other certificates
    // for this instance.
    CommonName string `json:"commonName,omitempty"`

    // ForceSendFields is a list of field names (e.g. "CommonName") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "CommonName") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SslCertsInsertRequest: SslCerts insert request.

func (*SslCertsInsertRequest) MarshalJSON Uses

func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error)

type SslCertsInsertResponse Uses

type SslCertsInsertResponse struct {
    // ClientCert: The new client certificate and private key.  For First
    // Generation
    // instances, the new certificate does not take effect until the
    // instance is
    // restarted.
    ClientCert *SslCertDetail `json:"clientCert,omitempty"`

    // Kind: This is always <code>sql#sslCertsInsert</code>.
    Kind string `json:"kind,omitempty"`

    // Operation: The operation to track the ssl certs insert request.
    Operation *Operation `json:"operation,omitempty"`

    // ServerCaCert: The server Certificate Authority's certificate.  If
    // this is missing you can
    // force a new one to be generated by calling resetSslConfig method
    // on
    // instances resource.
    ServerCaCert *SslCert `json:"serverCaCert,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "ClientCert") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ClientCert") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SslCertsInsertResponse: SslCert insert response.

func (*SslCertsInsertResponse) MarshalJSON Uses

func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error)

type SslCertsListCall Uses

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

func (*SslCertsListCall) Context Uses

func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SslCertsListCall) Do Uses

func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error)

Do executes the "sql.sslCerts.list" call. Exactly one of *SslCertsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SslCertsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SslCertsListCall) Fields Uses

func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SslCertsListCall) Header Uses

func (c *SslCertsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SslCertsListCall) IfNoneMatch Uses

func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SslCertsListResponse Uses

type SslCertsListResponse struct {
    // Items: List of client certificates for the instance.
    Items []*SslCert `json:"items,omitempty"`

    // Kind: This is always <code>sql#sslCertsList</code>.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

SslCertsListResponse: SslCerts list response.

func (*SslCertsListResponse) MarshalJSON Uses

func (s *SslCertsListResponse) MarshalJSON() ([]byte, error)

type SslCertsService Uses

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

func NewSslCertsService Uses

func NewSslCertsService(s *Service) *SslCertsService

func (*SslCertsService) CreateEphemeral Uses

func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall

CreateEphemeral: Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.

func (*SslCertsService) Delete Uses

func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall

Delete: Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.

func (*SslCertsService) Get Uses

func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall

Get: Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.

func (*SslCertsService) Insert Uses

func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall

Insert: Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.

func (*SslCertsService) List Uses

func (r *SslCertsService) List(project string, instance string) *SslCertsListCall

List: Lists all of the current SSL certificates for the instance.

type Tier Uses

type Tier struct {
    // DiskQuota: The maximum disk size of this tier in bytes.
    DiskQuota int64 `json:"DiskQuota,omitempty,string"`

    // RAM: The maximum RAM usage of this tier in bytes.
    RAM int64 `json:"RAM,omitempty,string"`

    // Kind: This is always <code>sql#tier</code>.
    Kind string `json:"kind,omitempty"`

    // Region: The applicable regions for this tier.
    Region []string `json:"region,omitempty"`

    // Tier: An identifier for the machine type, for example,
    // db-n1-standard-1. For
    // related information, see <a href="/sql/pricing">Pricing</a>.
    Tier string `json:"tier,omitempty"`

    // ForceSendFields is a list of field names (e.g. "DiskQuota") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "DiskQuota") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

Tier: A Google Cloud SQL service tier resource.

func (*Tier) MarshalJSON Uses

func (s *Tier) MarshalJSON() ([]byte, error)

type TiersListCall Uses

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

func (*TiersListCall) Context Uses

func (c *TiersListCall) Context(ctx context.Context) *TiersListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TiersListCall) Do Uses

func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error)

Do executes the "sql.tiers.list" call. Exactly one of *TiersListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TiersListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TiersListCall) Fields Uses

func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*TiersListCall) Header Uses

func (c *TiersListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*TiersListCall) IfNoneMatch Uses

func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type TiersListResponse Uses

type TiersListResponse struct {
    // Items: List of tiers.
    Items []*Tier `json:"items,omitempty"`

    // Kind: This is always <code>sql#tiersList</code>.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

TiersListResponse: Tiers list response.

func (*TiersListResponse) MarshalJSON Uses

func (s *TiersListResponse) MarshalJSON() ([]byte, error)

type TiersService Uses

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

func NewTiersService Uses

func NewTiersService(s *Service) *TiersService

func (*TiersService) List Uses

func (r *TiersService) List(project string) *TiersListCall

List: Lists all available machine types (tiers) for Cloud SQL, for example, db-n1-standard-1. For related information, see <a href="/sql/pricing">Pricing</a>.

type TruncateLogContext Uses

type TruncateLogContext struct {
    // Kind: This is always <code>sql#truncateLogContext</code>.
    Kind string `json:"kind,omitempty"`

    // LogType: The type of log to truncate. Valid values
    // are
    // <code>MYSQL_GENERAL_TABLE</code> and <code>MYSQL_SLOW_TABLE</code>.
    LogType string `json:"logType,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Kind") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Kind") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

TruncateLogContext: Database Instance truncate log context.

func (*TruncateLogContext) MarshalJSON Uses

func (s *TruncateLogContext) MarshalJSON() ([]byte, error)

type User Uses

type User struct {
    // Etag: This field is deprecated and will be removed from a future
    // version of the
    // API.
    Etag string `json:"etag,omitempty"`

    // Host: The host name from which the user can connect. For
    // <code>insert</code>
    // operations, host defaults to an empty string. For
    // <code>update</code>
    // operations, host is specified as part of the request URL. The host
    // name
    // cannot be updated after insertion.
    Host string `json:"host,omitempty"`

    // Instance: The name of the Cloud SQL instance. This does not include
    // the project ID.
    // Can be omitted for <code>update</code> since it is already specified
    // on the
    // URL.
    Instance string `json:"instance,omitempty"`

    // Kind: This is always <code>sql#user</code>.
    Kind string `json:"kind,omitempty"`

    // Name: The name of the user in the Cloud SQL instance. Can be omitted
    // for
    // <code>update</code> since it is already specified in the URL.
    Name string `json:"name,omitempty"`

    // Password: The password for the user.
    Password string `json:"password,omitempty"`

    // Project: The project ID of the project containing the Cloud SQL
    // database. The Google
    // apps domain is prefixed if applicable. Can be omitted
    // for
    // <code>update</code> since it is already specified on the URL.
    Project string `json:"project,omitempty"`

    SqlserverUserDetails *SqlServerUserDetails `json:"sqlserverUserDetails,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Etag") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Etag") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

User: A Cloud SQL user resource.

func (*User) MarshalJSON Uses

func (s *User) MarshalJSON() ([]byte, error)

type UsersDeleteCall Uses

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

func (*UsersDeleteCall) Context Uses

func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersDeleteCall) Do Uses

func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.users.delete" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersDeleteCall) Fields Uses

func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersDeleteCall) Header Uses

func (c *UsersDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UsersDeleteCall) Host Uses

func (c *UsersDeleteCall) Host(host string) *UsersDeleteCall

Host sets the optional parameter "host": Host of the user in the instance.

func (*UsersDeleteCall) Name Uses

func (c *UsersDeleteCall) Name(name string) *UsersDeleteCall

Name sets the optional parameter "name": Name of the user in the instance.

type UsersInsertCall Uses

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

func (*UsersInsertCall) Context Uses

func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersInsertCall) Do Uses

func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.users.insert" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersInsertCall) Fields Uses

func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersInsertCall) Header Uses

func (c *UsersInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type UsersListCall Uses

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

func (*UsersListCall) Context Uses

func (c *UsersListCall) Context(ctx context.Context) *UsersListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersListCall) Do Uses

func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error)

Do executes the "sql.users.list" call. Exactly one of *UsersListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UsersListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersListCall) Fields Uses

func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersListCall) Header Uses

func (c *UsersListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UsersListCall) IfNoneMatch Uses

func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UsersListResponse Uses

type UsersListResponse struct {
    // Items: List of user resources in the instance.
    Items []*User `json:"items,omitempty"`

    // Kind: This is always <code>sql#usersList</code>.
    Kind string `json:"kind,omitempty"`

    // NextPageToken: An identifier that uniquely identifies the operation.
    // You can use this
    // identifier to retrieve the Operations resource that has information
    // about
    // the operation.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

UsersListResponse: User list response.

func (*UsersListResponse) MarshalJSON Uses

func (s *UsersListResponse) MarshalJSON() ([]byte, error)

type UsersService Uses

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

func NewUsersService Uses

func NewUsersService(s *Service) *UsersService

func (*UsersService) Delete Uses

func (r *UsersService) Delete(project string, instance string) *UsersDeleteCall

Delete: Deletes a user from a Cloud SQL instance.

func (*UsersService) Insert Uses

func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall

Insert: Creates a new user in a Cloud SQL instance.

func (*UsersService) List Uses

func (r *UsersService) List(project string, instance string) *UsersListCall

List: Lists users in the specified Cloud SQL instance.

func (*UsersService) Update Uses

func (r *UsersService) Update(project string, instance string, user *User) *UsersUpdateCall

Update: Updates an existing user in a Cloud SQL instance.

type UsersUpdateCall Uses

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

func (*UsersUpdateCall) Context Uses

func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersUpdateCall) Do Uses

func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)

Do executes the "sql.users.update" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersUpdateCall) Fields Uses

func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersUpdateCall) Header Uses

func (c *UsersUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UsersUpdateCall) Host Uses

func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall

Host sets the optional parameter "host": Host of the user in the instance.

func (*UsersUpdateCall) Name Uses

func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall

Name sets the optional parameter "name": Name of the user in the instance.

Package sqladmin imports 15 packages (graph) and is imported by 89 packages. Updated 2020-05-22. Refresh now. Tools for package owners.