asset

package
v0.0.0-...-4ad9e85 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_google_cloud_asset_v1p1beta1_asset_service_proto protoreflect.FileDescriptor
View Source
var File_google_cloud_asset_v1p1beta1_assets_proto protoreflect.FileDescriptor

Functions

func RegisterAssetServiceServer

func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer)

Types

type AssetServiceClient

type AssetServiceClient interface {
	// Searches all the resources within a given accessible Resource Manager scope
	// (project/folder/organization). This RPC gives callers especially
	// administrators the ability to search all the resources within a scope, even
	// if they don't have `.get` permission of all the resources. Callers should
	// have `cloud.assets.SearchAllResources` permission on the requested scope,
	// otherwise the request will be rejected.
	SearchAllResources(ctx context.Context, in *SearchAllResourcesRequest, opts ...grpc.CallOption) (*SearchAllResourcesResponse, error)
	// Searches all the IAM policies within a given accessible Resource Manager
	// scope (project/folder/organization). This RPC gives callers especially
	// administrators the ability to search all the IAM policies within a scope,
	// even if they don't have `.getIamPolicy` permission of all the IAM policies.
	// Callers should have `cloud.assets.SearchAllIamPolicies` permission on the
	// requested scope, otherwise the request will be rejected.
	SearchAllIamPolicies(ctx context.Context, in *SearchAllIamPoliciesRequest, opts ...grpc.CallOption) (*SearchAllIamPoliciesResponse, error)
}

AssetServiceClient is the client API for AssetService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AssetServiceServer

type AssetServiceServer interface {
	// Searches all the resources within a given accessible Resource Manager scope
	// (project/folder/organization). This RPC gives callers especially
	// administrators the ability to search all the resources within a scope, even
	// if they don't have `.get` permission of all the resources. Callers should
	// have `cloud.assets.SearchAllResources` permission on the requested scope,
	// otherwise the request will be rejected.
	SearchAllResources(context.Context, *SearchAllResourcesRequest) (*SearchAllResourcesResponse, error)
	// Searches all the IAM policies within a given accessible Resource Manager
	// scope (project/folder/organization). This RPC gives callers especially
	// administrators the ability to search all the IAM policies within a scope,
	// even if they don't have `.getIamPolicy` permission of all the IAM policies.
	// Callers should have `cloud.assets.SearchAllIamPolicies` permission on the
	// requested scope, otherwise the request will be rejected.
	SearchAllIamPolicies(context.Context, *SearchAllIamPoliciesRequest) (*SearchAllIamPoliciesResponse, error)
}

AssetServiceServer is the server API for AssetService service.

type IamPolicySearchResult

type IamPolicySearchResult struct {

	// The
	// [full resource
	// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
	// of the resource associated with this IAM policy.
	Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// The project that the associated Google Cloud resource belongs to, in the
	// form of `projects/{project_number}`. If an IAM policy is set on a resource
	// -- such as a Compute Engine instance or a Cloud Storage bucket -- the
	// project field will indicate the project that contains the resource. If an
	// IAM policy is set on a folder or orgnization, the project field will be
	// empty.
	Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`
	// The IAM policy attached to the specified resource. Note that the original
	// IAM policy can contain multiple bindings. This only contains the bindings
	// that match the given query. For queries that don't contain a constraint on
	// policies (e.g. an empty query), this contains all the bindings.
	Policy *v1.Policy `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"`
	// Explanation about the IAM policy search result. It contains additional
	// information that explains why the search result matches the query.
	Explanation *IamPolicySearchResult_Explanation `protobuf:"bytes,5,opt,name=explanation,proto3" json:"explanation,omitempty"`
	// contains filtered or unexported fields
}

The result for an IAM policy search.

func (*IamPolicySearchResult) Descriptor deprecated

func (*IamPolicySearchResult) Descriptor() ([]byte, []int)

Deprecated: Use IamPolicySearchResult.ProtoReflect.Descriptor instead.

func (*IamPolicySearchResult) GetExplanation

func (*IamPolicySearchResult) GetPolicy

func (x *IamPolicySearchResult) GetPolicy() *v1.Policy

func (*IamPolicySearchResult) GetProject

func (x *IamPolicySearchResult) GetProject() string

func (*IamPolicySearchResult) GetResource

func (x *IamPolicySearchResult) GetResource() string

func (*IamPolicySearchResult) ProtoMessage

func (*IamPolicySearchResult) ProtoMessage()

