Movatterモバイル変換


[0]ホーム

URL:


policyanalyzer

package
v0.257.0Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package policyanalyzer provides access to the Policy Analyzer API.

For product documentation, see:https://www.google.com

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/policyanalyzer/v1"...ctx := context.Background()policyanalyzerService, err := policyanalyzer.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:

policyanalyzerService, err := policyanalyzer.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)policyanalyzerService, err := policyanalyzer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// See, edit, configure, and delete your Google Cloud data and see the email// address for your Google Account.CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeFoldersLocationsActivityTypesActivitiesQueryCalladded inv0.183.0

type FoldersLocationsActivityTypesActivitiesQueryCall struct {// contains filtered or unexported fields}

func (*FoldersLocationsActivityTypesActivitiesQueryCall)Contextadded inv0.183.0

Context sets the context to be used in this call's Do method.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)Doadded inv0.183.0

Do executes the "policyanalyzer.folders.locations.activityTypes.activities.query" call.Any non-2xx status code is an error. Response headers are in either*GoogleCloudPolicyanalyzerV1QueryActivityResponse.ServerResponse.Header or(if a response was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)Fieldsadded inv0.183.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)Filteradded inv0.183.0

Filter sets the optional parameter "filter": Filter expression to restrictthe activities returned. For serviceAccountLastAuthentication activities,supported filters are: - `activities.full_resource_name {=} [STRING]` -`activities.fullResourceName {=} [STRING]` where `[STRING]` is the fullresource name of the service account. ForserviceAccountKeyLastAuthentication activities, supported filters are: -`activities.full_resource_name {=} [STRING]` - `activities.fullResourceName{=} [STRING]` where `[STRING]` is the full resource name of the serviceaccount key.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)Headeradded inv0.183.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)IfNoneMatchadded inv0.183.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)PageSizeadded inv0.183.0

PageSize sets the optional parameter "pageSize": The maximum number ofresults to return from this request. Max limit is 1000. Non-positive valuesare ignored. The presence of `nextPageToken` in the response indicates thatmore results might be available.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)PageTokenadded inv0.183.0

PageToken sets the optional parameter "pageToken": If present, then retrievethe next batch of results from the preceding call to this method.`pageToken` must be the value of `nextPageToken` from the previous response.The values of other method parameters should be identical to those in theprevious call.

func (*FoldersLocationsActivityTypesActivitiesQueryCall)Pagesadded inv0.183.0

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeFoldersLocationsActivityTypesActivitiesServiceadded inv0.183.0

