def GetExistingResource(args): resource_ref = GetResourceRef(args) api_version = utils.GetApiVersionFromArgs(args) get_request_message = GetRequestMessage(resource_ref, api_version) orig_resource = utils.GetClient(api_version).projects_locations_realms.Get( get_request_message) return orig_resource
def GetExistingResource(args): resource_ref = GetResourceRef(args) api_version = resource_ref.GetCollectionInfo().api_version get_request_message = GetRequestMessage(resource_ref) orig_resource = utils.GetClient( api_version).projects_locations_gameServerDeployments.GetRollout( get_request_message) return orig_resource
def DeleteInstance(args): resource_ref = GetResourceRef(args) api_version = utils.GetApiVersionFromArgs(args) delete_request_message = DeleteRequestMessage(resource_ref, api_version) delete_op = utils.GetClient( api_version).projects_locations_realms_gameServerClusters.Delete( delete_request_message) return delete_op
def DeleteInstance(args): resource_ref = GetResourceRef(args) api_version = resource_ref.GetCollectionInfo().api_version delete_request_message = DeleteRequestMessage(resource_ref) delete_op = utils.GetClient( api_version).projects_locations_realms_gameServerClusters.Delete( delete_request_message) return delete_op
def WaitForOperation(response): operation_ref = resources.REGISTRY.ParseRelativeName( response.name, collection=OPERATIONS_COLLECTION) api_version = operation_ref.GetCollectionInfo().api_version return waiter.WaitFor( waiter.CloudOperationPollerNoResources( utils.GetClient(api_version).projects_locations_operations), operation_ref, 'Waiting for [{0}] to finish'.format(operation_ref.Name()))
def PreviewDeleteInstance(args): resource_ref = GetResourceRef(args) api_version = utils.GetApiVersionFromArgs(args) preview_time = args.preview_time if args.preview_time else None preview_delete_request_message = PreviewDeleteRequestMessage( resource_ref, preview_time, api_version) preview_resp = utils.GetClient( api_version ).projects_locations_realms_gameServerClusters.PreviewDelete( preview_delete_request_message) return preview_resp
def GetExistingResource(resource_ref): api_version = resource_ref.GetCollectionInfo().api_version get_request_message = GetRequestMessage(resource_ref) orig_resource = utils.GetClient( api_version).projects_locations_scalingPolicies.Get(get_request_message) return orig_resource