workloadmanager

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package workloadmanager contains types and functions to interact with the various WorkloadManager cloud APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Insight

type Insight struct {
	// SapDiscovery: The insights data for sap system discovery. This is a
	// copy of SAP System proto and should get updated whenever that one
	// changes.
	SapDiscovery *SapDiscovery `json:"sapDiscovery,omitempty"`
	// SentTime: Output only. [Output only] Create time stamp
	SentTime string `json:"sentTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "SapDiscovery") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "SapDiscovery") 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:"-"`
}

type SapDiscovery

type SapDiscovery struct {
	// ApplicationLayer: An SAP system may run without an application layer.
	ApplicationLayer *SapDiscoveryComponent `json:"applicationLayer,omitempty"`
	// DatabaseLayer: An SAP System must have a database.
	DatabaseLayer *SapDiscoveryComponent `json:"databaseLayer,omitempty"`
	// Metadata: The metadata for SAP system discovery data.
	Metadata *SapDiscoveryMetadata `json:"metadata,omitempty"`
	// SystemID: A combination of database SID, database instance URI and
	// tenant DB name to make a unique identifier per-system.
	SystemID string `json:"systemId,omitempty"`
	// UpdateTime: Unix timestamp this system has been updated last.
	UpdateTime string `json:"updateTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ApplicationLayer") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "ApplicationLayer") 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:"-"`
}

SapDiscovery is the schema of SAP system discovery data.

type SapDiscoveryComponent

type SapDiscoveryComponent struct {
	// ApplicationType: The component is a SAP application.
	ApplicationType string `json:"applicationType,omitempty"`
	// DatabaseType: The component is a SAP database.
	DatabaseType string `json:"databaseType,omitempty"`
	// HostProject: Pantheon Project in which the resources reside.
	HostProject string `json:"hostProject,omitempty"`
	// Resources: The resources in a component.
	Resources []*SapDiscoveryResource `json:"resources,omitempty"`
	// Sid: The sap identifier, used by the SAP software and helps
	// differentiate systems for customers.
	Sid string `json:"sid,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ApplicationType") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "ApplicationType") 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:"-"`
}

SapDiscoveryComponent is an organized set of SAP System resources.

type SapDiscoveryMetadata

type SapDiscoveryMetadata struct {
	// CustomerRegion: Customer region string for customer's use. Does not
	// represent the GCP region.
	CustomerRegion string `json:"customerRegion,omitempty"`
	// DefinedSystem: Customer defined, something like "E-commerce pre prod"
	DefinedSystem string `json:"definedSystem,omitempty"`
	// EnvironmentType: Should be "prod", "QA", "dev", "staging", etc.
	EnvironmentType string `json:"environmentType,omitempty"`
	// SapProduct: This sap product name
	SapProduct string `json:"sapProduct,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CustomerRegion") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "CustomerRegion") 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:"-"`
}

SapDiscoveryMetadata is the metadata for an SAP System

type SapDiscoveryResource

type SapDiscoveryResource struct {
	// RelatedResources: A list of resource URIs related to this resource.
	RelatedResources []string `json:"relatedResources,omitempty"`
	// ResourceKind: ComputeInstance, ComputeDisk, VPC, Bare Metal server,
	// etc.
	ResourceKind string `json:"resourceKind,omitempty"`
	// ResourceType: The type of this resource.
	//
	// Possible values:
	//   "RESOURCE_TYPE_UNSPECIFIED" - Undefined resource type.
	//   "COMPUTE" - This is a compute resource.
	//   "STORAGE" - This a storage resource.
	//   "NETWORK" - This is a network resource.
	ResourceType string `json:"resourceType,omitempty"`
	// ResourceURI: URI of the resource, includes project, location, and
	// name.
	ResourceURI string `json:"resourceUri,omitempty"`
	// UpdateTime: Unix timestamp of when this resource last had its
	// discovery data updated.
	UpdateTime string `json:"updateTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "RelatedResources") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "RelatedResources") 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:"-"`
}

SapDiscoveryResource describes a resource within an SAP System.

type SendRequest

type SendRequest func(context.Context, *http.Client, *http.Request) (*http.Response, error)

SendRequest is used to send HTTP requests and return the response.

type Service

type Service struct {
	BasePath    string // API endpoint base URL
	UserAgent   string // optional additional User-Agent fragment
	SendRequest SendRequest
	// contains filtered or unexported fields
}

Service handles connecting to a version of the Data Warehouse API defined by BasePath.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new WorkloadManager Service.

func (*Service) WriteInsight

func (s *Service) WriteInsight(name string, writeinsightrequest *WriteInsightRequest) *WriteInsightCall

WriteInsight creates a WriteInsightCall to send the data insights to workload manager data warehouse.

  • location: The GCP location. The format is: projects/{project}/locations/{location}.

type WriteInsightCall

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

WriteInsightCall represents a call to send insight data to the WLM API.

func (*WriteInsightCall) Do

Do executes the "workloadmanager.projects.locations.insights.writeInsight" call. Exactly one of *WriteInsightResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *WriteInsightResponse.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.

type WriteInsightRequest

type WriteInsightRequest struct {
	// Insight: Required. The metrics data details.
	Insight *Insight `json:"insight,omitempty"`
	// RequestID: Optional. An optional request ID to identify requests.
	// Specify a unique request ID so that if you must retry your request,
	// the server will know to ignore the request if it has already been
	// completed. The server will guarantee that for at least 60 minutes
	// since the first request. For example, consider a situation where you
	// make an initial request and t he request times out. If you make the
	// request again with the same request ID, the server can check if
	// original operation with the same request ID was received, and if so,
	// will ignore the second request. This prevents clients from
	// accidentally creating duplicate commitments. The request ID must be a
	// valid UUID with the exception that zero UUID is not supported
	// (00000000-0000-0000-0000-000000000000).
	RequestID string `json:"requestId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Insight") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "Insight") 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:"-"`
}

WriteInsightRequest is a request for sending the data insights.

type WriteInsightResponse

type WriteInsightResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

WriteInsightResponse is the response for write insights request.

Jump to

Keyboard shortcuts

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