type FoldersLocationsActivityTypesActivitiesService struct {// contains filtered or unexported fields}

funcNewFoldersLocationsActivityTypesActivitiesServiceadded inv0.183.0

func NewFoldersLocationsActivityTypesActivitiesService(s *Service) *FoldersLocationsActivityTypesActivitiesService

func (*FoldersLocationsActivityTypesActivitiesService)Queryadded inv0.183.0

Query: Queries policy activities on Google Cloud resources.

  • parent: The container resource on which to execute the request. Acceptableformats:`projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations:https://cloud.google.com/about/locations/.

typeFoldersLocationsActivityTypesServiceadded inv0.183.0

type FoldersLocationsActivityTypesService struct {Activities *FoldersLocationsActivityTypesActivitiesService// contains filtered or unexported fields}

funcNewFoldersLocationsActivityTypesServiceadded inv0.183.0

func NewFoldersLocationsActivityTypesService(s *Service) *FoldersLocationsActivityTypesService

typeFoldersLocationsServiceadded inv0.183.0

type FoldersLocationsService struct {ActivityTypes *FoldersLocationsActivityTypesService// contains filtered or unexported fields}

funcNewFoldersLocationsServiceadded inv0.183.0

func NewFoldersLocationsService(s *Service) *FoldersLocationsService

typeFoldersServiceadded inv0.183.0

type FoldersService struct {Locations *FoldersLocationsService// contains filtered or unexported fields}

funcNewFoldersServiceadded inv0.183.0

func NewFoldersService(s *Service) *FoldersService

typeGoogleCloudPolicyanalyzerV1Activity

type GoogleCloudPolicyanalyzerV1Activity struct {// Activity: A struct of custom fields to explain the activity.Activitygoogleapi.RawMessage `json:"activity,omitempty"`// ActivityType: The type of the activity.ActivityTypestring `json:"activityType,omitempty"`// FullResourceName: The full resource name that identifies the resource. For// examples of full resource names for Google Cloud services, see//https://cloud.google.com/iam/help/troubleshooter/full-resource-names.FullResourceNamestring `json:"fullResourceName,omitempty"`// ObservationPeriod: The data observation period to build the activity.ObservationPeriod *GoogleCloudPolicyanalyzerV1ObservationPeriod `json:"observationPeriod,omitempty"`// ForceSendFields is a list of field names (e.g. "Activity") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Activity") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

GoogleCloudPolicyanalyzerV1Activity: Represents Activity on a GCP resourceover specific observation period.

func (GoogleCloudPolicyanalyzerV1Activity)MarshalJSON

typeGoogleCloudPolicyanalyzerV1ObservationPeriod

type GoogleCloudPolicyanalyzerV1ObservationPeriod struct {// EndTime: The observation end time. The time in this timestamp is always// `07:00:00Z`.EndTimestring `json:"endTime,omitempty"`// StartTime: The observation start time. The time in this timestamp is always// `07:00:00Z`.StartTimestring `json:"startTime,omitempty"`// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "EndTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

GoogleCloudPolicyanalyzerV1ObservationPeriod: Represents data observationperiod.

func (GoogleCloudPolicyanalyzerV1ObservationPeriod)MarshalJSON

typeGoogleCloudPolicyanalyzerV1QueryActivityResponse

type GoogleCloudPolicyanalyzerV1QueryActivityResponse struct {// Activities: The set of activities that match the filter included in the// request.Activities []*GoogleCloudPolicyanalyzerV1Activity `json:"activities,omitempty"`// NextPageToken: If there might be more results than those appearing in this// response, then `nextPageToken` is included. To get the next set of results,// call this method again using the value of `nextPageToken` as `pageToken`.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Activities") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Activities") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

GoogleCloudPolicyanalyzerV1QueryActivityResponse: Response to the`QueryActivity` method.

func (GoogleCloudPolicyanalyzerV1QueryActivityResponse)MarshalJSON

typeOrganizationsLocationsActivityTypesActivitiesQueryCalladded inv0.183.0

type OrganizationsLocationsActivityTypesActivitiesQueryCall struct {// contains filtered or unexported fields}

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)Contextadded inv0.183.0

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)Doadded inv0.183.0

Do executes the "policyanalyzer.organizations.locations.activityTypes.activities.query" call.Any non-2xx status code is an error. Response headers are in either*GoogleCloudPolicyanalyzerV1QueryActivityResponse.ServerResponse.Header or(if a response was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)Fieldsadded inv0.183.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)Filteradded inv0.183.0

Filter sets the optional parameter "filter": Filter expression to restrictthe activities returned. For serviceAccountLastAuthentication activities,supported filters are: - `activities.full_resource_name {=} [STRING]` -`activities.fullResourceName {=} [STRING]` where `[STRING]` is the fullresource name of the service account. ForserviceAccountKeyLastAuthentication activities, supported filters are: -`activities.full_resource_name {=} [STRING]` - `activities.fullResourceName{=} [STRING]` where `[STRING]` is the full resource name of the serviceaccount key.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)Headeradded inv0.183.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)IfNoneMatchadded inv0.183.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)PageSizeadded inv0.183.0

PageSize sets the optional parameter "pageSize": The maximum number ofresults to return from this request. Max limit is 1000. Non-positive valuesare ignored. The presence of `nextPageToken` in the response indicates thatmore results might be available.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)PageTokenadded inv0.183.0

PageToken sets the optional parameter "pageToken": If present, then retrievethe next batch of results from the preceding call to this method.`pageToken` must be the value of `nextPageToken` from the previous response.The values of other method parameters should be identical to those in theprevious call.

func (*OrganizationsLocationsActivityTypesActivitiesQueryCall)Pagesadded inv0.183.0

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeOrganizationsLocationsActivityTypesActivitiesServiceadded inv0.183.0

type OrganizationsLocationsActivityTypesActivitiesService struct {// contains filtered or unexported fields}

funcNewOrganizationsLocationsActivityTypesActivitiesServiceadded inv0.183.0

func NewOrganizationsLocationsActivityTypesActivitiesService(s *Service) *OrganizationsLocationsActivityTypesActivitiesService

func (*OrganizationsLocationsActivityTypesActivitiesService)Queryadded inv0.183.0

Query: Queries policy activities on Google Cloud resources.

  • parent: The container resource on which to execute the request. Acceptableformats:`projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations:https://cloud.google.com/about/locations/.

typeOrganizationsLocationsActivityTypesServiceadded inv0.183.0

type OrganizationsLocationsActivityTypesService struct {Activities *OrganizationsLocationsActivityTypesActivitiesService// contains filtered or unexported fields}

funcNewOrganizationsLocationsActivityTypesServiceadded inv0.183.0

func NewOrganizationsLocationsActivityTypesService(s *Service) *OrganizationsLocationsActivityTypesService

typeOrganizationsLocationsServiceadded inv0.183.0

type OrganizationsLocationsService struct {ActivityTypes *OrganizationsLocationsActivityTypesService// contains filtered or unexported fields}

funcNewOrganizationsLocationsServiceadded inv0.183.0

func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService

typeOrganizationsServiceadded inv0.183.0

type OrganizationsService struct {Locations *OrganizationsLocationsService// contains filtered or unexported fields}

funcNewOrganizationsServiceadded inv0.183.0

func NewOrganizationsService(s *Service) *OrganizationsService

typeProjectsLocationsActivityTypesActivitiesQueryCall

type ProjectsLocationsActivityTypesActivitiesQueryCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)Do

Do executes the "policyanalyzer.projects.locations.activityTypes.activities.query" call.Any non-2xx status code is an error. Response headers are in either*GoogleCloudPolicyanalyzerV1QueryActivityResponse.ServerResponse.Header or(if a response was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)Filter

Filter sets the optional parameter "filter": Filter expression to restrictthe activities returned. For serviceAccountLastAuthentication activities,supported filters are: - `activities.full_resource_name {=} [STRING]` -`activities.fullResourceName {=} [STRING]` where `[STRING]` is the fullresource name of the service account. ForserviceAccountKeyLastAuthentication activities, supported filters are: -`activities.full_resource_name {=} [STRING]` - `activities.fullResourceName{=} [STRING]` where `[STRING]` is the full resource name of the serviceaccount key.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum number ofresults to return from this request. Max limit is 1000. Non-positive valuesare ignored. The presence of `nextPageToken` in the response indicates thatmore results might be available.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)PageToken

PageToken sets the optional parameter "pageToken": If present, then retrievethe next batch of results from the preceding call to this method.`pageToken` must be the value of `nextPageToken` from the previous response.The values of other method parameters should be identical to those in theprevious call.

func (*ProjectsLocationsActivityTypesActivitiesQueryCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeProjectsLocationsActivityTypesActivitiesService

type ProjectsLocationsActivityTypesActivitiesService struct {// contains filtered or unexported fields}

func (*ProjectsLocationsActivityTypesActivitiesService)Query

Query: Queries policy activities on Google Cloud resources.

  • parent: The container resource on which to execute the request. Acceptableformats:`projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations:https://cloud.google.com/about/locations/.

typeProjectsLocationsActivityTypesService

type ProjectsLocationsActivityTypesService struct {Activities *ProjectsLocationsActivityTypesActivitiesService// contains filtered or unexported fields}

typeProjectsLocationsService

type ProjectsLocationsService struct {ActivityTypes *ProjectsLocationsActivityTypesService// contains filtered or unexported fields}

funcNewProjectsLocationsService

func NewProjectsLocationsService(s *Service) *ProjectsLocationsService

typeProjectsService

type ProjectsService struct {Locations *ProjectsLocationsService// contains filtered or unexported fields}

funcNewProjectsService

func NewProjectsService(s *Service) *ProjectsService

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentFolders *FoldersServiceOrganizations *OrganizationsServiceProjects *ProjectsService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewService

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp