genproto: google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1 Index | Files

package asset

import "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1"

Index

Package Files

asset_service.pb.go assets.pb.go

Variables

var (
    ContentType_name = map[int32]string{
        0:  "CONTENT_TYPE_UNSPECIFIED",
        1:  "RESOURCE",
        2:  "IAM_POLICY",
        4:  "ORG_POLICY",
        5:  "ACCESS_POLICY",
    }
    ContentType_value = map[string]int32{
        "CONTENT_TYPE_UNSPECIFIED": 0,
        "RESOURCE":                 1,
        "IAM_POLICY":               2,
        "ORG_POLICY":               4,
        "ACCESS_POLICY":            5,
    }
)

Enum value maps for ContentType.

var File_google_cloud_asset_v1p5beta1_asset_service_proto protoreflect.FileDescriptor
var File_google_cloud_asset_v1p5beta1_assets_proto protoreflect.FileDescriptor

func RegisterAssetServiceServer Uses

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

type Asset Uses

type Asset struct {

    // The full name of the asset. 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"`
    // Type of the asset. Example: "compute.googleapis.com/Disk".
    AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"`
    // Representation of the resource.
    Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
    // Representation of the actual Cloud IAM policy set on a cloud resource. For
    // each resource, there must be at most one Cloud IAM policy set on it.
    IamPolicy *v1.Policy `protobuf:"bytes,4,opt,name=iam_policy,json=iamPolicy,proto3" json:"iam_policy,omitempty"`
    // Representation of the Cloud Organization Policy set on an asset. For each
    // asset, there could be multiple Organization policies with different
    // constraints.
    OrgPolicy []*v11.Policy `protobuf:"bytes,6,rep,name=org_policy,json=orgPolicy,proto3" json:"org_policy,omitempty"`
    // Representation of the Cloud Organization access policy.
    //
    // Types that are assignable to AccessContextPolicy:
    //	*Asset_AccessPolicy
    //	*Asset_AccessLevel
    //	*Asset_ServicePerimeter
    AccessContextPolicy isAsset_AccessContextPolicy `protobuf_oneof:"access_context_policy"`
    // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    // represented as a list of relative resource names. Ancestry path starts with
    // the closest CRM ancestor and ends at root. If the asset is a CRM
    // project/folder/organization, this starts from the asset itself.
    //
    // Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    Ancestors []string `protobuf:"bytes,10,rep,name=ancestors,proto3" json:"ancestors,omitempty"`
    // contains filtered or unexported fields
}

Cloud asset. This includes all Google Cloud Platform resources, Cloud IAM policies, and other non-GCP assets.

func (*Asset) Descriptor Uses

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

Deprecated: Use Asset.ProtoReflect.Descriptor instead.

func (*Asset) GetAccessContextPolicy Uses

func (m *Asset) GetAccessContextPolicy() isAsset_AccessContextPolicy

func (*Asset) GetAccessLevel Uses

func (x *Asset) GetAccessLevel() *v12.AccessLevel

func (*Asset) GetAccessPolicy Uses

func (x *Asset) GetAccessPolicy() *v12.AccessPolicy

func (*Asset) GetAncestors Uses

func (x *Asset) GetAncestors() []string

func (*Asset) GetAssetType Uses

func (x *Asset) GetAssetType() string

func (*Asset) GetIamPolicy Uses

func (x *Asset) GetIamPolicy() *v1.Policy

func (*Asset) GetName Uses

func (x *Asset) GetName() string

func (*Asset) GetOrgPolicy Uses

func (x *Asset) GetOrgPolicy() []*v11.Policy

func (*Asset) GetResource Uses

func (x *Asset) GetResource() *Resource

func (*Asset) GetServicePerimeter Uses

func (x *Asset) GetServicePerimeter() *v12.ServicePerimeter

func (*Asset) ProtoMessage Uses

func (*Asset) ProtoMessage()

func (*Asset) ProtoReflect Uses

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

func (*Asset) Reset Uses

func (x *Asset) Reset()

func (*Asset) String Uses

func (x *Asset) String() string

type AssetServiceClient Uses

type AssetServiceClient interface {
    // Lists assets with time and resource types and returns paged results in
    // response.
    ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, 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.

func NewAssetServiceClient Uses

func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient

type AssetServiceServer Uses

type AssetServiceServer interface {
    // Lists assets with time and resource types and returns paged results in
    // response.
    ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error)
}