func (*IamPolicySearchResult) ProtoReflect

func (x *IamPolicySearchResult) ProtoReflect() protoreflect.Message

func (*IamPolicySearchResult) Reset

func (x *IamPolicySearchResult) Reset()

func (*IamPolicySearchResult) String

func (x *IamPolicySearchResult) String() string

type IamPolicySearchResult_Explanation

type IamPolicySearchResult_Explanation struct {

	// The map from roles to their included permission matching the permission
	// query (e.g. containing `policy.role.permissions:`). Example role string:
	// "roles/compute.instanceAdmin". The roles can also be found in the
	// returned `policy` bindings. Note that the map is populated only if
	// requesting with a permission query.
	MatchedPermissions map[string]*Permissions `` /* 203-byte string literal not displayed */
	// contains filtered or unexported fields
}

Explanation about the IAM policy search result.

func (*IamPolicySearchResult_Explanation) Descriptor deprecated

func (*IamPolicySearchResult_Explanation) Descriptor() ([]byte, []int)

Deprecated: Use IamPolicySearchResult_Explanation.ProtoReflect.Descriptor instead.

func (*IamPolicySearchResult_Explanation) GetMatchedPermissions

func (x *IamPolicySearchResult_Explanation) GetMatchedPermissions() map[string]*Permissions

func (*IamPolicySearchResult_Explanation) ProtoMessage

func (*IamPolicySearchResult_Explanation) ProtoMessage()

func (*IamPolicySearchResult_Explanation) ProtoReflect

func (*IamPolicySearchResult_Explanation) Reset

func (*IamPolicySearchResult_Explanation) String

type Permissions

type Permissions struct {

	// A list of permissions. Example permission string: "compute.disk.get".
	Permissions []string `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// contains filtered or unexported fields
}

IAM permissions.

func (*Permissions) Descriptor deprecated

func (*Permissions) Descriptor() ([]byte, []int)

Deprecated: Use Permissions.ProtoReflect.Descriptor instead.

func (*Permissions) GetPermissions

func (x *Permissions) GetPermissions() []string

func (*Permissions) ProtoMessage

func (*Permissions) ProtoMessage()

func (*Permissions) ProtoReflect

func (x *Permissions) ProtoReflect() protoreflect.Message

func (*Permissions) Reset

func (x *Permissions) Reset()

func (*Permissions) String

func (x *Permissions) String() string

type SearchAllIamPoliciesRequest

type SearchAllIamPoliciesRequest struct {

	// Required. The relative name of an asset. The search is limited to the
	// resources within the `scope`. The allowed value must be:
	//
	// * Organization number (such as "organizations/123")
	// * Folder number (such as "folders/1234")
	// * Project number (such as "projects/12345")
	// * Project ID (such as "projects/abc")
	Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	// Optional. The query statement. Examples:
	//
	// * "policy:myuser@mydomain.com"
	// * "policy:(myuser@mydomain.com viewer)"
	Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// Optional. The page size for search result pagination. Page size is capped
	// at 500 even if a larger value is given. If set to zero, server will pick an
	// appropriate default. Returned results may be fewer than requested. When
	// this happens, there could be more results as long as `next_page_token` is
	// returned.
	PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. If present, retrieve the next batch of results from the preceding
	// call to this method. `page_token` must be the value of `next_page_token`
	// from the previous response. The values of all other method parameters must
	// be identical to those in the previous call.
	PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Search all IAM policies request.

func (*SearchAllIamPoliciesRequest) Descriptor deprecated

func (*SearchAllIamPoliciesRequest) Descriptor() ([]byte, []int)

Deprecated: Use SearchAllIamPoliciesRequest.ProtoReflect.Descriptor instead.

func (*SearchAllIamPoliciesRequest) GetPageSize

func (x *SearchAllIamPoliciesRequest) GetPageSize() int32

func (*SearchAllIamPoliciesRequest) GetPageToken

func (x *SearchAllIamPoliciesRequest) GetPageToken() string

func (*SearchAllIamPoliciesRequest) GetQuery

func (x *SearchAllIamPoliciesRequest) GetQuery() string

func (*SearchAllIamPoliciesRequest) GetScope

func (x *SearchAllIamPoliciesRequest) GetScope() string

func (*SearchAllIamPoliciesRequest) ProtoMessage

func (*SearchAllIamPoliciesRequest) ProtoMessage()

func (*SearchAllIamPoliciesRequest) ProtoReflect

func (*SearchAllIamPoliciesRequest) Reset

func (x *SearchAllIamPoliciesRequest) Reset()

func (*SearchAllIamPoliciesRequest) String

func (x *SearchAllIamPoliciesRequest) String() string

type SearchAllIamPoliciesResponse

type SearchAllIamPoliciesResponse struct {

	// A list of IAM policies that match the search query. Related information
	// such as the associated resource is returned along with the policy.
	Results []*IamPolicySearchResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// Set if there are more results than those appearing in this response; to get
	// the next set of results, call this method again, using this value as the
	// `page_token`.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Search all IAM policies response.

func (*SearchAllIamPoliciesResponse) Descriptor deprecated

func (*SearchAllIamPoliciesResponse) Descriptor() ([]byte, []int)

Deprecated: Use SearchAllIamPoliciesResponse.ProtoReflect.Descriptor instead.

func (*SearchAllIamPoliciesResponse) GetNextPageToken

func (x *SearchAllIamPoliciesResponse) GetNextPageToken() string

func (*SearchAllIamPoliciesResponse) GetResults

func (*SearchAllIamPoliciesResponse) ProtoMessage

func (*SearchAllIamPoliciesResponse) ProtoMessage()

func (*SearchAllIamPoliciesResponse) ProtoReflect

func (*SearchAllIamPoliciesResponse) Reset

func (x *SearchAllIamPoliciesResponse) Reset()

func (*SearchAllIamPoliciesResponse) String

type SearchAllResourcesRequest

type SearchAllResourcesRequest struct {

	// Required. The relative name of an asset. The search is limited to the
	// resources within the `scope`. The allowed value must be:
	//
	// * Organization number (such as "organizations/123")
	// * Folder number (such as "folders/1234")
	// * Project number (such as "projects/12345")
	// * Project ID (such as "projects/abc")
	Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	// Optional. The query statement.
	Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// Optional. A list of asset types that this request searches for. If empty,
	// it will search all the supported asset types.
	AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
	// Optional. The page size for search result pagination. Page size is capped
	// at 500 even if a larger value is given. If set to zero, server will pick an
	// appropriate default. Returned results may be fewer than requested. When
	// this happens, there could be more results as long as `next_page_token` is
	// returned.
	PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. If present, then retrieve the next batch of results from the
	// preceding call to this method.  `page_token` must be the value of
	// `next_page_token` from the previous response. The values of all other
	// method parameters, must be identical to those in the previous call.
	PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// Optional. A comma separated list of fields specifying the sorting order of
	// the results. The default order is ascending. Add ` DESC` after the field
	// name to indicate descending order. Redundant space characters are ignored.
	// For example, `  location DESC ,  name  `.
	OrderBy string `protobuf:"bytes,10,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	// contains filtered or unexported fields
}

Search all resources request.

func (*SearchAllResourcesRequest) Descriptor deprecated

func (*SearchAllResourcesRequest) Descriptor() ([]byte, []int)

Deprecated: Use SearchAllResourcesRequest.ProtoReflect.Descriptor instead.

func (*SearchAllResourcesRequest) GetAssetTypes

func (x *SearchAllResourcesRequest) GetAssetTypes() []string

func (*SearchAllResourcesRequest) GetOrderBy

func (x *SearchAllResourcesRequest) GetOrderBy() string

func (*SearchAllResourcesRequest) GetPageSize

func (x *SearchAllResourcesRequest) GetPageSize() int32

func (*SearchAllResourcesRequest) GetPageToken

func (x *SearchAllResourcesRequest) GetPageToken() string

func (*SearchAllResourcesRequest) GetQuery

func (x *SearchAllResourcesRequest) GetQuery() string

func (*SearchAllResourcesRequest) GetScope

func (x *SearchAllResourcesRequest) GetScope() string

func (*SearchAllResourcesRequest) ProtoMessage

func (*SearchAllResourcesRequest) ProtoMessage()

func (*SearchAllResourcesRequest) ProtoReflect

func (*SearchAllResourcesRequest) Reset

func (x *SearchAllResourcesRequest) Reset()

func (*SearchAllResourcesRequest) String

func (x *SearchAllResourcesRequest) String() string

type SearchAllResourcesResponse

