Constants
Folders_ListFolders_FullMethodName, Folders_SearchFolders_FullMethodName, Folders_GetFolder_FullMethodName, Folders_CreateFolder_FullMethodName, Folders_UpdateFolder_FullMethodName, Folders_MoveFolder_FullMethodName, Folders_DeleteFolder_FullMethodName, Folders_UndeleteFolder_FullMethodName, Folders_GetIamPolicy_FullMethodName, Folders_SetIamPolicy_FullMethodName, Folders_TestIamPermissions_FullMethodName
const (
Folders_ListFolders_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/ListFolders"
Folders_SearchFolders_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/SearchFolders"
Folders_GetFolder_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/GetFolder"
Folders_CreateFolder_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/CreateFolder"
Folders_UpdateFolder_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/UpdateFolder"
Folders_MoveFolder_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/MoveFolder"
Folders_DeleteFolder_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/DeleteFolder"
Folders_UndeleteFolder_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/UndeleteFolder"
Folders_GetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/GetIamPolicy"
Folders_SetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/SetIamPolicy"
Folders_TestIamPermissions_FullMethodName = "/google.cloud.resourcemanager.v2.Folders/TestIamPermissions"
)Variables
Folder_LifecycleState_name, Folder_LifecycleState_value
var (
Folder_LifecycleState_name = map[int32]string{
0: "LIFECYCLE_STATE_UNSPECIFIED",
1: "ACTIVE",
2: "DELETE_REQUESTED",
}
Folder_LifecycleState_value = map[string]int32{
"LIFECYCLE_STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"DELETE_REQUESTED": 2,
}
)Enum value maps for Folder_LifecycleState.
FolderOperation_OperationType_name, FolderOperation_OperationType_value
var (
FolderOperation_OperationType_name = map[int32]string{
0: "OPERATION_TYPE_UNSPECIFIED",
1: "CREATE",
2: "MOVE",
}
FolderOperation_OperationType_value = map[string]int32{
"OPERATION_TYPE_UNSPECIFIED": 0,
"CREATE": 1,
"MOVE": 2,
}
)Enum value maps for FolderOperation_OperationType.
File_google_cloud_resourcemanager_v2_folders_proto
var File_google_cloud_resourcemanager_v2_folders_proto protoreflect.FileDescriptorFolders_ServiceDesc
var Folders_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.resourcemanager.v2.Folders",
HandlerType: (*FoldersServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListFolders",
Handler: _Folders_ListFolders_Handler,
},
{
MethodName: "SearchFolders",
Handler: _Folders_SearchFolders_Handler,
},
{
MethodName: "GetFolder",
Handler: _Folders_GetFolder_Handler,
},
{
MethodName: "CreateFolder",
Handler: _Folders_CreateFolder_Handler,
},
{
MethodName: "UpdateFolder",
Handler: _Folders_UpdateFolder_Handler,
},
{
MethodName: "MoveFolder",
Handler: _Folders_MoveFolder_Handler,
},
{
MethodName: "DeleteFolder",
Handler: _Folders_DeleteFolder_Handler,
},
{
MethodName: "UndeleteFolder",
Handler: _Folders_UndeleteFolder_Handler,
},
{
MethodName: "GetIamPolicy",
Handler: _Folders_GetIamPolicy_Handler,
},
{
MethodName: "SetIamPolicy",
Handler: _Folders_SetIamPolicy_Handler,
},
{
MethodName: "TestIamPermissions",
Handler: _Folders_TestIamPermissions_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/resourcemanager/v2/folders.proto",
}Folders_ServiceDesc is the grpc.ServiceDesc for Folders service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions
func RegisterFoldersServer
func RegisterFoldersServer(s grpc.ServiceRegistrar, srv FoldersServer)CreateFolderRequest
type CreateFolderRequest struct {
// Required. The resource name of the new Folder's parent.
// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The Folder being created, only the display name will be consulted.
// All other fields will be ignored.
Folder *Folder `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
// contains filtered or unexported fields
}The CreateFolder request message.
func (*CreateFolderRequest) Descriptor
func (*CreateFolderRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateFolderRequest.ProtoReflect.Descriptor instead.
func (*CreateFolderRequest) GetFolder
func (x *CreateFolderRequest) GetFolder() *Folderfunc (*CreateFolderRequest) GetParent
func (x *CreateFolderRequest) GetParent() stringfunc (*CreateFolderRequest) ProtoMessage
func (*CreateFolderRequest) ProtoMessage()func (*CreateFolderRequest) ProtoReflect
func (x *CreateFolderRequest) ProtoReflect() protoreflect.Messagefunc (*CreateFolderRequest) Reset
func (x *CreateFolderRequest) Reset()func (*CreateFolderRequest) String
func (x *CreateFolderRequest) String() stringDeleteFolderRequest
type DeleteFolderRequest struct {
// Required. The resource name of the Folder to be deleted.
// Must be of the form `folders/{folder_id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Instructs DeleteFolderAction to delete a folder even when the folder is not
// empty.
RecursiveDelete bool `protobuf:"varint,2,opt,name=recursive_delete,json=recursiveDelete,proto3" json:"recursive_delete,omitempty"`
// contains filtered or unexported fields
}The DeleteFolder request message.
func (*DeleteFolderRequest) Descriptor
func (*DeleteFolderRequest) Descriptor() ([]byte, []int)Deprecated: Use DeleteFolderRequest.ProtoReflect.Descriptor instead.
func (*DeleteFolderRequest) GetName
func (x *DeleteFolderRequest) GetName() stringfunc (*DeleteFolderRequest) GetRecursiveDelete
func (x *DeleteFolderRequest) GetRecursiveDelete() boolfunc (*DeleteFolderRequest) ProtoMessage
func (*DeleteFolderRequest) ProtoMessage()func (*DeleteFolderRequest) ProtoReflect
func (x *DeleteFolderRequest) ProtoReflect() protoreflect.Messagefunc (*DeleteFolderRequest) Reset
func (x *DeleteFolderRequest) Reset()func (*DeleteFolderRequest) String
func (x *DeleteFolderRequest) String() stringFolder
type Folder struct {
// Output only. The resource name of the Folder.
// Its format is `folders/{folder_id}`, for example: "folders/1234".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The Folder’s parent's resource name.
// Updates to the folder's parent must be performed via
// [MoveFolder][google.cloud.resourcemanager.v2.Folders.MoveFolder].
Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"`
// 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 `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Output only. The lifecycle state of the folder.
// Updates to the lifecycle_state must be performed via
// [DeleteFolder][google.cloud.resourcemanager.v2.Folders.DeleteFolder] and
// [UndeleteFolder][google.cloud.resourcemanager.v2.Folders.UndeleteFolder].
LifecycleState Folder_LifecycleState `protobuf:"varint,4,opt,name=lifecycle_state,json=lifecycleState,proto3,enum=google.cloud.resourcemanager.v2.Folder_LifecycleState" json:"lifecycle_state,omitempty"`
// Output only. Timestamp when the Folder was created. Assigned by the server.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. Timestamp when the Folder was last modified.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// contains filtered or unexported fields
}A Folder in an Organization's resource hierarchy, used to organize that Organization's resources.
func (*Folder) Descriptor
Deprecated: Use Folder.ProtoReflect.Descriptor instead.
func (*Folder) GetCreateTime
func (x *Folder) GetCreateTime() *timestamppb.Timestampfunc (*Folder) GetDisplayName
func (*Folder) GetLifecycleState
func (x *Folder) GetLifecycleState() Folder_LifecycleStatefunc (*Folder) GetName
func (*Folder) GetParent
func (*Folder) GetUpdateTime
func (x *Folder) GetUpdateTime() *timestamppb.Timestampfunc (*Folder) ProtoMessage
func (*Folder) ProtoMessage()func (*Folder) ProtoReflect
func (x *Folder) ProtoReflect() protoreflect.Messagefunc (*Folder) Reset
func (x *Folder) Reset()func (*Folder) String
FolderOperation
type FolderOperation struct {
// The display name of the folder.
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// The type of this operation.
OperationType FolderOperation_OperationType `protobuf:"varint,2,opt,name=operation_type,json=operationType,proto3,enum=google.cloud.resourcemanager.v2.FolderOperation_OperationType" json:"operation_type,omitempty"`
// The resource name of the folder's parent.
// Only applicable when the operation_type is MOVE.
SourceParent string `protobuf:"bytes,3,opt,name=source_parent,json=sourceParent,proto3" json:"source_parent,omitempty"`
// The resource name of the folder or organization we are either creating
// the folder under or moving the folder to.
DestinationParent string `protobuf:"bytes,4,opt,name=destination_parent,json=destinationParent,proto3" json:"destination_parent,omitempty"`
// contains filtered or unexported fields
}Metadata describing a long running folder operation
func (*FolderOperation) Descriptor
func (*FolderOperation) Descriptor() ([]byte, []int)Deprecated: Use FolderOperation.ProtoReflect.Descriptor instead.
func (*FolderOperation) GetDestinationParent
func (x *FolderOperation) GetDestinationParent() stringfunc (*FolderOperation) GetDisplayName
func (x *FolderOperation) GetDisplayName() stringfunc (*FolderOperation) GetOperationType
func (x *FolderOperation) GetOperationType() FolderOperation_OperationTypefunc (*FolderOperation) GetSourceParent
func (x *FolderOperation) GetSourceParent() stringfunc (*FolderOperation) ProtoMessage
func (*FolderOperation) ProtoMessage()func (*FolderOperation) ProtoReflect
func (x *FolderOperation) ProtoReflect() protoreflect.Messagefunc (*FolderOperation) Reset
func (x *FolderOperation) Reset()func (*FolderOperation) String
func (x *FolderOperation) String() stringFolderOperation_OperationType
type FolderOperation_OperationType int32The type of operation that failed.
FolderOperation_OPERATION_TYPE_UNSPECIFIED, FolderOperation_CREATE, FolderOperation_MOVE
const (
// Operation type not specified.
FolderOperation_OPERATION_TYPE_UNSPECIFIED FolderOperation_OperationType = 0
// A create folder operation.
FolderOperation_CREATE FolderOperation_OperationType = 1
// A move folder operation.
FolderOperation_MOVE FolderOperation_OperationType = 2
)func (FolderOperation_OperationType) Descriptor
func (FolderOperation_OperationType) Descriptor() protoreflect.EnumDescriptorfunc (FolderOperation_OperationType) Enum
func (x FolderOperation_OperationType) Enum() *FolderOperation_OperationTypefunc (FolderOperation_OperationType) EnumDescriptor
func (FolderOperation_OperationType) EnumDescriptor() ([]byte, []int)Deprecated: Use FolderOperation_OperationType.Descriptor instead.
func (FolderOperation_OperationType) Number
func (x FolderOperation_OperationType) Number() protoreflect.EnumNumberfunc (FolderOperation_OperationType) String
func (x FolderOperation_OperationType) String() stringfunc (FolderOperation_OperationType) Type
func (FolderOperation_OperationType) Type() protoreflect.EnumTypeFolder_LifecycleState
type Folder_LifecycleState int32Folder lifecycle states.
Folder_LIFECYCLE_STATE_UNSPECIFIED, Folder_ACTIVE, Folder_DELETE_REQUESTED
const (
// Unspecified state.
Folder_LIFECYCLE_STATE_UNSPECIFIED Folder_LifecycleState = 0
// The normal and active state.
Folder_ACTIVE Folder_LifecycleState = 1
// The folder has been marked for deletion by the user.
Folder_DELETE_REQUESTED Folder_LifecycleState = 2
)func (Folder_LifecycleState) Descriptor
func (Folder_LifecycleState) Descriptor() protoreflect.EnumDescriptorfunc (Folder_LifecycleState) Enum
func (x Folder_LifecycleState) Enum() *Folder_LifecycleStatefunc (Folder_LifecycleState) EnumDescriptor
func (Folder_LifecycleState) EnumDescriptor() ([]byte, []int)Deprecated: Use Folder_LifecycleState.Descriptor instead.
func (Folder_LifecycleState) Number
func (x Folder_LifecycleState) Number() protoreflect.EnumNumberfunc (Folder_LifecycleState) String
func (x Folder_LifecycleState) String() stringfunc (Folder_LifecycleState) Type
func (Folder_LifecycleState) Type() protoreflect.EnumTypeFoldersClient
type FoldersClient interface {
// 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.
ListFolders(ctx context.Context, in *ListFoldersRequest, opts ...grpc.CallOption) (*ListFoldersResponse, error)
// 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`.
SearchFolders(ctx context.Context, in *SearchFoldersRequest, opts ...grpc.CallOption) (*SearchFoldersResponse, error)
// 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.
GetFolder(ctx context.Context, in *GetFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// 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 Folder's that
// share its parent.
// + The addition of the Folder must not cause the active Folder hierarchy
// to exceed a height of 4. Note, the full active + deleted Folder hierarchy
// is allowed to reach a height of 8; 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 100.
//
// 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.
CreateFolder(ctx context.Context, in *CreateFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// 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][google.cloud.resourcemanager.v2.Folders.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
// 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}])?.
// 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.
UpdateFolder(ctx context.Context, in *UpdateFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// 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][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation.
// The caller must have `resourcemanager.folders.move` permission on the
// folder's current and proposed new parent.
MoveFolder(ctx context.Context, in *MoveFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Requests deletion of a Folder. The Folder is moved into the
// [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state
// immediately, and is deleted approximately 30 days later. This method may
// only be called on an empty Folder in the
// [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state, where a Folder is empty if
// it doesn't contain any Folders or Projects in the
// [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state.
// The caller must have `resourcemanager.folders.delete` permission on the
// identified folder.
DeleteFolder(ctx context.Context, in *DeleteFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// Cancels the deletion request for a Folder. This method may only be
// called on a Folder in the
// [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state.
// In order to succeed, the Folder's parent must be in the
// [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state.
// In addition, reintroducing the folder into the tree must not violate
// folder naming, height and fanout constraints described in the
// [CreateFolder][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation.
// The caller must have `resourcemanager.folders.undelete` permission on the
// identified folder.
UndeleteFolder(ctx context.Context, in *UndeleteFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// 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.
GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
// 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.
SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
// 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.
TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error)
}FoldersClient is the client API for Folders service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFoldersClient
func NewFoldersClient(cc grpc.ClientConnInterface) FoldersClientFoldersServer
type FoldersServer interface {
// 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.
ListFolders(context.Context, *ListFoldersRequest) (*ListFoldersResponse, error)
// 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`.
SearchFolders(context.Context, *SearchFoldersRequest) (*SearchFoldersResponse, error)
// 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.
GetFolder(context.Context, *GetFolderRequest) (*Folder, error)
// 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 Folder's that
// share its parent.
// + The addition of the Folder must not cause the active Folder hierarchy
// to exceed a height of 4. Note, the full active + deleted Folder hierarchy
// is allowed to reach a height of 8; 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 100.
//
// 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.
CreateFolder(context.Context, *CreateFolderRequest) (*longrunningpb.Operation, error)
// 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][google.cloud.resourcemanager.v2.Folders.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
// 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}])?.
// 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.
UpdateFolder(context.Context, *UpdateFolderRequest) (*Folder, error)
// 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][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation.
// The caller must have `resourcemanager.folders.move` permission on the
// folder's current and proposed new parent.
MoveFolder(context.Context, *MoveFolderRequest) (*longrunningpb.Operation, error)
// Requests deletion of a Folder. The Folder is moved into the
// [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state
// immediately, and is deleted approximately 30 days later. This method may
// only be called on an empty Folder in the
// [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state, where a Folder is empty if
// it doesn't contain any Folders or Projects in the
// [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state.
// The caller must have `resourcemanager.folders.delete` permission on the
// identified folder.
DeleteFolder(context.Context, *DeleteFolderRequest) (*Folder, error)
// Cancels the deletion request for a Folder. This method may only be
// called on a Folder in the
// [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state.
// In order to succeed, the Folder's parent must be in the
// [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state.
// In addition, reintroducing the folder into the tree must not violate
// folder naming, height and fanout constraints described in the
// [CreateFolder][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation.
// The caller must have `resourcemanager.folders.undelete` permission on the
// identified folder.
UndeleteFolder(context.Context, *UndeleteFolderRequest) (*Folder, error)
// 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.
GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error)
// 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.
SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
// 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.
TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)
}FoldersServer is the server API for Folders service. All implementations should embed UnimplementedFoldersServer for forward compatibility
GetFolderRequest
type GetFolderRequest struct {
// Required. The resource name of the Folder to retrieve.
// Must be of the form `folders/{folder_id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}The GetFolder request message.
func (*GetFolderRequest) Descriptor
func (*GetFolderRequest) Descriptor() ([]byte, []int)Deprecated: Use GetFolderRequest.ProtoReflect.Descriptor instead.
func (*GetFolderRequest) GetName
func (x *GetFolderRequest) GetName() stringfunc (*GetFolderRequest) ProtoMessage
func (*GetFolderRequest) ProtoMessage()func (*GetFolderRequest) ProtoReflect
func (x *GetFolderRequest) ProtoReflect() protoreflect.Messagefunc (*GetFolderRequest) Reset
func (x *GetFolderRequest) Reset()func (*GetFolderRequest) String
func (x *GetFolderRequest) String() stringListFoldersRequest
type ListFoldersRequest struct {
// 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`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of Folders to return in the response.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. A pagination token returned from a previous call to `ListFolders`
// that indicates where this listing should continue from.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Optional. Controls whether Folders in the
// [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED]
// state should be returned. Defaults to false.
ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`
// contains filtered or unexported fields
}The ListFolders request message.
func (*ListFoldersRequest) Descriptor
func (*ListFoldersRequest) Descriptor() ([]byte, []int)Deprecated: Use ListFoldersRequest.ProtoReflect.Descriptor instead.
func (*ListFoldersRequest) GetPageSize
func (x *ListFoldersRequest) GetPageSize() int32func (*ListFoldersRequest) GetPageToken
func (x *ListFoldersRequest) GetPageToken() stringfunc (*ListFoldersRequest) GetParent
func (x *ListFoldersRequest) GetParent() stringfunc (*ListFoldersRequest) GetShowDeleted
func (x *ListFoldersRequest) GetShowDeleted() boolfunc (*ListFoldersRequest) ProtoMessage
func (*ListFoldersRequest) ProtoMessage()func (*ListFoldersRequest) ProtoReflect
func (x *ListFoldersRequest) ProtoReflect() protoreflect.Messagefunc (*ListFoldersRequest) Reset
func (x *ListFoldersRequest) Reset()func (*ListFoldersRequest) String
func (x *ListFoldersRequest) String() stringListFoldersResponse
type ListFoldersResponse struct {
// A possibly paginated list of Folders that are direct descendants of
// the specified parent resource.
Folders []*Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders,omitempty"`
// A pagination token returned from a previous call to `ListFolders`
// that indicates from where listing should continue.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}The ListFolders response message.
func (*ListFoldersResponse) Descriptor
func (*ListFoldersResponse) Descriptor() ([]byte, []int)Deprecated: Use ListFoldersResponse.ProtoReflect.Descriptor instead.
func (*ListFoldersResponse) GetFolders
func (x *ListFoldersResponse) GetFolders() []*Folderfunc (*ListFoldersResponse) GetNextPageToken
func (x *ListFoldersResponse) GetNextPageToken() stringfunc (*ListFoldersResponse) ProtoMessage
func (*ListFoldersResponse) ProtoMessage()func (*ListFoldersResponse) ProtoReflect
func (x *ListFoldersResponse) ProtoReflect() protoreflect.Messagefunc (*ListFoldersResponse) Reset
func (x *ListFoldersResponse) Reset()func (*ListFoldersResponse) String
func (x *ListFoldersResponse) String() stringMoveFolderRequest
type MoveFolderRequest struct {
// Required. The resource name of the Folder to move.
// Must be of the form folders/{folder_id}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// 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 `protobuf:"bytes,2,opt,name=destination_parent,json=destinationParent,proto3" json:"destination_parent,omitempty"`
// contains filtered or unexported fields
}The MoveFolder request message.
func (*MoveFolderRequest) Descriptor
func (*MoveFolderRequest) Descriptor() ([]byte, []int)Deprecated: Use MoveFolderRequest.ProtoReflect.Descriptor instead.
func (*MoveFolderRequest) GetDestinationParent
func (x *MoveFolderRequest) GetDestinationParent() stringfunc (*MoveFolderRequest) GetName
func (x *MoveFolderRequest) GetName() stringfunc (*MoveFolderRequest) ProtoMessage
func (*MoveFolderRequest) ProtoMessage()func (*MoveFolderRequest) ProtoReflect
func (x *MoveFolderRequest) ProtoReflect() protoreflect.Messagefunc (*MoveFolderRequest) Reset
func (x *MoveFolderRequest) Reset()func (*MoveFolderRequest) String
func (x *MoveFolderRequest) String() stringSearchFoldersRequest
type SearchFoldersRequest struct {
// Optional. The maximum number of folders to return in the response.
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. A pagination token returned from a previous call to `SearchFolders`
// that indicates from where search should continue.
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// 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 `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
// contains filtered or unexported fields
}The request message for searching folders.
func (*SearchFoldersRequest) Descriptor
func (*SearchFoldersRequest) Descriptor() ([]byte, []int)Deprecated: Use SearchFoldersRequest.ProtoReflect.Descriptor instead.
func (*SearchFoldersRequest) GetPageSize
func (x *SearchFoldersRequest) GetPageSize() int32func (*SearchFoldersRequest) GetPageToken
func (x *SearchFoldersRequest) GetPageToken() stringfunc (*SearchFoldersRequest) GetQuery
func (x *SearchFoldersRequest) GetQuery() stringfunc (*SearchFoldersRequest) ProtoMessage
func (*SearchFoldersRequest) ProtoMessage()func (*SearchFoldersRequest) ProtoReflect
func (x *SearchFoldersRequest) ProtoReflect() protoreflect.Messagefunc (*SearchFoldersRequest) Reset
func (x *SearchFoldersRequest) Reset()func (*SearchFoldersRequest) String
func (x *SearchFoldersRequest) String() stringSearchFoldersResponse
type SearchFoldersResponse struct {
// A possibly paginated folder search results.
// the specified parent resource.
Folders []*Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders,omitempty"`
// A pagination token returned from a previous call to `SearchFolders`
// that indicates from where searching should continue.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}The response message for searching folders.
func (*SearchFoldersResponse) Descriptor
func (*SearchFoldersResponse) Descriptor() ([]byte, []int)Deprecated: Use SearchFoldersResponse.ProtoReflect.Descriptor instead.
func (*SearchFoldersResponse) GetFolders
func (x *SearchFoldersResponse) GetFolders() []*Folderfunc (*SearchFoldersResponse) GetNextPageToken
func (x *SearchFoldersResponse) GetNextPageToken() stringfunc (*SearchFoldersResponse) ProtoMessage
func (*SearchFoldersResponse) ProtoMessage()func (*SearchFoldersResponse) ProtoReflect
func (x *SearchFoldersResponse) ProtoReflect() protoreflect.Messagefunc (*SearchFoldersResponse) Reset
func (x *SearchFoldersResponse) Reset()func (*SearchFoldersResponse) String
func (x *SearchFoldersResponse) String() stringUndeleteFolderRequest
type UndeleteFolderRequest struct {
// Required. The resource name of the Folder to undelete.
// Must be of the form `folders/{folder_id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}The UndeleteFolder request message.
func (*UndeleteFolderRequest) Descriptor
func (*UndeleteFolderRequest) Descriptor() ([]byte, []int)Deprecated: Use UndeleteFolderRequest.ProtoReflect.Descriptor instead.
func (*UndeleteFolderRequest) GetName
func (x *UndeleteFolderRequest) GetName() stringfunc (*UndeleteFolderRequest) ProtoMessage
func (*UndeleteFolderRequest) ProtoMessage()func (*UndeleteFolderRequest) ProtoReflect
func (x *UndeleteFolderRequest) ProtoReflect() protoreflect.Messagefunc (*UndeleteFolderRequest) Reset
func (x *UndeleteFolderRequest) Reset()func (*UndeleteFolderRequest) String
func (x *UndeleteFolderRequest) String() stringUnimplementedFoldersServer
type UnimplementedFoldersServer struct {
}UnimplementedFoldersServer should be embedded to have forward compatible implementations.
func (UnimplementedFoldersServer) CreateFolder
func (UnimplementedFoldersServer) CreateFolder(context.Context, *CreateFolderRequest) (*longrunningpb.Operation, error)func (UnimplementedFoldersServer) DeleteFolder
func (UnimplementedFoldersServer) DeleteFolder(context.Context, *DeleteFolderRequest) (*Folder, error)func (UnimplementedFoldersServer) GetFolder
func (UnimplementedFoldersServer) GetFolder(context.Context, *GetFolderRequest) (*Folder, error)func (UnimplementedFoldersServer) GetIamPolicy
func (UnimplementedFoldersServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error)func (UnimplementedFoldersServer) ListFolders
func (UnimplementedFoldersServer) ListFolders(context.Context, *ListFoldersRequest) (*ListFoldersResponse, error)func (UnimplementedFoldersServer) MoveFolder
func (UnimplementedFoldersServer) MoveFolder(context.Context, *MoveFolderRequest) (*longrunningpb.Operation, error)func (UnimplementedFoldersServer) SearchFolders
func (UnimplementedFoldersServer) SearchFolders(context.Context, *SearchFoldersRequest) (*SearchFoldersResponse, error)func (UnimplementedFoldersServer) SetIamPolicy
func (UnimplementedFoldersServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error)func (UnimplementedFoldersServer) TestIamPermissions
func (UnimplementedFoldersServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)func (UnimplementedFoldersServer) UndeleteFolder
func (UnimplementedFoldersServer) UndeleteFolder(context.Context, *UndeleteFolderRequest) (*Folder, error)func (UnimplementedFoldersServer) UpdateFolder
func (UnimplementedFoldersServer) UpdateFolder(context.Context, *UpdateFolderRequest) (*Folder, error)UnsafeFoldersServer
type UnsafeFoldersServer interface {
// contains filtered or unexported methods
}UnsafeFoldersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FoldersServer will result in compilation errors.
UpdateFolderRequest
type UpdateFolderRequest struct {
// Required. The new definition of the Folder. It must include a
// a `name` and `display_name` field. The other fields
// will be ignored.
Folder *Folder `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
// Required. Fields to be updated.
// Only the `display_name` can be updated.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// contains filtered or unexported fields
}The request message for updating a folder's display name.
func (*UpdateFolderRequest) Descriptor
func (*UpdateFolderRequest) Descriptor() ([]byte, []int)Deprecated: Use UpdateFolderRequest.ProtoReflect.Descriptor instead.
func (*UpdateFolderRequest) GetFolder
func (x *UpdateFolderRequest) GetFolder() *Folderfunc (*UpdateFolderRequest) GetUpdateMask
func (x *UpdateFolderRequest) GetUpdateMask() *fieldmaskpb.FieldMaskfunc (*UpdateFolderRequest) ProtoMessage
func (*UpdateFolderRequest) ProtoMessage()func (*UpdateFolderRequest) ProtoReflect
func (x *UpdateFolderRequest) ProtoReflect() protoreflect.Messagefunc (*UpdateFolderRequest) Reset
func (x *UpdateFolderRequest) Reset()func (*UpdateFolderRequest) String
func (x *UpdateFolderRequest) String() string