var File_google_cloud_asset_v1p1beta1_asset_service_proto protoreflect.FileDescriptor
var File_google_cloud_asset_v1p1beta1_assets_proto protoreflect.FileDescriptor
func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer)
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 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) }
func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient
AssetServiceServer is the server API for AssetService service.
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) }
The result for an IAM policy search.
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 }
func (*IamPolicySearchResult) Descriptor() ([]byte, []int)
Deprecated: Use IamPolicySearchResult.ProtoReflect.Descriptor instead.
func (x *IamPolicySearchResult) GetExplanation() *IamPolicySearchResult_Explanation
func (x *IamPolicySearchResult) GetPolicy() *v1.Policy
func (x *IamPolicySearchResult) GetProject() string
func (x *IamPolicySearchResult) GetResource() string
func (*IamPolicySearchResult) ProtoMessage()
func (x *IamPolicySearchResult) ProtoReflect() protoreflect.Message
func (x *IamPolicySearchResult) Reset()
func (x *IamPolicySearchResult) String() string
Explanation about the IAM policy search result.
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 `protobuf:"bytes,1,rep,name=matched_permissions,json=matchedPermissions,proto3" json:"matched_permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // contains filtered or unexported fields }
func (*IamPolicySearchResult_Explanation) Descriptor() ([]byte, []int)
Deprecated: Use IamPolicySearchResult_Explanation.ProtoReflect.Descriptor instead.
func (x *IamPolicySearchResult_Explanation) GetMatchedPermissions() map[string]*Permissions
func (*IamPolicySearchResult_Explanation) ProtoMessage()
func (x *IamPolicySearchResult_Explanation) ProtoReflect() protoreflect.Message
func (x *IamPolicySearchResult_Explanation) Reset()
func (x *IamPolicySearchResult_Explanation) String() string
IAM 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 }
func (*Permissions) Descriptor() ([]byte, []int)
Deprecated: Use Permissions.ProtoReflect.Descriptor instead.
func (x *Permissions) GetPermissions() []string
func (*Permissions) ProtoMessage()
func (x *Permissions) ProtoReflect() protoreflect.Message
func (x *Permissions) Reset()
func (x *Permissions) String() string
Search all IAM policies request.
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 }
func (*SearchAllIamPoliciesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchAllIamPoliciesRequest.ProtoReflect.Descriptor instead.
func (x *SearchAllIamPoliciesRequest) GetPageSize() int32
func (x *SearchAllIamPoliciesRequest) GetPageToken() string
func (x *SearchAllIamPoliciesRequest) GetQuery() string
func (x *SearchAllIamPoliciesRequest) GetScope() string
func (*SearchAllIamPoliciesRequest) ProtoMessage()
func (x *SearchAllIamPoliciesRequest) ProtoReflect() protoreflect.Message
func (x *SearchAllIamPoliciesRequest) Reset()
func (x *SearchAllIamPoliciesRequest) String() string
Search all IAM policies response.
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 }
func (*SearchAllIamPoliciesResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchAllIamPoliciesResponse.ProtoReflect.Descriptor instead.
func (x *SearchAllIamPoliciesResponse) GetNextPageToken() string
func (x *SearchAllIamPoliciesResponse) GetResults() []*IamPolicySearchResult
func (*SearchAllIamPoliciesResponse) ProtoMessage()
func (x *SearchAllIamPoliciesResponse) ProtoReflect() protoreflect.Message
func (x *SearchAllIamPoliciesResponse) Reset()
func (x *SearchAllIamPoliciesResponse) String() string
Search all resources request.
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 }
func (*SearchAllResourcesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchAllResourcesRequest.ProtoReflect.Descriptor instead.
func (x *SearchAllResourcesRequest) GetAssetTypes() []string
func (x *SearchAllResourcesRequest) GetOrderBy() string
func (x *SearchAllResourcesRequest) GetPageSize() int32
func (x *SearchAllResourcesRequest) GetPageToken() string
func (x *SearchAllResourcesRequest) GetQuery() string
func (x *SearchAllResourcesRequest) GetScope() string
func (*SearchAllResourcesRequest) ProtoMessage()
func (x *SearchAllResourcesRequest) ProtoReflect() protoreflect.Message
func (x *SearchAllResourcesRequest) Reset()
func (x *SearchAllResourcesRequest) String() string
Search all resources response.
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 }
func (*SearchAllResourcesResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchAllResourcesResponse.ProtoReflect.Descriptor instead.
func (x *SearchAllResourcesResponse) GetNextPageToken() string
func (x *SearchAllResourcesResponse) GetResults() []*StandardResourceMetadata
func (*SearchAllResourcesResponse) ProtoMessage()
func (x *SearchAllResourcesResponse) ProtoReflect() protoreflect.Message
func (x *SearchAllResourcesResponse) Reset()
func (x *SearchAllResourcesResponse) String() string
The standard metadata of a cloud resource.
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 `protobuf:"bytes,12,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 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 }
func (*StandardResourceMetadata) Descriptor() ([]byte, []int)
Deprecated: Use StandardResourceMetadata.ProtoReflect.Descriptor instead.
func (x *StandardResourceMetadata) GetAdditionalAttributes() []string
func (x *StandardResourceMetadata) GetAssetType() string
func (x *StandardResourceMetadata) GetDescription() string
func (x *StandardResourceMetadata) GetDisplayName() string
func (x *StandardResourceMetadata) GetLabels() map[string]string
func (x *StandardResourceMetadata) GetLocation() string
func (x *StandardResourceMetadata) GetName() string
func (x *StandardResourceMetadata) GetNetworkTags() []string
func (x *StandardResourceMetadata) GetProject() string
func (*StandardResourceMetadata) ProtoMessage()
func (x *StandardResourceMetadata) ProtoReflect() protoreflect.Message
func (x *StandardResourceMetadata) Reset()
func (x *StandardResourceMetadata) String() string
UnimplementedAssetServiceServer can be embedded to have forward compatible implementations.
type UnimplementedAssetServiceServer struct { }
func (*UnimplementedAssetServiceServer) SearchAllIamPolicies(context.Context, *SearchAllIamPoliciesRequest) (*SearchAllIamPoliciesResponse, error)
func (*UnimplementedAssetServiceServer) SearchAllResources(context.Context, *SearchAllResourcesRequest) (*SearchAllResourcesResponse, error)