type SearchAllResourcesResponse struct {

	// A list of resource that match the search query.
	Results []*StandardResourceMetadata `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// If there are more results than those appearing in this response, then
	// `next_page_token` is included.  To get the next set of results, call this
	// method again using the value of `next_page_token` as `page_token`.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Search all resources response.

func (*SearchAllResourcesResponse) Descriptor deprecated

func (*SearchAllResourcesResponse) Descriptor() ([]byte, []int)

Deprecated: Use SearchAllResourcesResponse.ProtoReflect.Descriptor instead.

func (*SearchAllResourcesResponse) GetNextPageToken

func (x *SearchAllResourcesResponse) GetNextPageToken() string

func (*SearchAllResourcesResponse) GetResults

func (*SearchAllResourcesResponse) ProtoMessage

func (*SearchAllResourcesResponse) ProtoMessage()

func (*SearchAllResourcesResponse) ProtoReflect

func (*SearchAllResourcesResponse) Reset

func (x *SearchAllResourcesResponse) Reset()

func (*SearchAllResourcesResponse) String

func (x *SearchAllResourcesResponse) String() string

type StandardResourceMetadata

type StandardResourceMetadata struct {

	// The full resource name. For example:
	// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
	// See [Resource
	// Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
	// for more information.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The type of this resource.
	// For example: "compute.googleapis.com/Disk".
	AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"`
	// The project that this resource belongs to, in the form of
	// `projects/{project_number}`.
	Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`
	// The display name of this resource.
	DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// One or more paragraphs of text description of this resource. Maximum length
	// could be up to 1M bytes.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// Additional searchable attributes of this resource.
	// Informational only. The exact set of attributes is subject to change.
	// For example: project id, DNS name etc.
	AdditionalAttributes []string `protobuf:"bytes,10,rep,name=additional_attributes,json=additionalAttributes,proto3" json:"additional_attributes,omitempty"`
	// Location can be "global", regional like "us-east1", or zonal like
	// "us-west1-b".
	Location string `protobuf:"bytes,11,opt,name=location,proto3" json:"location,omitempty"`
	// Labels associated with this resource. See [Labelling and grouping Google
	// Cloud
	// resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
	// for more information.
	Labels map[string]string `` /* 154-byte string literal not displayed */
	// Network tags associated with this resource. Like labels, network tags are a
	// type of annotations used to group Google Cloud resources. See [Labelling
	// Google Cloud
	// resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
	// for more information.
	NetworkTags []string `protobuf:"bytes,13,rep,name=network_tags,json=networkTags,proto3" json:"network_tags,omitempty"`
	// contains filtered or unexported fields
}

The standard metadata of a cloud resource.

func (*StandardResourceMetadata) Descriptor deprecated

func (*StandardResourceMetadata) Descriptor() ([]byte, []int)

Deprecated: Use StandardResourceMetadata.ProtoReflect.Descriptor instead.

func (*StandardResourceMetadata) GetAdditionalAttributes

func (x *StandardResourceMetadata) GetAdditionalAttributes() []string

func (*StandardResourceMetadata) GetAssetType

func (x *StandardResourceMetadata) GetAssetType() string

func (*StandardResourceMetadata) GetDescription

func (x *StandardResourceMetadata) GetDescription() string

func (*StandardResourceMetadata) GetDisplayName

func (x *StandardResourceMetadata) GetDisplayName() string

func (*StandardResourceMetadata) GetLabels

func (x *StandardResourceMetadata) GetLabels() map[string]string

func (*StandardResourceMetadata) GetLocation

func (x *StandardResourceMetadata) GetLocation() string

func (*StandardResourceMetadata) GetName

func (x *StandardResourceMetadata) GetName() string

func (*StandardResourceMetadata) GetNetworkTags

func (x *StandardResourceMetadata) GetNetworkTags() []string

func (*StandardResourceMetadata) GetProject

func (x *StandardResourceMetadata) GetProject() string

func (*StandardResourceMetadata) ProtoMessage

func (*StandardResourceMetadata) ProtoMessage()

func (*StandardResourceMetadata) ProtoReflect

func (x *StandardResourceMetadata) ProtoReflect() protoreflect.Message

func (*StandardResourceMetadata) Reset

func (x *StandardResourceMetadata) Reset()

func (*StandardResourceMetadata) String

func (x *StandardResourceMetadata) String() string

type UnimplementedAssetServiceServer

type UnimplementedAssetServiceServer struct {
}

UnimplementedAssetServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAssetServiceServer) SearchAllIamPolicies

func (*UnimplementedAssetServiceServer) SearchAllResources

Jump to

Keyboard shortcuts

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