cloudresourcemanager
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package cloudresourcemanager provides access to the Cloud Resource Manager API.
For product documentation, see:https://cloud.google.com/resource-manager
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/cloudresourcemanager/v2"...ctx := context.Background()cloudresourcemanagerService, err := cloudresourcemanager.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¶
By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:
cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope))
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
cloudresourcemanagerService, err := cloudresourcemanager.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, ...)cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type AuditConfig
- type AuditLogConfig
- type Binding
- type CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation
- type CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation
- type CreateFolderMetadata
- type CreateProjectMetadata
- type CreateTagBindingMetadata
- type CreateTagKeyMetadata
- type CreateTagValueMetadata
- type DeleteFolderMetadata
- type DeleteOrganizationMetadata
- type DeleteProjectMetadata
- type DeleteTagBindingMetadata
- type DeleteTagKeyMetadata
- type DeleteTagValueMetadata
- type Expr
- type Folder
- type FolderOperation
- type FolderOperationError
- type FoldersCreateCall
- func (c *FoldersCreateCall) Context(ctx context.Context) *FoldersCreateCall
- func (c *FoldersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *FoldersCreateCall) Fields(s ...googleapi.Field) *FoldersCreateCall
- func (c *FoldersCreateCall) Header() http.Header
- func (c *FoldersCreateCall) Parent(parent string) *FoldersCreateCall
- type FoldersDeleteCall
- type FoldersGetCall
- func (c *FoldersGetCall) Context(ctx context.Context) *FoldersGetCall
- func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error)
- func (c *FoldersGetCall) Fields(s ...googleapi.Field) *FoldersGetCall
- func (c *FoldersGetCall) Header() http.Header
- func (c *FoldersGetCall) IfNoneMatch(entityTag string) *FoldersGetCall
- type FoldersGetIamPolicyCall
- func (c *FoldersGetIamPolicyCall) Context(ctx context.Context) *FoldersGetIamPolicyCall
- func (c *FoldersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error)
- func (c *FoldersGetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersGetIamPolicyCall
- func (c *FoldersGetIamPolicyCall) Header() http.Header
- type FoldersListCall
- func (c *FoldersListCall) Context(ctx context.Context) *FoldersListCall
- func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*ListFoldersResponse, error)
- func (c *FoldersListCall) Fields(s ...googleapi.Field) *FoldersListCall
- func (c *FoldersListCall) Header() http.Header
- func (c *FoldersListCall) IfNoneMatch(entityTag string) *FoldersListCall
- func (c *FoldersListCall) PageSize(pageSize int64) *FoldersListCall
- func (c *FoldersListCall) PageToken(pageToken string) *FoldersListCall
- func (c *FoldersListCall) Pages(ctx context.Context, f func(*ListFoldersResponse) error) error
- func (c *FoldersListCall) Parent(parent string) *FoldersListCall
- func (c *FoldersListCall) ShowDeleted(showDeleted bool) *FoldersListCall
- type FoldersMoveCall
- type FoldersPatchCall
- func (c *FoldersPatchCall) Context(ctx context.Context) *FoldersPatchCall
- func (c *FoldersPatchCall) Do(opts ...googleapi.CallOption) (*Folder, error)
- func (c *FoldersPatchCall) Fields(s ...googleapi.Field) *FoldersPatchCall
- func (c *FoldersPatchCall) Header() http.Header
- func (c *FoldersPatchCall) UpdateMask(updateMask string) *FoldersPatchCall
- type FoldersSearchCall
- func (c *FoldersSearchCall) Context(ctx context.Context) *FoldersSearchCall
- func (c *FoldersSearchCall) Do(opts ...googleapi.CallOption) (*SearchFoldersResponse, error)
- func (c *FoldersSearchCall) Fields(s ...googleapi.Field) *FoldersSearchCall
- func (c *FoldersSearchCall) Header() http.Header
- func (c *FoldersSearchCall) Pages(ctx context.Context, f func(*SearchFoldersResponse) error) error
- type FoldersService
- func (r *FoldersService) Create(folder *Folder) *FoldersCreateCall
- func (r *FoldersService) Delete(name string) *FoldersDeleteCall
- func (r *FoldersService) Get(name string) *FoldersGetCall
- func (r *FoldersService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *FoldersGetIamPolicyCall
- func (r *FoldersService) List() *FoldersListCall
- func (r *FoldersService) Move(name string, movefolderrequest *MoveFolderRequest) *FoldersMoveCall
- func (r *FoldersService) Patch(name string, folder *Folder) *FoldersPatchCall
- func (r *FoldersService) Search(searchfoldersrequest *SearchFoldersRequest) *FoldersSearchCall
- func (r *FoldersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *FoldersSetIamPolicyCall
- func (r *FoldersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *FoldersTestIamPermissionsCall
- func (r *FoldersService) Undelete(name string, undeletefolderrequest *UndeleteFolderRequest) *FoldersUndeleteCall
- type FoldersSetIamPolicyCall
- func (c *FoldersSetIamPolicyCall) Context(ctx context.Context) *FoldersSetIamPolicyCall
- func (c *FoldersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error)
- func (c *FoldersSetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersSetIamPolicyCall
- func (c *FoldersSetIamPolicyCall) Header() http.Header
- type FoldersTestIamPermissionsCall
- func (c *FoldersTestIamPermissionsCall) Context(ctx context.Context) *FoldersTestIamPermissionsCall
- func (c *FoldersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error)
- func (c *FoldersTestIamPermissionsCall) Fields(s ...googleapi.Field) *FoldersTestIamPermissionsCall
- func (c *FoldersTestIamPermissionsCall) Header() http.Header
- type FoldersUndeleteCall
- type GetIamPolicyRequest
- type GetPolicyOptions
- type ListFoldersResponse
- type MoveFolderMetadata
- type MoveFolderRequest
- type MoveProjectMetadata
- type Operation
- type OperationsGetCall
- func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall
- func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall
- func (c *OperationsGetCall) Header() http.Header
- func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall
- type OperationsService
- type Policy
- type ProjectCreationStatus
- type SearchFoldersRequest
- type SearchFoldersResponse
- type Service
- type SetIamPolicyRequest
- type Status
- type TestIamPermissionsRequest
- type TestIamPermissionsResponse
- type UndeleteFolderMetadata
- type UndeleteFolderRequest
- type UndeleteOrganizationMetadata
- type UndeleteProjectMetadata
- type UpdateFolderMetadata
- type UpdateProjectMetadata
- type UpdateTagKeyMetadata
- type UpdateTagValueMetadata
Constants¶
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"// View your data across Google Cloud services and see the email address of// your Google AccountCloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAuditConfig¶
type AuditConfig struct {// AuditLogConfigs: The configuration for logging of each type of permission.AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`// Service: Specifies a service that will be enabled for audit logging. For// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`// is a special value that covers all services.Servicestring `json:"service,omitempty"`// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") 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. "AuditLogConfigs") 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:"-"`}AuditConfig: Specifies the audit configuration for a service. Theconfiguration determines which permission types are logged, and whatidentities, if any, are exempted from logging. An AuditConfig must have oneor more AuditLogConfigs. If there are AuditConfigs for both `allServices`and a specific service, the union of the two AuditConfigs is used for thatservice: the log_types specified in each AuditConfig are enabled, and theexempted_members in each AuditLogConfig are exempted. Example Policy withmultiple AuditConfigs: { "audit_configs": [ { "service": "allServices","audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": ["user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":"ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com","audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":"DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } Forsampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READlogging. It also exempts `jose@example.com` from DATA_READ logging, and`aliya@example.com` from DATA_WRITE logging.
func (AuditConfig)MarshalJSON¶
func (sAuditConfig) MarshalJSON() ([]byte,error)
typeAuditLogConfig¶
type AuditLogConfig struct {// ExemptedMembers: Specifies the identities that do not cause logging for this// type of permission. Follows the same format of Binding.members.ExemptedMembers []string `json:"exemptedMembers,omitempty"`// LogType: The log type that this config enables.//// Possible values:// "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.// "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy// "DATA_WRITE" - Data writes. Example: CloudSQL Users create// "DATA_READ" - Data reads. Example: CloudSQL Users listLogTypestring `json:"logType,omitempty"`// ForceSendFields is a list of field names (e.g. "ExemptedMembers") 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. "ExemptedMembers") 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:"-"`}AuditLogConfig: Provides the configuration for logging a type ofpermissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ","exempted_members": [ "user:jose@example.com" ] }, { "log_type":"DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, whileexempting jose@example.com from DATA_READ logging.
func (AuditLogConfig)MarshalJSON¶
func (sAuditLogConfig) MarshalJSON() ([]byte,error)
typeBinding¶
type Binding struct {// Condition: The condition that is associated with this binding. If the// condition evaluates to `true`, then this binding applies to the current// request. If the condition evaluates to `false`, then this binding does not// apply to the current request. However, a different role binding might grant// the same role to one or more of the principals in this binding. To learn// which resources support conditions in their IAM policies, see the IAM// documentation// (https://cloud.google.com/iam/help/conditions/resource-policies).Condition *Expr `json:"condition,omitempty"`// Members: Specifies the principals requesting access for a Google Cloud// resource. `members` can have the following values: * `allUsers`: A special// identifier that represents anyone who is on the internet; with or without a// Google account. * `allAuthenticatedUsers`: A special identifier that// represents anyone who is authenticated with a Google account or a service// account. Does not include identities that come from external identity// providers (IdPs) through identity federation. * `user:{emailid}`: An email// address that represents a specific Google account. For example,// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that// represents a Google service account. For example,// `my-other-app@appspot.gserviceaccount.com`. *// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An// identifier for a Kubernetes service account// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *// `group:{emailid}`: An email address that represents a Google group. For// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain// (primary) that represents all the users of that domain. For example,// `google.com` or `example.com`. *// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub// ject/{subject_attribute_value}`: A single identity in a workforce identity// pool. *// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/// group/{group_id}`: All workforce identities in a group. *// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/// attribute.{attribute_name}/{attribute_value}`: All workforce identities with// a specific attribute value. *// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/// *`: All identities in a workforce identity pool. *// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single// identity in a workload identity pool. *// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool// group. *// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}// `: All identities in a workload identity pool with a certain attribute. *// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus// unique identifier) representing a user that has been recently deleted. For// example, `alice@example.com?uid=123456789012345678901`. If the user is// recovered, this value reverts to `user:{emailid}` and the recovered user// retains the role in the binding. *// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus// unique identifier) representing a service account that has been recently// deleted. For example,// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the// service account is undeleted, this value reverts to// `serviceAccount:{emailid}` and the undeleted service account retains the// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email// address (plus unique identifier) representing a Google group that has been// recently deleted. For example,// `admins@example.com?uid=123456789012345678901`. If the group is recovered,// this value reverts to `group:{emailid}` and the recovered group retains the// role in the binding. *// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool// _id}/subject/{subject_attribute_value}`: Deleted single identity in a// workforce identity pool. For example,// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po// ol-id/subject/my-subject-attribute-value`.Members []string `json:"members,omitempty"`// Role: Role that is assigned to the list of `members`, or principals. For// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview// of the IAM roles and permissions, see the IAM documentation// (https://cloud.google.com/iam/docs/roles-overview). For a list of the// available pre-defined roles, see here// (https://cloud.google.com/iam/docs/understanding-roles).Rolestring `json:"role,omitempty"`// ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") 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:"-"`}Binding: Associates `members`, or principals, with a `role`.
func (Binding)MarshalJSON¶
typeCloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation¶added inv0.35.0
type CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation struct {// DestinationParent: The resource name of the folder or organization we are// either creating the folder under or moving the folder to.DestinationParentstring `json:"destinationParent,omitempty"`// DisplayName: The display name of the folder.DisplayNamestring `json:"displayName,omitempty"`// OperationType: The type of this operation.//// Possible values:// "OPERATION_TYPE_UNSPECIFIED" - Operation type not specified.// "CREATE" - A create folder operation.// "MOVE" - A move folder operation.OperationTypestring `json:"operationType,omitempty"`// SourceParent: The resource name of the folder's parent. Only applicable when// the operation_type is MOVE.SourceParentstring `json:"sourceParent,omitempty"`// ForceSendFields is a list of field names (e.g. "DestinationParent") 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. "DestinationParent") 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:"-"`}CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation:Metadata describing a long running folder operation
func (CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation)MarshalJSON¶added inv0.35.0
func (sCloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation) MarshalJSON() ([]byte,error)
typeCloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation¶added inv0.35.0
type CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation struct {// DestinationParent: The resource name of the folder or organization we are// either creating the folder under or moving the folder to.DestinationParentstring `json:"destinationParent,omitempty"`// DisplayName: The display name of the folder.DisplayNamestring `json:"displayName,omitempty"`// OperationType: The type of this operation.//// Possible values:// "OPERATION_TYPE_UNSPECIFIED" - Operation type not specified.// "CREATE" - A create folder operation.// "MOVE" - A move folder operation.OperationTypestring `json:"operationType,omitempty"`// SourceParent: The resource name of the folder's parent. Only applicable when// the operation_type is MOVE.SourceParentstring `json:"sourceParent,omitempty"`// ForceSendFields is a list of field names (e.g. "DestinationParent") 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. "DestinationParent") 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:"-"`}CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation:Metadata describing a long running folder operation
func (CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation)MarshalJSON¶added inv0.35.0
func (sCloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation) MarshalJSON() ([]byte,error)
typeCreateFolderMetadata¶added inv0.36.0
type CreateFolderMetadata struct {// DisplayName: The display name of the folder.DisplayNamestring `json:"displayName,omitempty"`// Parent: The resource name of the folder or organization we are creating the// folder under.Parentstring `json:"parent,omitempty"`// ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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:"-"`}CreateFolderMetadata: Metadata pertaining to the Folder creation process.
func (CreateFolderMetadata)MarshalJSON¶added inv0.36.0
func (sCreateFolderMetadata) MarshalJSON() ([]byte,error)
typeCreateProjectMetadata¶added inv0.36.0
type CreateProjectMetadata struct {// CreateTime: Creation time of the project creation workflow.CreateTimestring `json:"createTime,omitempty"`// Gettable: True if the project can be retrieved using `GetProject`. No other// operations on the project are guaranteed to work until the project creation// is complete.Gettablebool `json:"gettable,omitempty"`// Ready: True if the project creation process is complete.Readybool `json:"ready,omitempty"`// ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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:"-"`}CreateProjectMetadata: A status object which is used as the `metadata` fieldfor the Operation returned by CreateProject. It provides insight for whensignificant phases of Project creation have completed.
func (CreateProjectMetadata)MarshalJSON¶added inv0.36.0
func (sCreateProjectMetadata) MarshalJSON() ([]byte,error)
typeCreateTagBindingMetadata¶added inv0.45.0
type CreateTagBindingMetadata struct {}CreateTagBindingMetadata: Runtime operation information for creating aTagValue.
typeCreateTagKeyMetadata¶added inv0.36.0
type CreateTagKeyMetadata struct {}CreateTagKeyMetadata: Runtime operation information for creating a TagKey.
typeCreateTagValueMetadata¶added inv0.36.0
type CreateTagValueMetadata struct {}CreateTagValueMetadata: Runtime operation information for creating aTagValue.
typeDeleteFolderMetadata¶added inv0.36.0
type DeleteFolderMetadata struct {}DeleteFolderMetadata: A status object which is used as the `metadata` fieldfor the `Operation` returned by `DeleteFolder`.
typeDeleteOrganizationMetadata¶added inv0.36.0
type DeleteOrganizationMetadata struct {}DeleteOrganizationMetadata: A status object which is used as the `metadata`field for the operation returned by DeleteOrganization.
typeDeleteProjectMetadata¶added inv0.36.0
type DeleteProjectMetadata struct {}DeleteProjectMetadata: A status object which is used as the `metadata` fieldfor the Operation returned by `DeleteProject`.
typeDeleteTagBindingMetadata¶added inv0.45.0
type DeleteTagBindingMetadata struct {}DeleteTagBindingMetadata: Runtime operation information for deleting aTagBinding.
typeDeleteTagKeyMetadata¶added inv0.36.0
type DeleteTagKeyMetadata struct {}DeleteTagKeyMetadata: Runtime operation information for deleting a TagKey.
typeDeleteTagValueMetadata¶added inv0.36.0
type DeleteTagValueMetadata struct {}DeleteTagValueMetadata: Runtime operation information for deleting aTagValue.
typeExpr¶
type Expr struct {// Description: Optional. Description of the expression. This is a longer text// which describes the expression, e.g. when hovered over it in a UI.Descriptionstring `json:"description,omitempty"`// Expression: Textual representation of an expression in Common Expression// Language syntax.Expressionstring `json:"expression,omitempty"`// Location: Optional. String indicating the location of the expression for// error reporting, e.g. a file name and a position in the file.Locationstring `json:"location,omitempty"`// Title: Optional. Title for the expression, i.e. a short string describing// its purpose. This can be used e.g. in UIs which allow to enter the// expression.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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:"-"`}Expr: Represents a textual expression in the Common Expression Language(CEL) syntax. CEL is a C-like expression language. The syntax and semanticsof CEL are documented athttps://github.com/google/cel-spec. Example(Comparison): title: "Summary size limit" description: "Determines if asummary is less than 100 chars" expression: "document.summary.size() < 100"Example (Equality): title: "Requestor is owner" description: "Determines ifrequestor is the document owner" expression: "document.owner ==request.auth.claims.email" Example (Logic): title: "Public documents"description: "Determine whether the document should be publicly visible"expression: "document.type != 'private' && document.type != 'internal'"Example (Data Manipulation): title: "Notification string" description:"Create a notification string with a timestamp." expression: "'New messagereceived at ' + string(document.create_time)" The exact variables andfunctions that may be referenced within an expression are determined by theservice that evaluates it. See the service documentation for additionalinformation.
func (Expr)MarshalJSON¶
typeFolder¶
type Folder struct {// ConfiguredCapabilities: Output only. Optional capabilities configured for// this folder (via UpdateCapability API). Example:// `folders/123/capabilities/app-management`.ConfiguredCapabilities []string `json:"configuredCapabilities,omitempty"`// CreateTime: Output only. Timestamp when the Folder was created. Assigned by// the server.CreateTimestring `json:"createTime,omitempty"`// DisplayName: The folder's display name. A folder's display name must be// unique amongst its siblings, e.g. no two folders with the same parent can// share the same display name. The display name must start and end with a// letter or digit, may contain letters, digits, spaces, hyphens and// underscores and can be no longer than 30 characters. This is captured by the// regular expression: `[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?`.DisplayNamestring `json:"displayName,omitempty"`// LifecycleState: Output only. The lifecycle state of the folder. Updates to// the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.//// Possible values:// "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state.// "ACTIVE" - The normal and active state.// "DELETE_REQUESTED" - The folder has been marked for deletion by the user.LifecycleStatestring `json:"lifecycleState,omitempty"`// ManagementProject: Output only. Management Project associated with this// folder (if app-management capability is enabled). Example:// `projects/google-mp-123` OUTPUT ONLY.ManagementProjectstring `json:"managementProject,omitempty"`// Name: Output only. The resource name of the Folder. Its format is// `folders/{folder_id}`, for example: "folders/1234".Namestring `json:"name,omitempty"`// Parent: Required. The Folder's parent's resource name. Updates to the// folder's parent must be performed via MoveFolder.Parentstring `json:"parent,omitempty"`// Tags: Optional. Input only. Immutable. Tag keys/values directly bound to// this folder. Each item in the map must be expressed as " : ". For example:// "123/environment" : "production", "123/costCenter" : "marketing" Note:// Currently this field is in Preview.Tags map[string]string `json:"tags,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ConfiguredCapabilities") 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. "ConfiguredCapabilities") 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:"-"`}Folder: A Folder in an Organization's resource hierarchy, used to organizethat Organization's resources.
func (Folder)MarshalJSON¶
typeFolderOperation¶
type FolderOperation struct {// DestinationParent: The resource name of the folder or organization we are// either creating the folder under or moving the folder to.DestinationParentstring `json:"destinationParent,omitempty"`// DisplayName: The display name of the folder.DisplayNamestring `json:"displayName,omitempty"`// OperationType: The type of this operation.//// Possible values:// "OPERATION_TYPE_UNSPECIFIED" - Operation type not specified.// "CREATE" - A create folder operation.// "MOVE" - A move folder operation.OperationTypestring `json:"operationType,omitempty"`// SourceParent: The resource name of the folder's parent. Only applicable when// the operation_type is MOVE.SourceParentstring `json:"sourceParent,omitempty"`// ForceSendFields is a list of field names (e.g. "DestinationParent") 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. "DestinationParent") 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:"-"`}FolderOperation: Metadata describing a long running folder operation
func (FolderOperation)MarshalJSON¶
func (sFolderOperation) MarshalJSON() ([]byte,error)
typeFolderOperationError¶
type FolderOperationError struct {// ErrorMessageId: The type of operation error experienced.//// Possible values:// "ERROR_TYPE_UNSPECIFIED" - The error type was unrecognized or unspecified.// "ACTIVE_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the// max folder depth constraint.// "MAX_CHILD_FOLDERS_VIOLATION" - The attempted action would violate the max// child folders constraint.// "FOLDER_NAME_UNIQUENESS_VIOLATION" - The attempted action would violate// the locally-unique folder display_name constraint.// "RESOURCE_DELETED_VIOLATION" - The resource being moved has been deleted.// "PARENT_DELETED_VIOLATION" - The resource a folder was being added to has// been deleted.// "CYCLE_INTRODUCED_VIOLATION" - The attempted action would introduce cycle// in resource path.// "FOLDER_BEING_MOVED_VIOLATION" - The attempted action would move a folder// that is already being moved.// "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION" - The folder the caller is trying// to delete contains active resources.// "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the// max deleted folder depth constraint.// "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" - The folder being// deleted has a configured capability.ErrorMessageIdstring `json:"errorMessageId,omitempty"`// ForceSendFields is a list of field names (e.g. "ErrorMessageId") 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. "ErrorMessageId") 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:"-"`}FolderOperationError: A classification of the Folder Operation error.
func (FolderOperationError)MarshalJSON¶
func (sFolderOperationError) MarshalJSON() ([]byte,error)
typeFoldersCreateCall¶
type FoldersCreateCall struct {// contains filtered or unexported fields}func (*FoldersCreateCall)Context¶
func (c *FoldersCreateCall) Context(ctxcontext.Context) *FoldersCreateCall
Context sets the context to be used in this call's Do method.
func (*FoldersCreateCall)Do¶
func (c *FoldersCreateCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "cloudresourcemanager.folders.create" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersCreateCall)Fields¶
func (c *FoldersCreateCall) Fields(s ...googleapi.Field) *FoldersCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersCreateCall)Header¶
func (c *FoldersCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FoldersCreateCall)Parent¶
func (c *FoldersCreateCall) Parent(parentstring) *FoldersCreateCall
Parent sets the optional parameter "parent": Required. The resource name ofthe new Folder's parent. Must be of the form `folders/{folder_id}` or`organizations/{org_id}`.
typeFoldersDeleteCall¶
type FoldersDeleteCall struct {// contains filtered or unexported fields}func (*FoldersDeleteCall)Context¶
func (c *FoldersDeleteCall) Context(ctxcontext.Context) *FoldersDeleteCall
Context sets the context to be used in this call's Do method.
func (*FoldersDeleteCall)Do¶
func (c *FoldersDeleteCall) Do(opts ...googleapi.CallOption) (*Folder,error)
Do executes the "cloudresourcemanager.folders.delete" call.Any non-2xx status code is an error. Response headers are in either*Folder.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersDeleteCall)Fields¶
func (c *FoldersDeleteCall) Fields(s ...googleapi.Field) *FoldersDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersDeleteCall)Header¶
func (c *FoldersDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFoldersGetCall¶
type FoldersGetCall struct {// contains filtered or unexported fields}func (*FoldersGetCall)Context¶
func (c *FoldersGetCall) Context(ctxcontext.Context) *FoldersGetCall
Context sets the context to be used in this call's Do method.
func (*FoldersGetCall)Do¶
func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder,error)
Do executes the "cloudresourcemanager.folders.get" call.Any non-2xx status code is an error. Response headers are in either*Folder.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersGetCall)Fields¶
func (c *FoldersGetCall) Fields(s ...googleapi.Field) *FoldersGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersGetCall)Header¶
func (c *FoldersGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FoldersGetCall)IfNoneMatch¶
func (c *FoldersGetCall) IfNoneMatch(entityTagstring) *FoldersGetCall
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.
typeFoldersGetIamPolicyCall¶
type FoldersGetIamPolicyCall struct {// contains filtered or unexported fields}func (*FoldersGetIamPolicyCall)Context¶
func (c *FoldersGetIamPolicyCall) Context(ctxcontext.Context) *FoldersGetIamPolicyCall
Context sets the context to be used in this call's Do method.
func (*FoldersGetIamPolicyCall)Do¶
func (c *FoldersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy,error)
Do executes the "cloudresourcemanager.folders.getIamPolicy" call.Any non-2xx status code is an error. Response headers are in either*Policy.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersGetIamPolicyCall)Fields¶
func (c *FoldersGetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersGetIamPolicyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersGetIamPolicyCall)Header¶
func (c *FoldersGetIamPolicyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFoldersListCall¶
type FoldersListCall struct {// contains filtered or unexported fields}func (*FoldersListCall)Context¶
func (c *FoldersListCall) Context(ctxcontext.Context) *FoldersListCall
Context sets the context to be used in this call's Do method.
func (*FoldersListCall)Do¶
func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*ListFoldersResponse,error)
Do executes the "cloudresourcemanager.folders.list" call.Any non-2xx status code is an error. Response headers are in either*ListFoldersResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*FoldersListCall)Fields¶
func (c *FoldersListCall) Fields(s ...googleapi.Field) *FoldersListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersListCall)Header¶
func (c *FoldersListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FoldersListCall)IfNoneMatch¶
func (c *FoldersListCall) IfNoneMatch(entityTagstring) *FoldersListCall
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 (*FoldersListCall)PageSize¶
func (c *FoldersListCall) PageSize(pageSizeint64) *FoldersListCall
PageSize sets the optional parameter "pageSize": The maximum number ofFolders to return in the response. The server can return fewer folders thanrequested. If unspecified, server picks an appropriate default.
func (*FoldersListCall)PageToken¶
func (c *FoldersListCall) PageToken(pageTokenstring) *FoldersListCall
PageToken sets the optional parameter "pageToken": A pagination tokenreturned from a previous call to `ListFolders` that indicates where thislisting should continue from.
func (*FoldersListCall)Pages¶
func (c *FoldersListCall) Pages(ctxcontext.Context, f func(*ListFoldersResponse)error)error
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.
func (*FoldersListCall)Parent¶
func (c *FoldersListCall) Parent(parentstring) *FoldersListCall
Parent sets the optional parameter "parent": Required. The resource name ofthe Organization or Folder whose Folders are being listed. Must be of theform `folders/{folder_id}` or `organizations/{org_id}`. Access to thismethod is controlled by checking the `resourcemanager.folders.list`permission on the `parent`.
func (*FoldersListCall)ShowDeleted¶
func (c *FoldersListCall) ShowDeleted(showDeletedbool) *FoldersListCall
ShowDeleted sets the optional parameter "showDeleted": Controls whetherFolders in the DELETE_REQUESTED state should be returned. Defaults to false.
typeFoldersMoveCall¶
type FoldersMoveCall struct {// contains filtered or unexported fields}func (*FoldersMoveCall)Context¶
func (c *FoldersMoveCall) Context(ctxcontext.Context) *FoldersMoveCall
Context sets the context to be used in this call's Do method.
func (*FoldersMoveCall)Do¶
func (c *FoldersMoveCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "cloudresourcemanager.folders.move" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersMoveCall)Fields¶
func (c *FoldersMoveCall) Fields(s ...googleapi.Field) *FoldersMoveCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersMoveCall)Header¶
func (c *FoldersMoveCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFoldersPatchCall¶
type FoldersPatchCall struct {// contains filtered or unexported fields}func (*FoldersPatchCall)Context¶
func (c *FoldersPatchCall) Context(ctxcontext.Context) *FoldersPatchCall
Context sets the context to be used in this call's Do method.
func (*FoldersPatchCall)Do¶
func (c *FoldersPatchCall) Do(opts ...googleapi.CallOption) (*Folder,error)
Do executes the "cloudresourcemanager.folders.patch" call.Any non-2xx status code is an error. Response headers are in either*Folder.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersPatchCall)Fields¶
func (c *FoldersPatchCall) Fields(s ...googleapi.Field) *FoldersPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersPatchCall)Header¶
func (c *FoldersPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FoldersPatchCall)UpdateMask¶
func (c *FoldersPatchCall) UpdateMask(updateMaskstring) *FoldersPatchCall
UpdateMask sets the optional parameter "updateMask": Required. Fields to beupdated. Only the `display_name` can be updated.
typeFoldersSearchCall¶
type FoldersSearchCall struct {// contains filtered or unexported fields}func (*FoldersSearchCall)Context¶
func (c *FoldersSearchCall) Context(ctxcontext.Context) *FoldersSearchCall
Context sets the context to be used in this call's Do method.
func (*FoldersSearchCall)Do¶
func (c *FoldersSearchCall) Do(opts ...googleapi.CallOption) (*SearchFoldersResponse,error)
Do executes the "cloudresourcemanager.folders.search" call.Any non-2xx status code is an error. Response headers are in either*SearchFoldersResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*FoldersSearchCall)Fields¶
func (c *FoldersSearchCall) Fields(s ...googleapi.Field) *FoldersSearchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersSearchCall)Header¶
func (c *FoldersSearchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FoldersSearchCall)Pages¶
func (c *FoldersSearchCall) Pages(ctxcontext.Context, f func(*SearchFoldersResponse)error)error
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.
typeFoldersService¶
type FoldersService struct {// contains filtered or unexported fields}funcNewFoldersService¶
func NewFoldersService(s *Service) *FoldersService
func (*FoldersService)Create¶
func (r *FoldersService) Create(folder *Folder) *FoldersCreateCall
Create: Creates a Folder in the resource hierarchy. Returns an Operationwhich can be used to track the progress of the folder creation workflow.Upon success the Operation.response field will be populated with the createdFolder. In order to succeed, the addition of this new Folder must notviolate the Folder naming, height or fanout constraints. + The Folder'sdisplay_name must be distinct from all other Folders that share its parent.+ The addition of the Folder must not cause the active Folder hierarchy toexceed a height of 10. Note, the full active + deleted Folder hierarchy isallowed to reach a height of 20; this provides additional headroom whenmoving folders that contain deleted folders. + The addition of the Foldermust not cause the total number of Folders under its parent to exceed 300.If the operation fails due to a folder constraint violation, some errors maybe returned by the CreateFolder request, with status codeFAILED_PRECONDITION and an error description. Other folder constraintviolations will be communicated in the Operation, with the specificPreconditionFailure returned via the details list in the Operation.errorfield. The caller must have `resourcemanager.folders.create` permission onthe identified parent.
func (*FoldersService)Delete¶
func (r *FoldersService) Delete(namestring) *FoldersDeleteCall
Delete: Requests deletion of a Folder. The Folder is moved into theDELETE_REQUESTED state immediately, and is deleted approximately 30 dayslater. This method may only be called on an empty Folder in the ACTIVEstate, where a Folder is empty if it doesn't contain any Folders or Projectsin the ACTIVE state. The caller must have `resourcemanager.folders.delete`permission on the identified folder.
- name: the resource name of the Folder to be deleted. Must be of the form`folders/{folder_id}`.
func (*FoldersService)Get¶
func (r *FoldersService) Get(namestring) *FoldersGetCall
Get: Retrieves a Folder identified by the supplied resource name. ValidFolder resource names have the format `folders/{folder_id}` (for example,`folders/1234`). The caller must have `resourcemanager.folders.get`permission on the identified folder.
- name: The resource name of the Folder to retrieve. Must be of the form`folders/{folder_id}`.
func (*FoldersService)GetIamPolicy¶
func (r *FoldersService) GetIamPolicy(resourcestring, getiampolicyrequest *GetIamPolicyRequest) *FoldersGetIamPolicyCall
GetIamPolicy: Gets the access control policy for a Folder. The returnedpolicy may be empty if no such policy or resource exists. The `resource`field should be the Folder's resource name, e.g. "folders/1234". The callermust have `resourcemanager.folders.getIamPolicy` permission on theidentified folder.
- resource: REQUIRED: The resource for which the policy is being requested.See Resource names (https://cloud.google.com/apis/design/resource_names)for the appropriate value for this field.
func (*FoldersService)List¶
func (r *FoldersService) List() *FoldersListCall
List: Lists the Folders that are direct descendants of supplied parentresource. List provides a strongly consistent view of the Folders underneaththe specified parent resource. List returns Folders sorted based upon the(ascending) lexical ordering of their display_name. The caller must have`resourcemanager.folders.list` permission on the identified parent.
func (*FoldersService)Move¶
func (r *FoldersService) Move(namestring, movefolderrequest *MoveFolderRequest) *FoldersMoveCall
Move: Moves a Folder under a new resource parent. Returns an Operation whichcan be used to track the progress of the folder move workflow. Upon successthe Operation.response field will be populated with the moved Folder. Uponfailure, a FolderOperationError categorizing the failure cause will bereturned - if the failure occurs synchronously then the FolderOperationErrorwill be returned via the Status.details field and if it occursasynchronously then the FolderOperation will be returned via theOperation.error field. In addition, the Operation.metadata field will bepopulated with a FolderOperation message as an aid to stateless clients.Folder moves will be rejected if they violate either the naming, height orfanout constraints described in the CreateFolder documentation. The callermust have `resourcemanager.folders.move` permission on the folder's currentand proposed new parent.
- name: The resource name of the Folder to move. Must be of the formfolders/{folder_id}.
func (*FoldersService)Patch¶
func (r *FoldersService) Patch(namestring, folder *Folder) *FoldersPatchCall
Patch: Updates a Folder, changing its display_name. Changes to the folderdisplay_name will be rejected if they violate either the display_nameformatting rules or naming constraints described in the CreateFolderdocumentation. The Folder's display name must start and end with a letter ordigit, may contain letters, digits, spaces, hyphens and underscores and canbe between 3 and 30 characters. This is captured by the regular expression:`\p{L}\p{N}{1,28}[\p{L}\p{N}]`. The caller must have`resourcemanager.folders.update` permission on the identified folder. If theupdate fails due to the unique name constraint then a PreconditionFailureexplaining this violation will be returned in the Status.details field.
- name: Output only. The resource name of the Folder. Its format is`folders/{folder_id}`, for example: "folders/1234".
func (*FoldersService)Search¶
func (r *FoldersService) Search(searchfoldersrequest *SearchFoldersRequest) *FoldersSearchCall
Search: Search for folders that match specific filter criteria. Searchprovides an eventually consistent view of the folders a user has access towhich meet the specified filter criteria. This will only return folders onwhich the caller has the permission `resourcemanager.folders.get`.
func (*FoldersService)SetIamPolicy¶
func (r *FoldersService) SetIamPolicy(resourcestring, setiampolicyrequest *SetIamPolicyRequest) *FoldersSetIamPolicyCall
SetIamPolicy: Sets the access control policy on a Folder, replacing anyexisting policy. The `resource` field should be the Folder's resource name,e.g. "folders/1234". The caller must have`resourcemanager.folders.setIamPolicy` permission on the identified folder.
- resource: REQUIRED: The resource for which the policy is being specified.See Resource names (https://cloud.google.com/apis/design/resource_names)for the appropriate value for this field.
func (*FoldersService)TestIamPermissions¶
func (r *FoldersService) TestIamPermissions(resourcestring, testiampermissionsrequest *TestIamPermissionsRequest) *FoldersTestIamPermissionsCall
TestIamPermissions: Returns permissions that a caller has on the specifiedFolder. The `resource` field should be the Folder's resource name, e.g."folders/1234". There are no permissions required for making this API call.
- resource: REQUIRED: The resource for which the policy detail is beingrequested. See Resource names(https://cloud.google.com/apis/design/resource_names) for the appropriatevalue for this field.
func (*FoldersService)Undelete¶
func (r *FoldersService) Undelete(namestring, undeletefolderrequest *UndeleteFolderRequest) *FoldersUndeleteCall
Undelete: Cancels the deletion request for a Folder. This method may only becalled on a Folder in the DELETE_REQUESTED state. In order to succeed, theFolder's parent must be in the ACTIVE state. In addition, reintroducing thefolder into the tree must not violate folder naming, height and fanoutconstraints described in the CreateFolder documentation. The caller musthave `resourcemanager.folders.undelete` permission on the identified folder.
- name: The resource name of the Folder to undelete. Must be of the form`folders/{folder_id}`.
typeFoldersSetIamPolicyCall¶
type FoldersSetIamPolicyCall struct {// contains filtered or unexported fields}func (*FoldersSetIamPolicyCall)Context¶
func (c *FoldersSetIamPolicyCall) Context(ctxcontext.Context) *FoldersSetIamPolicyCall
Context sets the context to be used in this call's Do method.
func (*FoldersSetIamPolicyCall)Do¶
func (c *FoldersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy,error)
Do executes the "cloudresourcemanager.folders.setIamPolicy" call.Any non-2xx status code is an error. Response headers are in either*Policy.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersSetIamPolicyCall)Fields¶
func (c *FoldersSetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersSetIamPolicyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersSetIamPolicyCall)Header¶
func (c *FoldersSetIamPolicyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFoldersTestIamPermissionsCall¶
type FoldersTestIamPermissionsCall struct {// contains filtered or unexported fields}func (*FoldersTestIamPermissionsCall)Context¶
func (c *FoldersTestIamPermissionsCall) Context(ctxcontext.Context) *FoldersTestIamPermissionsCall
Context sets the context to be used in this call's Do method.
func (*FoldersTestIamPermissionsCall)Do¶
func (c *FoldersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse,error)
Do executes the "cloudresourcemanager.folders.testIamPermissions" call.Any non-2xx status code is an error. Response headers are in either*TestIamPermissionsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*FoldersTestIamPermissionsCall)Fields¶
func (c *FoldersTestIamPermissionsCall) Fields(s ...googleapi.Field) *FoldersTestIamPermissionsCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersTestIamPermissionsCall)Header¶
func (c *FoldersTestIamPermissionsCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFoldersUndeleteCall¶
type FoldersUndeleteCall struct {// contains filtered or unexported fields}func (*FoldersUndeleteCall)Context¶
func (c *FoldersUndeleteCall) Context(ctxcontext.Context) *FoldersUndeleteCall
Context sets the context to be used in this call's Do method.
func (*FoldersUndeleteCall)Do¶
func (c *FoldersUndeleteCall) Do(opts ...googleapi.CallOption) (*Folder,error)
Do executes the "cloudresourcemanager.folders.undelete" call.Any non-2xx status code is an error. Response headers are in either*Folder.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FoldersUndeleteCall)Fields¶
func (c *FoldersUndeleteCall) Fields(s ...googleapi.Field) *FoldersUndeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FoldersUndeleteCall)Header¶
func (c *FoldersUndeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeGetIamPolicyRequest¶
type GetIamPolicyRequest struct {// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to// `GetIamPolicy`.Options *GetPolicyOptions `json:"options,omitempty"`// ForceSendFields is a list of field names (e.g. "Options") 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. "Options") 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:"-"`}GetIamPolicyRequest: Request message for `GetIamPolicy` method.
func (GetIamPolicyRequest)MarshalJSON¶added inv0.8.0
func (sGetIamPolicyRequest) MarshalJSON() ([]byte,error)
typeGetPolicyOptions¶added inv0.8.0
type GetPolicyOptions struct {// RequestedPolicyVersion: Optional. The maximum policy version that will be// used to format the policy. Valid values are 0, 1, and 3. Requests specifying// an invalid value will be rejected. Requests for policies with any// conditional role bindings must specify version 3. Policies with no// conditional role bindings may specify any valid value or leave the field// unset. The policy in the response might use the policy version that you// specified, or it might use a lower policy version. For example, if you// specify version 3, but the policy has no conditional role bindings, the// response uses version 1. To learn which resources support conditions in// their IAM policies, see the IAM documentation// (https://cloud.google.com/iam/help/conditions/resource-policies).RequestedPolicyVersionint64 `json:"requestedPolicyVersion,omitempty"`// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") 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. "RequestedPolicyVersion") 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:"-"`}GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
func (GetPolicyOptions)MarshalJSON¶added inv0.8.0
func (sGetPolicyOptions) MarshalJSON() ([]byte,error)
typeListFoldersResponse¶
type ListFoldersResponse struct {// Folders: A possibly paginated list of Folders that are direct descendants of// the specified parent resource.Folders []*Folder `json:"folders,omitempty"`// NextPageToken: A pagination token returned from a previous call to// `ListFolders` that indicates from where listing should continue.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. "Folders") 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. "Folders") 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:"-"`}ListFoldersResponse: The ListFolders response message.
func (ListFoldersResponse)MarshalJSON¶
func (sListFoldersResponse) MarshalJSON() ([]byte,error)
typeMoveFolderMetadata¶added inv0.36.0
type MoveFolderMetadata struct {// DestinationParent: The resource name of the folder or organization to move// the folder to.DestinationParentstring `json:"destinationParent,omitempty"`// DisplayName: The display name of the folder.DisplayNamestring `json:"displayName,omitempty"`// SourceParent: The resource name of the folder's parent.SourceParentstring `json:"sourceParent,omitempty"`// ForceSendFields is a list of field names (e.g. "DestinationParent") 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. "DestinationParent") 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:"-"`}MoveFolderMetadata: Metadata pertaining to the folder move process.
func (MoveFolderMetadata)MarshalJSON¶added inv0.36.0
func (sMoveFolderMetadata) MarshalJSON() ([]byte,error)
typeMoveFolderRequest¶
type MoveFolderRequest struct {// DestinationParent: Required. The resource name of the Folder or Organization// to reparent the folder under. Must be of the form `folders/{folder_id}` or// `organizations/{org_id}`.DestinationParentstring `json:"destinationParent,omitempty"`// ForceSendFields is a list of field names (e.g. "DestinationParent") 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. "DestinationParent") 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:"-"`}MoveFolderRequest: The MoveFolder request message.
func (MoveFolderRequest)MarshalJSON¶
func (sMoveFolderRequest) MarshalJSON() ([]byte,error)
typeMoveProjectMetadata¶added inv0.36.0
type MoveProjectMetadata struct {}MoveProjectMetadata: A status object which is used as the `metadata` fieldfor the Operation returned by MoveProject.
typeOperation¶
type Operation struct {// Done: If the value is `false`, it means the operation is still in progress.// If `true`, the operation is completed, and either `error` or `response` is// available.Donebool `json:"done,omitempty"`// Error: The error result of the operation in case of failure or cancellation.Error *Status `json:"error,omitempty"`// Metadata: Service-specific metadata associated with the operation. It// typically contains progress information and common metadata such as create// time. Some services might not provide such metadata. Any method that returns// a long-running operation should document the metadata type, if any.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: The server-assigned name, which is only unique within the same service// that originally returns it. If you use the default HTTP mapping, the `name`// should be a resource name ending with `operations/{unique_id}`.Namestring `json:"name,omitempty"`// Response: The normal, successful response of the operation. If the original// method returns no data on success, such as `Delete`, the response is// `google.protobuf.Empty`. If the original method is standard// `Get`/`Create`/`Update`, the response should be the resource. For other// methods, the response should have the type `XxxResponse`, where `Xxx` is the// original method name. For example, if the original method name is// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.Responsegoogleapi.RawMessage `json:"response,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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:"-"`}Operation: This resource represents a long-running operation that is theresult of a network API call.
func (Operation)MarshalJSON¶
typeOperationsGetCall¶
type OperationsGetCall struct {// contains filtered or unexported fields}func (*OperationsGetCall)Context¶
func (c *OperationsGetCall) Context(ctxcontext.Context) *OperationsGetCall
Context sets the context to be used in this call's Do method.
func (*OperationsGetCall)Do¶
func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "cloudresourcemanager.operations.get" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*OperationsGetCall)Fields¶
func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*OperationsGetCall)Header¶
func (c *OperationsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*OperationsGetCall)IfNoneMatch¶
func (c *OperationsGetCall) IfNoneMatch(entityTagstring) *OperationsGetCall
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.
typeOperationsService¶
type OperationsService struct {// contains filtered or unexported fields}funcNewOperationsService¶
func NewOperationsService(s *Service) *OperationsService
func (*OperationsService)Get¶
func (r *OperationsService) Get(namestring) *OperationsGetCall
Get: Gets the latest state of a long-running operation. Clients can use thismethod to poll the operation result at intervals as recommended by the APIservice.
- name: The name of the operation resource.
typePolicy¶
type Policy struct {// AuditConfigs: Specifies cloud audit logging configuration for this policy.AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`// Bindings: Associates a list of `members`, or principals, with a `role`.// Optionally, may specify a `condition` that determines how and when the// `bindings` are applied. Each of the `bindings` must contain at least one// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;// up to 250 of these principals can be Google groups. Each occurrence of a// principal counts towards these limits. For example, if the `bindings` grant// 50 different roles to `user:alice@example.com`, and not to any other// principal, then you can add another 1,450 principals to the `bindings` in// the `Policy`.Bindings []*Binding `json:"bindings,omitempty"`// Etag: `etag` is used for optimistic concurrency control as a way to help// prevent simultaneous updates of a policy from overwriting each other. It is// strongly suggested that systems make use of the `etag` in the// read-modify-write cycle to perform policy updates in order to avoid race// conditions: An `etag` is returned in the response to `getIamPolicy`, and// systems are expected to put that etag in the request to `setIamPolicy` to// ensure that their change will be applied to the same version of the policy.// **Important:** If you use IAM Conditions, you must include the `etag` field// whenever you call `setIamPolicy`. If you omit this field, then IAM allows// you to overwrite a version `3` policy with a version `1` policy, and all of// the conditions in the version `3` policy are lost.Etagstring `json:"etag,omitempty"`// Version: Specifies the format of the policy. Valid values are `0`, `1`, and// `3`. Requests that specify an invalid value are rejected. Any operation that// affects conditional role bindings must specify version `3`. This requirement// applies to the following operations: * Getting a policy that includes a// conditional role binding * Adding a conditional role binding to a policy *// Changing a conditional role binding in a policy * Removing any role binding,// with or without a condition, from a policy that includes conditions// **Important:** If you use IAM Conditions, you must include the `etag` field// whenever you call `setIamPolicy`. If you omit this field, then IAM allows// you to overwrite a version `3` policy with a version `1` policy, and all of// the conditions in the version `3` policy are lost. If a policy does not// include any conditions, operations on that policy may specify any valid// version or leave the field unset. To learn which resources support// conditions in their IAM policies, see the IAM documentation// (https://cloud.google.com/iam/help/conditions/resource-policies).Versionint64 `json:"version,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") 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:"-"`}Policy: An Identity and Access Management (IAM) policy, which specifiesaccess controls for Google Cloud resources. A `Policy` is a collection of`bindings`. A `binding` binds one or more `members`, or principals, to asingle `role`. Principals can be user accounts, service accounts, Googlegroups, and domains (such as G Suite). A `role` is a named list ofpermissions; each `role` can be an IAM predefined role or a user-createdcustom role. For some types of Google Cloud resources, a `binding` can alsospecify a `condition`, which is a logical expression that allows access to aresource only if the expression evaluates to `true`. A condition can addconstraints based on attributes of the request, the resource, or both. Tolearn which resources support conditions in their IAM policies, see the IAMdocumentation(https://cloud.google.com/iam/help/conditions/resource-policies). **JSONexample:** ``` { "bindings": [ { "role":"roles/resourcemanager.organizationAdmin", "members": ["user:mike@example.com", "group:admins@example.com", "domain:google.com","serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":"roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com" ], "condition": { "title": "expirable access","description": "Does not grant access after Sep 2020", "expression":"request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":"BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -members: - user:mike@example.com - group:admins@example.com -domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.comrole: roles/resourcemanager.organizationAdmin - members: -user:eve@example.com role: roles/resourcemanager.organizationViewercondition: title: expirable access description: Does not grant access afterSep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,see the IAM documentation (https://cloud.google.com/iam/docs/).
func (Policy)MarshalJSON¶
typeProjectCreationStatus¶
type ProjectCreationStatus struct {// CreateTime: Creation time of the project creation workflow.CreateTimestring `json:"createTime,omitempty"`// Gettable: True if the project can be retrieved using GetProject. No other// operations on the project are guaranteed to work until the project creation// is complete.Gettablebool `json:"gettable,omitempty"`// Ready: True if the project creation process is complete.Readybool `json:"ready,omitempty"`// ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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:"-"`}ProjectCreationStatus: A status object which is used as the `metadata` fieldfor the Operation returned by CreateProject. It provides insight for whensignificant phases of Project creation have completed.
func (ProjectCreationStatus)MarshalJSON¶
func (sProjectCreationStatus) MarshalJSON() ([]byte,error)
typeSearchFoldersRequest¶
type SearchFoldersRequest struct {// PageSize: Optional. The maximum number of folders to return in the response.// The server can return fewer folders than requested. If unspecified, server// picks an appropriate default.PageSizeint64 `json:"pageSize,omitempty"`// PageToken: Optional. A pagination token returned from a previous call to// `SearchFolders` that indicates from where search should continue.PageTokenstring `json:"pageToken,omitempty"`// Query: Search criteria used to select the Folders to return. If no search// criteria is specified then all accessible folders will be returned. Query// expressions can be used to restrict results based upon displayName,// lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`// can be used along with the suffix wildcard symbol `*`. The displayName field// in a query expression should use escaped quotes for values that include// whitespace to prevent unexpected behavior. Some example queries are: * Query// `displayName=Test*` returns Folder resources whose display name starts with// "Test". * Query `lifecycleState=ACTIVE` returns Folder resources with// `lifecycleState` set to `ACTIVE`. * Query `parent=folders/123` returns// Folder resources that have `folders/123` as a parent resource. * Query// `parent=folders/123 AND lifecycleState=ACTIVE` returns active Folder// resources that have `folders/123` as a parent resource. * Query// `displayName=\\"Test String\\" returns Folder resources with display names// that include both "Test" and "String".Querystring `json:"query,omitempty"`// ForceSendFields is a list of field names (e.g. "PageSize") 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. "PageSize") 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:"-"`}SearchFoldersRequest: The request message for searching folders.
func (SearchFoldersRequest)MarshalJSON¶
func (sSearchFoldersRequest) MarshalJSON() ([]byte,error)
typeSearchFoldersResponse¶
type SearchFoldersResponse struct {// Folders: A possibly paginated folder search results. the specified parent// resource.Folders []*Folder `json:"folders,omitempty"`// NextPageToken: A pagination token returned from a previous call to// `SearchFolders` that indicates from where searching should continue.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. "Folders") 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. "Folders") 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:"-"`}SearchFoldersResponse: The response message for searching folders.
func (SearchFoldersResponse)MarshalJSON¶
func (sSearchFoldersResponse) MarshalJSON() ([]byte,error)
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentFolders *FoldersServiceOperations *OperationsService// contains filtered or unexported fields} funcNewdeprecated
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¶added inv0.3.0
NewService creates a new Service.
typeSetIamPolicyRequest¶
type SetIamPolicyRequest struct {// Policy: REQUIRED: The complete policy to be applied to the `resource`. The// size of the policy is limited to a few 10s of KB. An empty policy is a valid// policy but certain Google Cloud services (such as Projects) might reject// them.Policy *Policy `json:"policy,omitempty"`// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to// modify. Only the fields in the mask will be modified. If no mask is// provided, the following default mask is used: `paths: "bindings, etag"UpdateMaskstring `json:"updateMask,omitempty"`// ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") 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:"-"`}SetIamPolicyRequest: Request message for `SetIamPolicy` method.
func (SetIamPolicyRequest)MarshalJSON¶
func (sSetIamPolicyRequest) MarshalJSON() ([]byte,error)
typeStatus¶
type Status struct {// Code: The status code, which should be an enum value of google.rpc.Code.Codeint64 `json:"code,omitempty"`// Details: A list of messages that carry the error details. There is a common// set of message types for APIs to use.Details []googleapi.RawMessage `json:"details,omitempty"`// Message: A developer-facing error message, which should be in English. Any// user-facing error message should be localized and sent in the// google.rpc.Status.details field, or localized by the client.Messagestring `json:"message,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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:"-"`}Status: The `Status` type defines a logical error model that is suitable fordifferent programming environments, including REST APIs and RPC APIs. It isused by gRPC (https://github.com/grpc). Each `Status` message contains threepieces of data: error code, error message, and error details. You can findout more about this error model and how to work with it in the API DesignGuide (https://cloud.google.com/apis/design/errors).
func (Status)MarshalJSON¶
typeTestIamPermissionsRequest¶
type TestIamPermissionsRequest struct {// Permissions: The set of permissions to check for the `resource`. Permissions// with wildcards (such as `*` or `storage.*`) are not allowed. For more// information see IAM Overview// (https://cloud.google.com/iam/docs/overview#permissions).Permissions []string `json:"permissions,omitempty"`// ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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:"-"`}TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
func (TestIamPermissionsRequest)MarshalJSON¶
func (sTestIamPermissionsRequest) MarshalJSON() ([]byte,error)
typeTestIamPermissionsResponse¶
type TestIamPermissionsResponse struct {// Permissions: A subset of `TestPermissionsRequest.permissions` that the// caller is allowed.Permissions []string `json:"permissions,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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:"-"`}TestIamPermissionsResponse: Response message for `TestIamPermissions`method.
func (TestIamPermissionsResponse)MarshalJSON¶
func (sTestIamPermissionsResponse) MarshalJSON() ([]byte,error)
typeUndeleteFolderMetadata¶added inv0.36.0
type UndeleteFolderMetadata struct {}UndeleteFolderMetadata: A status object which is used as the `metadata`field for the `Operation` returned by `UndeleteFolder`.
typeUndeleteFolderRequest¶
type UndeleteFolderRequest struct {}UndeleteFolderRequest: The UndeleteFolder request message.
typeUndeleteOrganizationMetadata¶added inv0.36.0
type UndeleteOrganizationMetadata struct {}UndeleteOrganizationMetadata: A status object which is used as the`metadata` field for the Operation returned by UndeleteOrganization.
typeUndeleteProjectMetadata¶added inv0.36.0
type UndeleteProjectMetadata struct {}UndeleteProjectMetadata: A status object which is used as the `metadata`field for the Operation returned by `UndeleteProject`.
typeUpdateFolderMetadata¶added inv0.36.0
type UpdateFolderMetadata struct {}UpdateFolderMetadata: A status object which is used as the `metadata` fieldfor the Operation returned by UpdateFolder.
typeUpdateProjectMetadata¶added inv0.36.0
type UpdateProjectMetadata struct {}UpdateProjectMetadata: A status object which is used as the `metadata` fieldfor the Operation returned by UpdateProject.
typeUpdateTagKeyMetadata¶added inv0.36.0
type UpdateTagKeyMetadata struct {}UpdateTagKeyMetadata: Runtime operation information for updating a TagKey.
typeUpdateTagValueMetadata¶added inv0.36.0
type UpdateTagValueMetadata struct {}UpdateTagValueMetadata: Runtime operation information for updating aTagValue.