def UriFunc(resource): registry = filestore_client.GetFilestoreRegistry( filestore_client.BETA_API_VERSION) ref = registry.Parse( resource.name, collection=filestore_client.OPERATIONS_COLLECTION) return ref.SelfLink()
def GetResourceRef(args): """Creates a Snapshot and returns its reference.""" project = properties.VALUES.core.project.Get(required=True) api_version = util.GetApiVersionFromArgs(args) registry = filestore_client.GetFilestoreRegistry(api_version) ref = registry.Create( 'file.projects.locations.instances.snapshots', projectsId=project, locationsId=args.instance_region, instancesId=args.instance, snapshotsId=args.snapshot) return ref
def UriFunc(resource): registry = filestore_client.GetFilestoreRegistry() ref = registry.Parse( resource.name, collection=filestore_client.INSTANCES_COLLECTION) return ref.SelfLink()