Variables
ContentType_name, ContentType_value
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.
File_google_cloud_asset_v1p5beta1_asset_service_proto
var
File_google_cloud_asset_v1p5beta1_asset_service_proto
protoreflect
.
FileDescriptor
File_google_cloud_asset_v1p5beta1_assets_proto
var
File_google_cloud_asset_v1p5beta1_assets_proto
protoreflect
.
FileDescriptor
Functions
func RegisterAssetServiceServer
func
RegisterAssetServiceServer
(
s
*
grpc
.
Server
,
srv
AssetServiceServer
)
Asset
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
Deprecated: Use Asset.ProtoReflect.Descriptor instead.
func (*Asset) GetAccessContextPolicy
func
(
m
*
Asset
)
GetAccessContextPolicy
()
isAsset_AccessContextPolicy
func (*Asset) GetAccessLevel
func
(
x
*
Asset
)
GetAccessLevel
()
*
v12
.
AccessLevel
func (*Asset) GetAccessPolicy
func
(
x
*
Asset
)
GetAccessPolicy
()
*
v12
.
AccessPolicy
func (*Asset) GetAncestors
func (*Asset) GetAssetType
func (*Asset) GetIamPolicy
func (*Asset) GetName
func (*Asset) GetOrgPolicy
func (*Asset) GetResource
func (*Asset) GetServicePerimeter
func
(
x
*
Asset
)
GetServicePerimeter
()
*
v12
.
ServicePerimeter
func (*Asset) ProtoMessage
func
(
*
Asset
)
ProtoMessage
()
func (*Asset) ProtoReflect
func
(
x
*
Asset
)
ProtoReflect
()
protoreflect
.
Message
func (*Asset) Reset
func
(
x
*
Asset
)
Reset
()
func (*Asset) String
AssetServiceClient
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
func
NewAssetServiceClient
(
cc
grpc
.
ClientConnInterface
)
AssetServiceClient
AssetServiceServer
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.
Asset_AccessLevel
type
Asset_AccessLevel
struct
{
AccessLevel
*
v12
.
AccessLevel
`protobuf:"bytes,8,opt,name=access_level,json=accessLevel,proto3,oneof"`
}
Asset_AccessPolicy
type
Asset_AccessPolicy
struct
{
AccessPolicy
*
v12
.
AccessPolicy
`protobuf:"bytes,7,opt,name=access_policy,json=accessPolicy,proto3,oneof"`
}
Asset_ServicePerimeter
type
Asset_ServicePerimeter
struct
{
ServicePerimeter
*
v12
.
ServicePerimeter
`protobuf:"bytes,9,opt,name=service_perimeter,json=servicePerimeter,proto3,oneof"`
}
ContentType
type
ContentType
int32
Asset content type.
ContentType_CONTENT_TYPE_UNSPECIFIED, ContentType_RESOURCE, ContentType_IAM_POLICY, ContentType_ORG_POLICY, ContentType_ACCESS_POLICY
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
func
(
ContentType
)
Descriptor
()
protoreflect
.
EnumDescriptor
func (ContentType) Enum
func
(
x
ContentType
)
Enum
()
*
ContentType
func (ContentType) EnumDescriptor
func
(
ContentType
)
EnumDescriptor
()
([]
byte
,
[]
int
)
Deprecated: Use ContentType.Descriptor instead.
func (ContentType) Number
func
(
x
ContentType
)
Number
()
protoreflect
.
EnumNumber
func (ContentType) String
func
(
x
ContentType
)
String
()
string
func (ContentType) Type
func
(
ContentType
)
Type
()
protoreflect
.
EnumType
ListAssetsRequest
type
ListAssetsRequest
struct
{
Parent
string
`protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
ReadTime
*
timestamp
.
Timestamp
`protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
AssetTypes
[]
string
`protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
ContentType
ContentType
""
/* 141 byte string literal not displayed */
PageSize
int32
`protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
PageToken
string
`protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
}
ListAssets request.
func (*ListAssetsRequest) Descriptor
func
(
*
ListAssetsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use ListAssetsRequest.ProtoReflect.Descriptor instead.
func (*ListAssetsRequest) GetAssetTypes
func
(
x
*
ListAssetsRequest
)
GetAssetTypes
()
[]
string
func (*ListAssetsRequest) GetContentType
func
(
x
*
ListAssetsRequest
)
GetContentType
()
ContentType
func (*ListAssetsRequest) GetPageSize
func
(
x
*
ListAssetsRequest
)
GetPageSize
()
int32
func (*ListAssetsRequest) GetPageToken
func
(
x
*
ListAssetsRequest
)
GetPageToken
()
string
func (*ListAssetsRequest) GetParent
func
(
x
*
ListAssetsRequest
)
GetParent
()
string
func (*ListAssetsRequest) GetReadTime
func
(
x
*
ListAssetsRequest
)
GetReadTime
()
*
timestamp
.
Timestamp
func (*ListAssetsRequest) ProtoMessage
func
(
*
ListAssetsRequest
)
ProtoMessage
()
func (*ListAssetsRequest) ProtoReflect
func
(
x
*
ListAssetsRequest
)
ProtoReflect
()
protoreflect
.
Message
func (*ListAssetsRequest) Reset
func
(
x
*
ListAssetsRequest
)
Reset
()
func (*ListAssetsRequest) String
func
(
x
*
ListAssetsRequest
)
String
()
string
ListAssetsResponse
type
ListAssetsResponse
struct
{
// Time the snapshot was taken.
ReadTime
*
timestamp
.
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
func
(
*
ListAssetsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use ListAssetsResponse.ProtoReflect.Descriptor instead.
func (*ListAssetsResponse) GetAssets
func
(
x
*
ListAssetsResponse
)
GetAssets
()
[]
*
Asset
func (*ListAssetsResponse) GetNextPageToken
func
(
x
*
ListAssetsResponse
)
GetNextPageToken
()
string
func (*ListAssetsResponse) GetReadTime
func
(
x
*
ListAssetsResponse
)
GetReadTime
()
*
timestamp
.
Timestamp
func (*ListAssetsResponse) ProtoMessage
func
(
*
ListAssetsResponse
)
ProtoMessage
()
func (*ListAssetsResponse) ProtoReflect
func
(
x
*
ListAssetsResponse
)
ProtoReflect
()
protoreflect
.
Message
func (*ListAssetsResponse) Reset
func
(
x
*
ListAssetsResponse
)
Reset
()
func (*ListAssetsResponse) String
func
(
x
*
ListAssetsResponse
)
String
()
string
Resource
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
*
_struct
.
Struct
`protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
Representation of a cloud resource.
func (*Resource) Descriptor
Deprecated: Use Resource.ProtoReflect.Descriptor instead.
func (*Resource) GetData
func (*Resource) GetDiscoveryDocumentUri
func (*Resource) GetDiscoveryName
func (*Resource) GetParent
func (*Resource) GetResourceUrl
func (*Resource) GetVersion
func (*Resource) ProtoMessage
func
(
*
Resource
)
ProtoMessage
()
func (*Resource) ProtoReflect
func
(
x
*
Resource
)
ProtoReflect
()
protoreflect
.
Message
func (*Resource) Reset
func
(
x
*
Resource
)
Reset
()
func (*Resource) String
UnimplementedAssetServiceServer
type
UnimplementedAssetServiceServer
struct
{
}
UnimplementedAssetServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAssetServiceServer) ListAssets
func
(
*
UnimplementedAssetServiceServer
)
ListAssets
(
context
.
Context
,
*
ListAssetsRequest
)
(
*
ListAssetsResponse
,
error
)