Documentation ¶
Overview ¶
Package dataproc provides access to the Google Cloud Dataproc API.
See https://cloud.google.com/dataproc/
Usage example:
import "google.golang.org/api/dataproc/v1" ... dataprocService, err := dataproc.New(oauthHttpClient)
Index ¶
- Constants
- type DiagnoseClusterOutputLocation
- type Media
- type MediaDownloadCall
- func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
- func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error)
- func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
- func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
- func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall
- type MediaService
- type MediaUploadCall
- func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall
- func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Media, error)
- func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall
- func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall
- func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall
- func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCalldeprecated
- type OperationMetadata
- type OperationStatus
- type Service
Constants ¶
const ( // View and manage your data across Google Cloud Platform services CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" // Administrate log data for your projects LoggingAdminScope = "https://www.googleapis.com/auth/logging.admin" // View log data for your projects LoggingReadScope = "https://www.googleapis.com/auth/logging.read" // Submit log data for your projects LoggingWriteScope = "https://www.googleapis.com/auth/logging.write" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiagnoseClusterOutputLocation ¶
type DiagnoseClusterOutputLocation struct { // OutputUri: [Output-only] The Google Cloud Storage URI of the // diagnostic output. This will be a plain text file with summary of // collected diagnostics. OutputUri string `json:"outputUri,omitempty"` // ForceSendFields is a list of field names (e.g. "OutputUri") 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:"-"` }
DiagnoseClusterOutputLocation: The location where output from diagnostic command can be found.
func (*DiagnoseClusterOutputLocation) MarshalJSON ¶
func (s *DiagnoseClusterOutputLocation) MarshalJSON() ([]byte, error)
type Media ¶
type Media struct { // ResourceName: Name of the media resource. ResourceName string `json:"resourceName,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "ResourceName") 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:"-"` }
Media: Media resource.
func (*Media) MarshalJSON ¶
type MediaDownloadCall ¶
type MediaDownloadCall struct {
// contains filtered or unexported fields
}
func (*MediaDownloadCall) Context ¶
func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
Context sets the context to be used in this call's Do and Download methods. Any pending HTTP request will be aborted if the provided context is canceled.
func (*MediaDownloadCall) Do ¶
func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error)
Do executes the "dataproc.media.download" call. Exactly one of *Media or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Media.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 (*MediaDownloadCall) Download ¶
func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
Download fetches the API endpoint's "media" value, instead of the normal API response value. If the returned error is nil, the Response is guaranteed to have a 2xx status code. Callers must close the Response.Body as usual.
func (*MediaDownloadCall) Fields ¶
func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*MediaDownloadCall) IfNoneMatch ¶
func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall
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 MediaService ¶
type MediaService struct {
// contains filtered or unexported fields
}
func NewMediaService ¶
func NewMediaService(s *Service) *MediaService
func (*MediaService) Download ¶
func (r *MediaService) Download(resourceName string) *MediaDownloadCall
Download: Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`.
func (*MediaService) Upload ¶
func (r *MediaService) Upload(resourceName string, media *Media) *MediaUploadCall
Upload: Method for media upload. Upload is supported on the URI `/upload/v1/media/{+name}`.
type MediaUploadCall ¶
type MediaUploadCall struct {
// contains filtered or unexported fields
}
func (*MediaUploadCall) Context ¶
func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall
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. This context will supersede any context previously provided to the ResumableMedia method.
func (*MediaUploadCall) Do ¶
func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Media, error)
Do executes the "dataproc.media.upload" call. Exactly one of *Media or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Media.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 (*MediaUploadCall) Fields ¶
func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*MediaUploadCall) Media ¶
func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*MediaUploadCall) ProgressUpdater ¶
func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*MediaUploadCall) ResumableMedia
deprecated
func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type OperationMetadata ¶
type OperationMetadata struct { // ClusterName: Name of the cluster for the operation. ClusterName string `json:"clusterName,omitempty"` // ClusterUuid: Cluster UUId for the operation. ClusterUuid string `json:"clusterUuid,omitempty"` // Details: A message containing any operation metadata details. Details string `json:"details,omitempty"` // EndTime: The time that the operation completed. EndTime string `json:"endTime,omitempty"` // InnerState: A message containing the detailed operation state. InnerState string `json:"innerState,omitempty"` // InsertTime: The time that the operation was requested. InsertTime string `json:"insertTime,omitempty"` // StartTime: The time that the operation was started by the server. StartTime string `json:"startTime,omitempty"` // State: A message containing the operation state. // // Possible values: // "UNKNOWN" // "PENDING" // "RUNNING" // "DONE" State string `json:"state,omitempty"` // Status: [Output-only] Current operation status. Status *OperationStatus `json:"status,omitempty"` // StatusHistory: [Output-only] Previous operation status. StatusHistory []*OperationStatus `json:"statusHistory,omitempty"` // ForceSendFields is a list of field names (e.g. "ClusterName") 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:"-"` }
OperationMetadata: Metadata describing the operation.
func (*OperationMetadata) MarshalJSON ¶
func (s *OperationMetadata) MarshalJSON() ([]byte, error)
type OperationStatus ¶
type OperationStatus struct { // Details: A message containing any operation metadata details. Details string `json:"details,omitempty"` // InnerState: A message containing the detailed operation state. InnerState string `json:"innerState,omitempty"` // State: A message containing the operation state. // // Possible values: // "UNKNOWN" // "PENDING" // "RUNNING" // "DONE" State string `json:"state,omitempty"` // StateStartTime: The time this state was entered. StateStartTime string `json:"stateStartTime,omitempty"` // ForceSendFields is a list of field names (e.g. "Details") 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:"-"` }
OperationStatus: The status of the operation.
func (*OperationStatus) MarshalJSON ¶
func (s *OperationStatus) MarshalJSON() ([]byte, error)