Documentation
¶
Index ¶
- Variables
- type LabelDescriptor
- func (x *LabelDescriptor) GetDescription() string
- func (x *LabelDescriptor) GetKey() string
- func (x *LabelDescriptor) GetValueType() LabelDescriptor_ValueType
- func (*LabelDescriptor) ProtoMessage()
- func (x *LabelDescriptor) ProtoReflect() protoreflect.Message
- func (x *LabelDescriptor) Reset()
- func (x *LabelDescriptor) SetDescription(v string)
- func (x *LabelDescriptor) SetKey(v string)
- func (x *LabelDescriptor) SetValueType(v LabelDescriptor_ValueType)
- func (x *LabelDescriptor) String() string
- type LabelDescriptor_ValueType
- func (LabelDescriptor_ValueType) Descriptor() protoreflect.EnumDescriptor
- func (x LabelDescriptor_ValueType) Enum() *LabelDescriptor_ValueType
- func (x LabelDescriptor_ValueType) Number() protoreflect.EnumNumber
- func (x LabelDescriptor_ValueType) String() string
- func (LabelDescriptor_ValueType) Type() protoreflect.EnumType
- type LabelDescriptor_builder
- type MonitoredResource
- func (x *MonitoredResource) GetLabels() map[string]string
- func (x *MonitoredResource) GetType() string
- func (*MonitoredResource) ProtoMessage()
- func (x *MonitoredResource) ProtoReflect() protoreflect.Message
- func (x *MonitoredResource) Reset()
- func (x *MonitoredResource) SetLabels(v map[string]string)
- func (x *MonitoredResource) SetType(v string)
- func (x *MonitoredResource) String() string
- type MonitoredResourceDescriptor
- func (x *MonitoredResourceDescriptor) GetDescription() string
- func (x *MonitoredResourceDescriptor) GetDisplayName() string
- func (x *MonitoredResourceDescriptor) GetLabels() []*LabelDescriptor
- func (x *MonitoredResourceDescriptor) GetLaunchStage() api.LaunchStage
- func (x *MonitoredResourceDescriptor) GetName() string
- func (x *MonitoredResourceDescriptor) GetType() string
- func (*MonitoredResourceDescriptor) ProtoMessage()
- func (x *MonitoredResourceDescriptor) ProtoReflect() protoreflect.Message
- func (x *MonitoredResourceDescriptor) Reset()
- func (x *MonitoredResourceDescriptor) SetDescription(v string)
- func (x *MonitoredResourceDescriptor) SetDisplayName(v string)
- func (x *MonitoredResourceDescriptor) SetLabels(v []*LabelDescriptor)
- func (x *MonitoredResourceDescriptor) SetLaunchStage(v api.LaunchStage)
- func (x *MonitoredResourceDescriptor) SetName(v string)
- func (x *MonitoredResourceDescriptor) SetType(v string)
- func (x *MonitoredResourceDescriptor) String() string
- type MonitoredResourceDescriptor_builder
- type MonitoredResourceMetadata
- func (x *MonitoredResourceMetadata) ClearSystemLabels()
- func (x *MonitoredResourceMetadata) GetSystemLabels() *structpb.Struct
- func (x *MonitoredResourceMetadata) GetUserLabels() map[string]string
- func (x *MonitoredResourceMetadata) HasSystemLabels() bool
- func (*MonitoredResourceMetadata) ProtoMessage()
- func (x *MonitoredResourceMetadata) ProtoReflect() protoreflect.Message
- func (x *MonitoredResourceMetadata) Reset()
- func (x *MonitoredResourceMetadata) SetSystemLabels(v *structpb.Struct)
- func (x *MonitoredResourceMetadata) SetUserLabels(v map[string]string)
- func (x *MonitoredResourceMetadata) String() string
- type MonitoredResourceMetadata_builder
- type MonitoredResource_builder
Constants ¶
This section is empty.
Variables ¶
var ( LabelDescriptor_ValueType_name = map[int32]string{ 0: "STRING", 1: "BOOL", 2: "INT64", } LabelDescriptor_ValueType_value = map[string]int32{ "STRING": 0, "BOOL": 1, "INT64": 2, } )
Enum value maps for LabelDescriptor_ValueType.
var File_google_api_label_proto protoreflect.FileDescriptor
var File_google_api_monitored_resource_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type LabelDescriptor ¶
type LabelDescriptor struct {
// The label key.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// The type of data that can be assigned to the label.
ValueType LabelDescriptor_ValueType `` /* 131-byte string literal not displayed */
// A human-readable description for the label.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
A description of a label.
func (*LabelDescriptor) GetDescription ¶
func (x *LabelDescriptor) GetDescription() string
func (*LabelDescriptor) GetKey ¶
func (x *LabelDescriptor) GetKey() string
func (*LabelDescriptor) GetValueType ¶
func (x *LabelDescriptor) GetValueType() LabelDescriptor_ValueType
func (*LabelDescriptor) ProtoMessage ¶
func (*LabelDescriptor) ProtoMessage()
func (*LabelDescriptor) ProtoReflect ¶
func (x *LabelDescriptor) ProtoReflect() protoreflect.Message
func (*LabelDescriptor) Reset ¶
func (x *LabelDescriptor) Reset()
func (*LabelDescriptor) SetDescription ¶
func (x *LabelDescriptor) SetDescription(v string)
func (*LabelDescriptor) SetKey ¶
func (x *LabelDescriptor) SetKey(v string)
func (*LabelDescriptor) SetValueType ¶
func (x *LabelDescriptor) SetValueType(v LabelDescriptor_ValueType)
func (*LabelDescriptor) String ¶
func (x *LabelDescriptor) String() string
type LabelDescriptor_ValueType ¶
type LabelDescriptor_ValueType int32
Value types that can be used as label values.
const ( // A variable-length string. This is the default. LabelDescriptor_STRING LabelDescriptor_ValueType = 0 // Boolean; true or false. LabelDescriptor_BOOL LabelDescriptor_ValueType = 1 // A 64-bit signed integer. LabelDescriptor_INT64 LabelDescriptor_ValueType = 2 )
func (LabelDescriptor_ValueType) Descriptor ¶
func (LabelDescriptor_ValueType) Descriptor() protoreflect.EnumDescriptor
func (LabelDescriptor_ValueType) Enum ¶
func (x LabelDescriptor_ValueType) Enum() *LabelDescriptor_ValueType
func (LabelDescriptor_ValueType) Number ¶
func (x LabelDescriptor_ValueType) Number() protoreflect.EnumNumber
func (LabelDescriptor_ValueType) String ¶
func (x LabelDescriptor_ValueType) String() string
func (LabelDescriptor_ValueType) Type ¶
func (LabelDescriptor_ValueType) Type() protoreflect.EnumType
type LabelDescriptor_builder ¶
type LabelDescriptor_builder struct {
// The label key.
Key string
// The type of data that can be assigned to the label.
ValueType LabelDescriptor_ValueType
// A human-readable description for the label.
Description string
// contains filtered or unexported fields
}
func (LabelDescriptor_builder) Build ¶
func (b0 LabelDescriptor_builder) Build() *LabelDescriptor
type MonitoredResource ¶
type MonitoredResource struct {
// Required. The monitored resource type. This field must match
// the `type` field of a
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
// object. For example, the type of a Compute Engine VM instance is
// `gce_instance`. Some descriptors include the service name in the type; for
// example, the type of a Datastream stream is
// `datastream.googleapis.com/Stream`.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Required. Values for all of the labels listed in the associated monitored
// resource descriptor. For example, Compute Engine VM instances use the
// labels `"project_id"`, `"instance_id"`, and `"zone"`.
Labels map[string]string `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor[google.api.MonitoredResourceDescriptor] object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor[google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels `"project_id"`, `"instance_id"` and `"zone"`:
{ "type": "gce_instance",
"labels": { "project_id": "my-project",
"instance_id": "12345678901234",
"zone": "us-central1-a" }}
func (*MonitoredResource) GetLabels ¶
func (x *MonitoredResource) GetLabels() map[string]string
func (*MonitoredResource) GetType ¶
func (x *MonitoredResource) GetType() string
func (*MonitoredResource) ProtoMessage ¶
func (*MonitoredResource) ProtoMessage()
func (*MonitoredResource) ProtoReflect ¶
func (x *MonitoredResource) ProtoReflect() protoreflect.Message
func (*MonitoredResource) Reset ¶
func (x *MonitoredResource) Reset()
func (*MonitoredResource) SetLabels ¶
func (x *MonitoredResource) SetLabels(v map[string]string)
func (*MonitoredResource) SetType ¶
func (x *MonitoredResource) SetType(v string)
func (*MonitoredResource) String ¶
func (x *MonitoredResource) String() string
type MonitoredResourceDescriptor ¶
type MonitoredResourceDescriptor struct {
// Optional. The resource name of the monitored resource descriptor:
// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
// {type} is the value of the `type` field in this object and
// {project_id} is a project ID that provides API-specific context for
// accessing the type. APIs that do not use project information can use the
// resource name format `"monitoredResourceDescriptors/{type}"`.
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
// Required. The monitored resource type. For example, the type
// `"cloudsql_database"` represents databases in Google Cloud SQL.
//
// For a list of types, see [Monitored resource
// types](https://cloud.google.com/monitoring/api/resources)
//
// and [Logging resource
// types](https://cloud.google.com/logging/docs/api/v2/resource-list).
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Optional. A concise name for the monitored resource type that might be
// displayed in user interfaces. It should be a Title Cased Noun Phrase,
// without any article or other determiners. For example,
// `"Google Cloud SQL Database"`.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Optional. A detailed description of the monitored resource type that might
// be used in documentation.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Required. A set of labels used to describe instances of this monitored
// resource type. For example, an individual Google Cloud SQL database is
// identified by values for the labels `"database_id"` and `"zone"`.
Labels []*LabelDescriptor `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
// Optional. The launch stage of the monitored resource definition.
LaunchStage api.LaunchStage `protobuf:"varint,7,opt,name=launch_stage,json=launchStage,proto3,enum=google.api.LaunchStage" json:"launch_stage,omitempty"`
// contains filtered or unexported fields
}
An object that describes the schema of a MonitoredResource[google.api.MonitoredResource] object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `"gce_instance"` and specifies the use of the labels `"instance_id"` and `"zone"` to identify particular VM instances.
Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API.
func (*MonitoredResourceDescriptor) GetDescription ¶
func (x *MonitoredResourceDescriptor) GetDescription() string
func (*MonitoredResourceDescriptor) GetDisplayName ¶
func (x *MonitoredResourceDescriptor) GetDisplayName() string
func (*MonitoredResourceDescriptor) GetLabels ¶
func (x *MonitoredResourceDescriptor) GetLabels() []*LabelDescriptor
func (*MonitoredResourceDescriptor) GetLaunchStage ¶
func (x *MonitoredResourceDescriptor) GetLaunchStage() api.LaunchStage
func (*MonitoredResourceDescriptor) GetName ¶
func (x *MonitoredResourceDescriptor) GetName() string
func (*MonitoredResourceDescriptor) GetType ¶
func (x *MonitoredResourceDescriptor) GetType() string
func (*MonitoredResourceDescriptor) ProtoMessage ¶
func (*MonitoredResourceDescriptor) ProtoMessage()
func (*MonitoredResourceDescriptor) ProtoReflect ¶
func (x *MonitoredResourceDescriptor) ProtoReflect() protoreflect.Message
func (*MonitoredResourceDescriptor) Reset ¶
func (x *MonitoredResourceDescriptor) Reset()
func (*MonitoredResourceDescriptor) SetDescription ¶
func (x *MonitoredResourceDescriptor) SetDescription(v string)
func (*MonitoredResourceDescriptor) SetDisplayName ¶
func (x *MonitoredResourceDescriptor) SetDisplayName(v string)
func (*MonitoredResourceDescriptor) SetLabels ¶
func (x *MonitoredResourceDescriptor) SetLabels(v []*LabelDescriptor)
func (*MonitoredResourceDescriptor) SetLaunchStage ¶
func (x *MonitoredResourceDescriptor) SetLaunchStage(v api.LaunchStage)
func (*MonitoredResourceDescriptor) SetName ¶
func (x *MonitoredResourceDescriptor) SetName(v string)
func (*MonitoredResourceDescriptor) SetType ¶
func (x *MonitoredResourceDescriptor) SetType(v string)
func (*MonitoredResourceDescriptor) String ¶
func (x *MonitoredResourceDescriptor) String() string
type MonitoredResourceDescriptor_builder ¶
type MonitoredResourceDescriptor_builder struct {
// Optional. The resource name of the monitored resource descriptor:
// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
// {type} is the value of the `type` field in this object and
// {project_id} is a project ID that provides API-specific context for
// accessing the type. APIs that do not use project information can use the
// resource name format `"monitoredResourceDescriptors/{type}"`.
Name string
// Required. The monitored resource type. For example, the type
// `"cloudsql_database"` represents databases in Google Cloud SQL.
//
// For a list of types, see [Monitored resource
// types](https://cloud.google.com/monitoring/api/resources)
//
// and [Logging resource
// types](https://cloud.google.com/logging/docs/api/v2/resource-list).
Type string
// Optional. A concise name for the monitored resource type that might be
// displayed in user interfaces. It should be a Title Cased Noun Phrase,
// without any article or other determiners. For example,
// `"Google Cloud SQL Database"`.
DisplayName string
// Optional. A detailed description of the monitored resource type that might
// be used in documentation.
Description string
// Required. A set of labels used to describe instances of this monitored
// resource type. For example, an individual Google Cloud SQL database is
// identified by values for the labels `"database_id"` and `"zone"`.
Labels []*LabelDescriptor
// Optional. The launch stage of the monitored resource definition.
LaunchStage api.LaunchStage
// contains filtered or unexported fields
}
func (MonitoredResourceDescriptor_builder) Build ¶
func (b0 MonitoredResourceDescriptor_builder) Build() *MonitoredResourceDescriptor
type MonitoredResourceMetadata ¶
type MonitoredResourceMetadata struct {
// Output only. Values for predefined system metadata labels.
// System labels are a kind of metadata extracted by Google, including
// "machine_image", "vpc", "subnet_id",
// "security_group", "name", etc.
// System label values can be only strings, Boolean values, or a list of
// strings. For example:
//
// { "name": "my-test-instance",
// "security_group": ["a", "b", "c"],
// "spot_instance": false }
SystemLabels *structpb.Struct `protobuf:"bytes,1,opt,name=system_labels,json=systemLabels,proto3" json:"system_labels,omitempty"`
// Output only. A map of user-defined metadata labels.
UserLabels map[string]string `` /* 165-byte string literal not displayed */
// contains filtered or unexported fields
}
Auxiliary metadata for a MonitoredResource[google.api.MonitoredResource] object. MonitoredResource[google.api.MonitoredResource] objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message.
func (*MonitoredResourceMetadata) ClearSystemLabels ¶
func (x *MonitoredResourceMetadata) ClearSystemLabels()
func (*MonitoredResourceMetadata) GetSystemLabels ¶
func (x *MonitoredResourceMetadata) GetSystemLabels() *structpb.Struct
func (*MonitoredResourceMetadata) GetUserLabels ¶
func (x *MonitoredResourceMetadata) GetUserLabels() map[string]string
func (*MonitoredResourceMetadata) HasSystemLabels ¶
func (x *MonitoredResourceMetadata) HasSystemLabels() bool
func (*MonitoredResourceMetadata) ProtoMessage ¶
func (*MonitoredResourceMetadata) ProtoMessage()
func (*MonitoredResourceMetadata) ProtoReflect ¶
func (x *MonitoredResourceMetadata) ProtoReflect() protoreflect.Message
func (*MonitoredResourceMetadata) Reset ¶
func (x *MonitoredResourceMetadata) Reset()
func (*MonitoredResourceMetadata) SetSystemLabels ¶
func (x *MonitoredResourceMetadata) SetSystemLabels(v *structpb.Struct)
func (*MonitoredResourceMetadata) SetUserLabels ¶
func (x *MonitoredResourceMetadata) SetUserLabels(v map[string]string)
func (*MonitoredResourceMetadata) String ¶
func (x *MonitoredResourceMetadata) String() string
type MonitoredResourceMetadata_builder ¶
type MonitoredResourceMetadata_builder struct {
// Output only. Values for predefined system metadata labels.
// System labels are a kind of metadata extracted by Google, including
// "machine_image", "vpc", "subnet_id",
// "security_group", "name", etc.
// System label values can be only strings, Boolean values, or a list of
// strings. For example:
//
// { "name": "my-test-instance",
// "security_group": ["a", "b", "c"],
// "spot_instance": false }
SystemLabels *structpb.Struct
// Output only. A map of user-defined metadata labels.
UserLabels map[string]string
// contains filtered or unexported fields
}
func (MonitoredResourceMetadata_builder) Build ¶
func (b0 MonitoredResourceMetadata_builder) Build() *MonitoredResourceMetadata
type MonitoredResource_builder ¶
type MonitoredResource_builder struct {
// Required. The monitored resource type. This field must match
// the `type` field of a
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
// object. For example, the type of a Compute Engine VM instance is
// `gce_instance`. Some descriptors include the service name in the type; for
// example, the type of a Datastream stream is
// `datastream.googleapis.com/Stream`.
Type string
// Required. Values for all of the labels listed in the associated monitored
// resource descriptor. For example, Compute Engine VM instances use the
// labels `"project_id"`, `"instance_id"`, and `"zone"`.
Labels map[string]string
// contains filtered or unexported fields
}
func (MonitoredResource_builder) Build ¶
func (b0 MonitoredResource_builder) Build() *MonitoredResource
Source Files
¶
- label.pb.go
- monitored_resource.pb.go