Documentation ¶
Overview ¶
Package cloudresourcemanager provides access to the Cloud Resource Manager API.
For product documentation, see: https://cloud.google.com/resource-manager
Creating a client ¶
Usage example:
import "google.golang.org/api/cloudresourcemanager/v2beta1" ... ctx := context.Background() cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, see https://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, use option.WithScopes:
cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope))
To use an API key for authentication (note: some APIs do not support API keys), use 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 OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ 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 Account CloudPlatformReadOnlyScope = "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 ¶
type AuditConfig ¶
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. Service string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
AuditConfig: Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple 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" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
func (*AuditConfig) MarshalJSON ¶
func (s *AuditConfig) MarshalJSON() ([]byte, error)
type AuditLogConfig ¶
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 list LogType string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
AuditLogConfig: Provides the configuration for logging a type of permissions. 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, while exempting jose@example.com from DATA_READ logging.
func (*AuditLogConfig) MarshalJSON ¶
func (s *AuditLogConfig) MarshalJSON() ([]byte, error)
type Binding ¶
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 members // 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 identities requesting access for a Cloud // Platform 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. * // `user:{emailid}`: An email address that represents a specific Google // account. For example, `alice@example.com` . * // `serviceAccount:{emailid}`: An email address that represents a // service account. For example, // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An // email address that represents a Google group. For example, // `admins@example.com`. * `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. * `domain:{domain}`: The G // Suite domain (primary) that represents all the users of that domain. // For example, `google.com` or `example.com`. Members []string `json:"members,omitempty"` // Role: Role that is assigned to `members`. For example, // `roles/viewer`, `roles/editor`, or `roles/owner`. Role string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Binding: Associates `members` with a `role`.
func (*Binding) MarshalJSON ¶
type CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation ¶ added in v0.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. DestinationParent string `json:"destinationParent,omitempty"` // DisplayName: The display name of the folder. DisplayName string `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. OperationType string `json:"operationType,omitempty"` // SourceParent: The resource name of the folder's parent. Only // applicable when the operation_type is MOVE. SourceParent string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation:
Metadata describing a long running folder operation
func (*CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation) MarshalJSON ¶ added in v0.35.0
func (s *CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation) MarshalJSON() ([]byte, error)
type CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation ¶ added in v0.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. DestinationParent string `json:"destinationParent,omitempty"` // DisplayName: The display name of the folder. DisplayName string `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. OperationType string `json:"operationType,omitempty"` // SourceParent: The resource name of the folder's parent. Only // applicable when the operation_type is MOVE. SourceParent string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation: Metadata describing a long running folder operation
func (*CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation) MarshalJSON ¶ added in v0.35.0
func (s *CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation) MarshalJSON() ([]byte, error)
type CreateFolderMetadata ¶ added in v0.36.0
type CreateFolderMetadata struct { // DisplayName: The display name of the folder. DisplayName string `json:"displayName,omitempty"` // Parent: The resource name of the folder or organization we are // creating the folder under. Parent string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
CreateFolderMetadata: Metadata pertaining to the Folder creation process.
func (*CreateFolderMetadata) MarshalJSON ¶ added in v0.36.0
func (s *CreateFolderMetadata) MarshalJSON() ([]byte, error)
type CreateProjectMetadata ¶ added in v0.36.0
type CreateProjectMetadata struct { // CreateTime: Creation time of the project creation workflow. CreateTime string `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. Gettable bool `json:"gettable,omitempty"` // Ready: True if the project creation process is complete. Ready bool `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
CreateProjectMetadata: A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.
func (*CreateProjectMetadata) MarshalJSON ¶ added in v0.36.0
func (s *CreateProjectMetadata) MarshalJSON() ([]byte, error)
type CreateTagBindingMetadata ¶ added in v0.45.0
type CreateTagBindingMetadata struct { }
CreateTagBindingMetadata: Runtime operation information for creating a TagValue.
type CreateTagKeyMetadata ¶ added in v0.36.0
type CreateTagKeyMetadata struct { }
CreateTagKeyMetadata: Runtime operation information for creating a TagKey.
type CreateTagValueMetadata ¶ added in v0.36.0
type CreateTagValueMetadata struct { }
CreateTagValueMetadata: Runtime operation information for creating a TagValue.
type DeleteFolderMetadata ¶ added in v0.36.0
type DeleteFolderMetadata struct { }
DeleteFolderMetadata: A status object which is used as the `metadata` field for the `Operation` returned by `DeleteFolder`.
type DeleteOrganizationMetadata ¶ added in v0.36.0
type DeleteOrganizationMetadata struct { }
DeleteOrganizationMetadata: A status object which is used as the `metadata` field for the operation returned by DeleteOrganization.
type DeleteProjectMetadata ¶ added in v0.36.0
type DeleteProjectMetadata struct { }
DeleteProjectMetadata: A status object which is used as the `metadata` field for the Operation returned by `DeleteProject`.
type DeleteTagBindingMetadata ¶ added in v0.45.0
type DeleteTagBindingMetadata struct { }
DeleteTagBindingMetadata: Runtime operation information for deleting a TagBinding.
type DeleteTagKeyMetadata ¶ added in v0.36.0
type DeleteTagKeyMetadata struct { }
DeleteTagKeyMetadata: Runtime operation information for deleting a TagKey.
type DeleteTagValueMetadata ¶ added in v0.36.0
type DeleteTagValueMetadata struct { }
DeleteTagValueMetadata: Runtime operation information for deleting a TagValue.
type Expr ¶
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. Description string `json:"description,omitempty"` // Expression: Textual representation of an expression in Common // Expression Language syntax. Expression string `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. Location string `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. Title string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. 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 semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor 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 message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
func (*Expr) MarshalJSON ¶
type Folder ¶
type Folder struct { // CreateTime: Output only. Timestamp when the Folder was created. // Assigned by the server. CreateTime string `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}])?`. DisplayName string `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. LifecycleState string `json:"lifecycleState,omitempty"` // Name: Output only. The resource name of the Folder. Its format is // `folders/{folder_id}`, for example: "folders/1234". Name string `json:"name,omitempty"` // Parent: Required. The Folder's parent's resource name. Updates to the // folder's parent must be performed via MoveFolder. Parent string `json:"parent,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Folder: A Folder in an Organization's resource hierarchy, used to organize that Organization's resources.
func (*Folder) MarshalJSON ¶
type FolderOperation ¶
type FolderOperation struct { // DestinationParent: The resource name of the folder or organization we // are either creating the folder under or moving the folder to. DestinationParent string `json:"destinationParent,omitempty"` // DisplayName: The display name of the folder. DisplayName string `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. OperationType string `json:"operationType,omitempty"` // SourceParent: The resource name of the folder's parent. Only // applicable when the operation_type is MOVE. SourceParent string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
FolderOperation: Metadata describing a long running folder operation
func (*FolderOperation) MarshalJSON ¶
func (s *FolderOperation) MarshalJSON() ([]byte, error)
type FolderOperationError ¶
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. ErrorMessageId string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
FolderOperationError: A classification of the Folder Operation error.
func (*FolderOperationError) MarshalJSON ¶
func (s *FolderOperationError) MarshalJSON() ([]byte, error)
type FoldersCreateCall ¶
type FoldersCreateCall struct {
// contains filtered or unexported fields
}
func (*FoldersCreateCall) Context ¶
func (c *FoldersCreateCall) Context(ctx context.Context) *FoldersCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersCreateCall) Do ¶
func (c *FoldersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
Do executes the "cloudresourcemanager.folders.create" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersCreateCall) Header ¶
func (c *FoldersCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*FoldersCreateCall) Parent ¶
func (c *FoldersCreateCall) Parent(parent string) *FoldersCreateCall
Parent sets the optional parameter "parent": Required. The resource name of the new Folder's parent. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
type FoldersDeleteCall ¶
type FoldersDeleteCall struct {
// contains filtered or unexported fields
}
func (*FoldersDeleteCall) Context ¶
func (c *FoldersDeleteCall) Context(ctx context.Context) *FoldersDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersDeleteCall) Do ¶
func (c *FoldersDeleteCall) Do(opts ...googleapi.CallOption) (*Folder, error)
Do executes the "cloudresourcemanager.folders.delete" call. Exactly one of *Folder or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Folder.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersDeleteCall) Header ¶
func (c *FoldersDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type FoldersGetCall ¶
type FoldersGetCall struct {
// contains filtered or unexported fields
}
func (*FoldersGetCall) Context ¶
func (c *FoldersGetCall) Context(ctx context.Context) *FoldersGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersGetCall) Do ¶
func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error)
Do executes the "cloudresourcemanager.folders.get" call. Exactly one of *Folder or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Folder.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersGetCall) Header ¶
func (c *FoldersGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*FoldersGetCall) IfNoneMatch ¶
func (c *FoldersGetCall) IfNoneMatch(entityTag string) *FoldersGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type FoldersGetIamPolicyCall ¶
type FoldersGetIamPolicyCall struct {
// contains filtered or unexported fields
}
func (*FoldersGetIamPolicyCall) Context ¶
func (c *FoldersGetIamPolicyCall) Context(ctx context.Context) *FoldersGetIamPolicyCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersGetIamPolicyCall) Do ¶
func (c *FoldersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error)
Do executes the "cloudresourcemanager.folders.getIamPolicy" call. Exactly one of *Policy or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Policy.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersGetIamPolicyCall) Header ¶
func (c *FoldersGetIamPolicyCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type FoldersListCall ¶
type FoldersListCall struct {
// contains filtered or unexported fields
}
func (*FoldersListCall) Context ¶
func (c *FoldersListCall) Context(ctx context.Context) *FoldersListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersListCall) Do ¶
func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*ListFoldersResponse, error)
Do executes the "cloudresourcemanager.folders.list" call. Exactly one of *ListFoldersResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListFoldersResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*FoldersListCall) Fields ¶
func (c *FoldersListCall) Fields(s ...googleapi.Field) *FoldersListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersListCall) Header ¶
func (c *FoldersListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*FoldersListCall) IfNoneMatch ¶
func (c *FoldersListCall) IfNoneMatch(entityTag string) *FoldersListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*FoldersListCall) PageSize ¶
func (c *FoldersListCall) PageSize(pageSize int64) *FoldersListCall
PageSize sets the optional parameter "pageSize": The maximum number of Folders to return in the response.
func (*FoldersListCall) PageToken ¶
func (c *FoldersListCall) PageToken(pageToken string) *FoldersListCall
PageToken sets the optional parameter "pageToken": A pagination token returned from a previous call to `ListFolders` that indicates where this listing should continue from.
func (*FoldersListCall) Pages ¶
func (c *FoldersListCall) Pages(ctx context.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(parent string) *FoldersListCall
Parent sets the optional parameter "parent": Required. The resource name of the Organization or Folder whose Folders are being listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`.
func (*FoldersListCall) ShowDeleted ¶
func (c *FoldersListCall) ShowDeleted(showDeleted bool) *FoldersListCall
ShowDeleted sets the optional parameter "showDeleted": Controls whether Folders in the DELETE_REQUESTED state should be returned. Defaults to false.
type FoldersMoveCall ¶
type FoldersMoveCall struct {
// contains filtered or unexported fields
}
func (*FoldersMoveCall) Context ¶
func (c *FoldersMoveCall) Context(ctx context.Context) *FoldersMoveCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersMoveCall) Do ¶
func (c *FoldersMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error)
Do executes the "cloudresourcemanager.folders.move" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersMoveCall) Header ¶
func (c *FoldersMoveCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type FoldersPatchCall ¶
type FoldersPatchCall struct {
// contains filtered or unexported fields
}
func (*FoldersPatchCall) Context ¶
func (c *FoldersPatchCall) Context(ctx context.Context) *FoldersPatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersPatchCall) Do ¶
func (c *FoldersPatchCall) Do(opts ...googleapi.CallOption) (*Folder, error)
Do executes the "cloudresourcemanager.folders.patch" call. Exactly one of *Folder or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Folder.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersPatchCall) Header ¶
func (c *FoldersPatchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*FoldersPatchCall) UpdateMask ¶
func (c *FoldersPatchCall) UpdateMask(updateMask string) *FoldersPatchCall
UpdateMask sets the optional parameter "updateMask": Required. Fields to be updated. Only the `display_name` can be updated.
type FoldersSearchCall ¶
type FoldersSearchCall struct {
// contains filtered or unexported fields
}
func (*FoldersSearchCall) Context ¶
func (c *FoldersSearchCall) Context(ctx context.Context) *FoldersSearchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersSearchCall) Do ¶
func (c *FoldersSearchCall) Do(opts ...googleapi.CallOption) (*SearchFoldersResponse, error)
Do executes the "cloudresourcemanager.folders.search" call. Exactly one of *SearchFoldersResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SearchFoldersResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*FoldersSearchCall) Fields ¶
func (c *FoldersSearchCall) Fields(s ...googleapi.Field) *FoldersSearchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersSearchCall) Header ¶
func (c *FoldersSearchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*FoldersSearchCall) Pages ¶
func (c *FoldersSearchCall) Pages(ctx context.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.
type FoldersService ¶
type FoldersService struct {
// contains filtered or unexported fields
}
func NewFoldersService ¶
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 Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folders that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 10. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 20; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must 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 may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent.
func (*FoldersService) Delete ¶
func (r *FoldersService) Delete(name string) *FoldersDeleteCall
Delete: Requests deletion of a Folder. The Folder is moved into the DELETE_REQUESTED state immediately, and is deleted approximately 30 days later. This method may only be called on an empty Folder in the ACTIVE state, where a Folder is empty if it doesn't contain any Folders or Projects in 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(name string) *FoldersGetCall
Get: Retrieves a Folder identified by the supplied resource name. Valid Folder 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(resource string, getiampolicyrequest *GetIamPolicyRequest) *FoldersGetIamPolicyCall
GetIamPolicy: Gets the access control policy for a Folder. The returned policy 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 caller must have `resourcemanager.folders.getIamPolicy` permission on the identified folder.
- resource: REQUIRED: The resource for which the policy is being requested. See the operation documentation 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 parent resource. List provides a strongly consistent view of the Folders underneath the 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(name string, movefolderrequest *MoveFolderRequest) *FoldersMoveCall
Move: Moves a Folder under a new resource parent. Returns an Operation which can be used to track the progress of the folder move workflow. Upon success the Operation.response field will be populated with the moved Folder. Upon failure, a FolderOperationError categorizing the failure cause will be returned - if the failure occurs synchronously then the FolderOperationError will be returned via the Status.details field and if it occurs asynchronously then the FolderOperation will be returned via the Operation.error field. In addition, the Operation.metadata field will be populated with a FolderOperation message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height or fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.move` permission on the folder's current and proposed new parent.
- name: The resource name of the Folder to move. Must be of the form folders/{folder_id}.
func (*FoldersService) Patch ¶
func (r *FoldersService) Patch(name string, folder *Folder) *FoldersPatchCall
Patch: Updates a Folder, changing its display_name. Changes to the folder display_name will be rejected if they violate either the display_name formatting rules or naming constraints described in the CreateFolder documentation. The Folder's display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be 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 the update fails due to the unique name constraint then a PreconditionFailure explaining 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. Search provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. This will only return folders on which the caller has the permission `resourcemanager.folders.get`.
func (*FoldersService) SetIamPolicy ¶
func (r *FoldersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *FoldersSetIamPolicyCall
SetIamPolicy: Sets the access control policy on a Folder, replacing any existing 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 the operation documentation for the appropriate value for this field.
func (*FoldersService) TestIamPermissions ¶
func (r *FoldersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *FoldersTestIamPermissionsCall
TestIamPermissions: Returns permissions that a caller has on the specified Folder. 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 being requested. See the operation documentation for the appropriate value for this field.
func (*FoldersService) Undelete ¶
func (r *FoldersService) Undelete(name string, undeletefolderrequest *UndeleteFolderRequest) *FoldersUndeleteCall
Undelete: Cancels the deletion request for a Folder. This method may only be called on a Folder in the DELETE_REQUESTED state. In order to succeed, the Folder's parent must be in the ACTIVE state. In addition, reintroducing the folder into the tree must not violate folder naming, height and fanout constraints described in the CreateFolder documentation. The caller must have `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}`.
type FoldersSetIamPolicyCall ¶
type FoldersSetIamPolicyCall struct {
// contains filtered or unexported fields
}
func (*FoldersSetIamPolicyCall) Context ¶
func (c *FoldersSetIamPolicyCall) Context(ctx context.Context) *FoldersSetIamPolicyCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersSetIamPolicyCall) Do ¶
func (c *FoldersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error)
Do executes the "cloudresourcemanager.folders.setIamPolicy" call. Exactly one of *Policy or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Policy.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersSetIamPolicyCall) Header ¶
func (c *FoldersSetIamPolicyCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type FoldersTestIamPermissionsCall ¶
type FoldersTestIamPermissionsCall struct {
// contains filtered or unexported fields
}
func (*FoldersTestIamPermissionsCall) Context ¶
func (c *FoldersTestIamPermissionsCall) Context(ctx context.Context) *FoldersTestIamPermissionsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersTestIamPermissionsCall) Do ¶
func (c *FoldersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error)
Do executes the "cloudresourcemanager.folders.testIamPermissions" call. Exactly one of *TestIamPermissionsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TestIamPermissionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*FoldersTestIamPermissionsCall) Fields ¶
func (c *FoldersTestIamPermissionsCall) Fields(s ...googleapi.Field) *FoldersTestIamPermissionsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersTestIamPermissionsCall) Header ¶
func (c *FoldersTestIamPermissionsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type FoldersUndeleteCall ¶
type FoldersUndeleteCall struct {
// contains filtered or unexported fields
}
func (*FoldersUndeleteCall) Context ¶
func (c *FoldersUndeleteCall) Context(ctx context.Context) *FoldersUndeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*FoldersUndeleteCall) Do ¶
func (c *FoldersUndeleteCall) Do(opts ...googleapi.CallOption) (*Folder, error)
Do executes the "cloudresourcemanager.folders.undelete" call. Exactly one of *Folder or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Folder.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FoldersUndeleteCall) Header ¶
func (c *FoldersUndeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type GetIamPolicyRequest ¶
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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GetIamPolicyRequest: Request message for `GetIamPolicy` method.
func (*GetIamPolicyRequest) MarshalJSON ¶ added in v0.8.0
func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error)
type GetPolicyOptions ¶ added in v0.8.0
type GetPolicyOptions struct { // RequestedPolicyVersion: Optional. The policy format version to be // returned. Valid values are 0, 1, and 3. Requests specifying an // invalid value will be rejected. Requests for policies with any // conditional bindings must specify version 3. Policies without any // conditional bindings may specify any valid value 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). RequestedPolicyVersion int64 `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. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the // field is empty or not. This may be used to include empty fields in // Patch requests. 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. However, any // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
func (*GetPolicyOptions) MarshalJSON ¶ added in v0.8.0
func (s *GetPolicyOptions) MarshalJSON() ([]byte, error)
type ListFoldersResponse ¶
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. NextPageToken string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ListFoldersResponse: The ListFolders response message.
func (*ListFoldersResponse) MarshalJSON ¶
func (s *ListFoldersResponse) MarshalJSON() ([]byte, error)
type MoveFolderMetadata ¶ added in v0.36.0
type MoveFolderMetadata struct { // DestinationParent: The resource name of the folder or organization to // move the folder to. DestinationParent string `json:"destinationParent,omitempty"` // DisplayName: The display name of the folder. DisplayName string `json:"displayName,omitempty"` // SourceParent: The resource name of the folder's parent. SourceParent string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
MoveFolderMetadata: Metadata pertaining to the folder move process.
func (*MoveFolderMetadata) MarshalJSON ¶ added in v0.36.0
func (s *MoveFolderMetadata) MarshalJSON() ([]byte, error)
type MoveFolderRequest ¶
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}`. DestinationParent string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
MoveFolderRequest: The MoveFolder request message.
func (*MoveFolderRequest) MarshalJSON ¶
func (s *MoveFolderRequest) MarshalJSON() ([]byte, error)
type MoveProjectMetadata ¶ added in v0.36.0
type MoveProjectMetadata struct { }
MoveProjectMetadata: A status object which is used as the `metadata` field for the Operation returned by MoveProject.
type Operation ¶
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. Done bool `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. Metadata googleapi.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}`. Name string `json:"name,omitempty"` // Response: The normal response of the operation in case of success. 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`. Response googleapi.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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Operation: This resource represents a long-running operation that is the result of a network API call.
func (*Operation) MarshalJSON ¶
type OperationsGetCall ¶
type OperationsGetCall struct {
// contains filtered or unexported fields
}
func (*OperationsGetCall) Context ¶
func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*OperationsGetCall) Do ¶
func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
Do executes the "cloudresourcemanager.operations.get" call. Exactly one of *Operation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*OperationsGetCall) Header ¶
func (c *OperationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*OperationsGetCall) IfNoneMatch ¶
func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type OperationsService ¶
type OperationsService struct {
// contains filtered or unexported fields
}
func NewOperationsService ¶
func NewOperationsService(s *Service) *OperationsService
func (*OperationsService) Get ¶
func (r *OperationsService) Get(name string) *OperationsGetCall
Get: Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
- name: The name of the operation resource.
type Policy ¶
type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` // Bindings: Associates a list of `members` to 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 member. 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. Etag string `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). Version int64 `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Policy: An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "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.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer 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 For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
func (*Policy) MarshalJSON ¶
type ProjectCreationStatus ¶
type ProjectCreationStatus struct { // CreateTime: Creation time of the project creation workflow. CreateTime string `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. Gettable bool `json:"gettable,omitempty"` // Ready: True if the project creation process is complete. Ready bool `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ProjectCreationStatus: A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.
func (*ProjectCreationStatus) MarshalJSON ¶
func (s *ProjectCreationStatus) MarshalJSON() ([]byte, error)
type SearchFoldersRequest ¶
type SearchFoldersRequest struct { // PageSize: Optional. The maximum number of folders to return in the // response. PageSize int64 `json:"pageSize,omitempty"` // PageToken: Optional. A pagination token returned from a previous call // to `SearchFolders` that indicates from where search should continue. PageToken string `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". Query string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
SearchFoldersRequest: The request message for searching folders.
func (*SearchFoldersRequest) MarshalJSON ¶
func (s *SearchFoldersRequest) MarshalJSON() ([]byte, error)
type SearchFoldersResponse ¶
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. NextPageToken string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
SearchFoldersResponse: The response message for searching folders.
func (*SearchFoldersResponse) MarshalJSON ¶
func (s *SearchFoldersResponse) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Folders *FoldersService Operations *OperationsService // contains filtered or unexported fields }
func New
deprecated
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.
func NewService ¶ added in v0.3.0
NewService creates a new Service.
type SetIamPolicyRequest ¶
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 Cloud Platform 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" UpdateMask string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
SetIamPolicyRequest: Request message for `SetIamPolicy` method.
func (*SetIamPolicyRequest) MarshalJSON ¶
func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error)
type Status ¶
type Status struct { // Code: The status code, which should be an enum value of // google.rpc.Code. Code int64 `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. Message string `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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).
func (*Status) MarshalJSON ¶
type TestIamPermissionsRequest ¶
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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
func (*TestIamPermissionsRequest) MarshalJSON ¶
func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error)
type TestIamPermissionsResponse ¶
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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. 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. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
TestIamPermissionsResponse: Response message for `TestIamPermissions` method.
func (*TestIamPermissionsResponse) MarshalJSON ¶
func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error)
type UndeleteFolderMetadata ¶ added in v0.36.0
type UndeleteFolderMetadata struct { }
UndeleteFolderMetadata: A status object which is used as the `metadata` field for the `Operation` returned by `UndeleteFolder`.
type UndeleteFolderRequest ¶
type UndeleteFolderRequest struct { }
UndeleteFolderRequest: The UndeleteFolder request message.
type UndeleteOrganizationMetadata ¶ added in v0.36.0
type UndeleteOrganizationMetadata struct { }
UndeleteOrganizationMetadata: A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization.
type UndeleteProjectMetadata ¶ added in v0.36.0
type UndeleteProjectMetadata struct { }
UndeleteProjectMetadata: A status object which is used as the `metadata` field for the Operation returned by `UndeleteProject`.
type UpdateFolderMetadata ¶ added in v0.36.0
type UpdateFolderMetadata struct { }
UpdateFolderMetadata: A status object which is used as the `metadata` field for the Operation returned by UpdateFolder.
type UpdateProjectMetadata ¶ added in v0.36.0
type UpdateProjectMetadata struct { }
UpdateProjectMetadata: A status object which is used as the `metadata` field for the Operation returned by UpdateProject.
type UpdateTagKeyMetadata ¶ added in v0.36.0
type UpdateTagKeyMetadata struct { }
UpdateTagKeyMetadata: Runtime operation information for updating a TagKey.
type UpdateTagValueMetadata ¶ added in v0.36.0
type UpdateTagValueMetadata struct { }
UpdateTagValueMetadata: Runtime operation information for updating a TagValue.