AssetServiceServer is the server API for AssetService service.

type Asset_AccessLevel Uses

type Asset_AccessLevel struct {
    AccessLevel *v12.AccessLevel `protobuf:"bytes,8,opt,name=access_level,json=accessLevel,proto3,oneof"`
}

type Asset_AccessPolicy Uses

type Asset_AccessPolicy struct {
    AccessPolicy *v12.AccessPolicy `protobuf:"bytes,7,opt,name=access_policy,json=accessPolicy,proto3,oneof"`
}

type Asset_ServicePerimeter Uses

type Asset_ServicePerimeter struct {
    ServicePerimeter *v12.ServicePerimeter `protobuf:"bytes,9,opt,name=service_perimeter,json=servicePerimeter,proto3,oneof"`
}

type ContentType Uses

type ContentType int32

Asset content type.

const (
    // Unspecified content type.
    ContentType_CONTENT_TYPE_UNSPECIFIED ContentType = 0
    // Resource metadata.
    ContentType_RESOURCE ContentType = 1
    // The actual IAM policy set on a resource.
    ContentType_IAM_POLICY ContentType = 2
    // The Cloud Organization Policy set on an asset.
    ContentType_ORG_POLICY ContentType = 4
    // The Cloud Access context mananger Policy set on an asset.
    ContentType_ACCESS_POLICY ContentType = 5
)

func (ContentType) Descriptor Uses

func (ContentType) Descriptor() protoreflect.EnumDescriptor

func (ContentType) Enum Uses

func (x ContentType) Enum() *ContentType

func (ContentType) EnumDescriptor Uses

func (ContentType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContentType.Descriptor instead.

func (ContentType) Number Uses

func (x ContentType) Number() protoreflect.EnumNumber

func (ContentType) String Uses

func (x ContentType) String() string

func (ContentType) Type Uses

func (ContentType) Type() protoreflect.EnumType

type ListAssetsRequest Uses

type ListAssetsRequest struct {

    // Required. Name of the organization or project the assets belong to. Format:
    // "organizations/[organization-number]" (such as "organizations/123"),
    // "projects/[project-number]" (such as "projects/my-project-id"), or
    // "projects/[project-id]" (such as "projects/12345").
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // Timestamp to take an asset snapshot. This can only be set to a timestamp
    // between 2018-10-02 UTC (inclusive) and the current time. If not specified,
    // the current time will be used. Due to delays in resource data collection
    // and indexing, there is a volatile window during which running the same
    // query may get different results.
    ReadTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
    // A list of asset types of which to take a snapshot for. For  example:
    // "compute.googleapis.com/Disk". If specified, only matching assets will be
    // returned. See [Introduction to Cloud Asset
    // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
    // for all supported asset types.
    AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
    // Asset content type. If not specified, no content but the asset name will
    // be returned.
    ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1p5beta1.ContentType" json:"content_type,omitempty"`
    // The maximum number of assets to be returned in a single response. Default
    // is 100, minimum is 1, and maximum is 1000.
    PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
    // The `next_page_token` returned from the previous `ListAssetsResponse`, or
    // unspecified for the first `ListAssetsRequest`. It is a continuation of a
    // prior `ListAssets` call, and the API should return the next page of assets.
    PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
    // contains filtered or unexported fields
}

ListAssets request.

func (*ListAssetsRequest) Descriptor Uses

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

Deprecated: Use ListAssetsRequest.ProtoReflect.Descriptor instead.

func (*ListAssetsRequest) GetAssetTypes Uses

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

func (*ListAssetsRequest) GetContentType Uses

func (x *ListAssetsRequest) GetContentType() ContentType

func (*ListAssetsRequest) GetPageSize Uses

func (x *ListAssetsRequest) GetPageSize() int32

func (*ListAssetsRequest) GetPageToken Uses

func (x *ListAssetsRequest) GetPageToken() string

func (*ListAssetsRequest) GetParent Uses

func (x *ListAssetsRequest) GetParent() string

func (*ListAssetsRequest) GetReadTime Uses

func (x *ListAssetsRequest) GetReadTime() *timestamppb.Timestamp

func (*ListAssetsRequest) ProtoMessage Uses

func (*ListAssetsRequest) ProtoMessage()

func (*ListAssetsRequest) ProtoReflect Uses

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

func (*ListAssetsRequest) Reset Uses

func (x *ListAssetsRequest) Reset()

func (*ListAssetsRequest) String Uses

func (x *ListAssetsRequest) String() string

type ListAssetsResponse Uses

type ListAssetsResponse struct {

    // Time the snapshot was taken.
    ReadTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
    // Assets.
    Assets []*Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty"`
    // Token to retrieve the next page of results. Set to empty if there are no
    // remaining results.
    NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
    // contains filtered or unexported fields
}

ListAssets response.

func (*ListAssetsResponse) Descriptor Uses

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

Deprecated: Use ListAssetsResponse.ProtoReflect.Descriptor instead.

func (*ListAssetsResponse) GetAssets Uses

func (x *ListAssetsResponse) GetAssets() []*Asset

func (*ListAssetsResponse) GetNextPageToken Uses

func (x *ListAssetsResponse) GetNextPageToken() string

func (*ListAssetsResponse) GetReadTime Uses

func (x *ListAssetsResponse) GetReadTime() *timestamppb.Timestamp

func (*ListAssetsResponse) ProtoMessage Uses

func (*ListAssetsResponse) ProtoMessage()

func (*ListAssetsResponse) ProtoReflect Uses

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

func (*ListAssetsResponse) Reset Uses

func (x *ListAssetsResponse) Reset()

func (*ListAssetsResponse) String Uses

func (x *ListAssetsResponse) String() string

type Resource Uses

type Resource struct {

    // The API version. Example: "v1".
    Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
    // The URL of the discovery document containing the resource's JSON schema.
    // For example:
    // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
    // It will be left unspecified for resources without a discovery-based API,
    // such as Cloud Bigtable.
    DiscoveryDocumentUri string `protobuf:"bytes,2,opt,name=discovery_document_uri,json=discoveryDocumentUri,proto3" json:"discovery_document_uri,omitempty"`
    // The JSON schema name listed in the discovery document.
    // Example: "Project". It will be left unspecified for resources (such as
    // Cloud Bigtable) without a discovery-based API.
    DiscoveryName string `protobuf:"bytes,3,opt,name=discovery_name,json=discoveryName,proto3" json:"discovery_name,omitempty"`
    // The REST URL for accessing the resource. An HTTP GET operation using this
    // URL returns the resource itself.
    // Example:
    // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
    // It will be left unspecified for resources without a REST API.
    ResourceUrl string `protobuf:"bytes,4,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"`
    // The full name of the immediate parent of this resource. See
    // [Resource
    // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
    // for more information.
    //
    // For GCP assets, it is the parent resource defined in the [Cloud IAM policy
    // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
    // For example:
    // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
    //
    // For third-party assets, it is up to the users to define.
    Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"`
    // The content of the resource, in which some sensitive fields are scrubbed
    // away and may not be present.
    Data *structpb.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
    // contains filtered or unexported fields
}

Representation of a cloud resource.

func (*Resource) Descriptor Uses

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetData Uses

func (x *Resource) GetData() *structpb.Struct

func (*Resource) GetDiscoveryDocumentUri Uses

func (x *Resource) GetDiscoveryDocumentUri() string

func (*Resource) GetDiscoveryName Uses

func (x *Resource) GetDiscoveryName() string

func (*Resource) GetParent Uses

func (x *Resource) GetParent() string

func (*Resource) GetResourceUrl Uses

func (x *Resource) GetResourceUrl() string

func (*Resource) GetVersion Uses

func (x *Resource) GetVersion() string

func (*Resource) ProtoMessage Uses

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect Uses

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

func (*Resource) Reset Uses

func (x *Resource) Reset()

func (*Resource) String Uses

func (x *Resource) String() string

type UnimplementedAssetServiceServer Uses

type UnimplementedAssetServiceServer struct {
}

UnimplementedAssetServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAssetServiceServer) ListAssets Uses

func (*UnimplementedAssetServiceServer) ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error)

Package asset imports 16 packages (graph) and is imported by 1 packages. Updated 2020-09-14. Refresh now. Tools for package owners.