def delete(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module, auth.delete(link), kind)
def fetch_resource(module, link, allow_not_found=True):
    auth = GcpSession(module, 'filestore')
    return return_if_object(module, auth.get(link), allow_not_found)
def fetch_list(module, link, query):
    auth = GcpSession(module, 'compute')
    return auth.list(link,
                     return_if_object,
                     array_name='items',
                     params={'filter': query})
Пример #4
0
def delete(module, link):
    auth = GcpSession(module, 'sourcerepo')
    return return_if_object(module, auth.delete(link))
def update(module, link, fetch):
    auth = GcpSession(module, 'filestore')
    params = {'updateMask': updateMask(resource_to_request(module), response_to_hash(module, fetch))}
    request = resource_to_request(module)
    return wait_for_operation(module, auth.patch(link, request, params=params))
def fetch_list(module, link):
    auth = GcpSession(module, 'filestore')
    return auth.list(link, return_if_object, array_name='instances')
def delete(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.delete(link))
def fetch_list(module, link):
    auth = GcpSession(module, 'mlengine')
    return auth.list(link, return_if_object, array_name='versions')
Пример #9
0
def create(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.put(link,
                                             resource_to_request(module)))
def create(module, link):
    auth = GcpSession(module, 'spanner')
    return wait_for_operation(module,
                              auth.post(link, resource_to_create(module)))
def delete(module, link):
    auth = GcpSession(module, 'spanner')
    return return_if_object(module, auth.delete(link))
Пример #12
0
def fetch_list(module, link):
    auth = GcpSession(module, 'pubsub')
    return auth.list(link, return_if_object, array_name='subscriptions')
Пример #13
0
def delete(module, link):
    auth = GcpSession(module, 'mlengine')
    return wait_for_operation(module, auth.delete(link))
Пример #14
0
def create(module, link):
    auth = GcpSession(module, 'mlengine')
    return return_if_object(module, auth.post(link,
                                              resource_to_request(module)))
def delete(module, link):
    auth = GcpSession(module, 'container')
    return wait_for_operation(module, auth.delete(link))
Пример #16
0
def delete(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.delete(link))
def fetch_list(module, link):
    auth = GcpSession(module, 'container')
    return auth.list(link, return_if_object, array_name='clusters')
def fetch_list(module, link):
    auth = GcpSession(module, 'appengine')
    return auth.list(link, return_if_object, array_name='ingressRules')
def update(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.put(link, resource_to_request(module)))
Пример #20
0
def update(module, link, kind, fetch):
    update_fields(module, resource_to_request(module),
                  response_to_hash(module, fetch))
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module,
                              auth.put(link, resource_to_request(module)))
def fetch_resource(module, link, kind, allow_not_found=True):
    auth = GcpSession(module, 'compute')
    return return_if_object(module, auth.get(link), kind, allow_not_found)
Пример #22
0
def fetch_list(module, link):
    auth = GcpSession(module, 'sql')
    return auth.list(link, return_if_object, array_name='items')
def create(module, link):
    auth = GcpSession(module, 'filestore')
    return wait_for_operation(module, auth.post(link, resource_to_request(module)))
def fetch_list(module, link):
    auth = GcpSession(module, 'kms')
    return auth.list(link, return_if_object, array_name='keyRings')
def delete(module, link):
    auth = GcpSession(module, 'filestore')
    return wait_for_operation(module, auth.delete(link))
Пример #26
0
def update(module, link, kind):
    auth = GcpSession(module, 'bigquery')
    return return_if_object(module, auth.put(link, resource_to_request(module)), kind)
Пример #27
0
def fetch_list(module, link):
    auth = GcpSession(module, 'logging')
    return auth.list(link, return_if_object, array_name='metrics')
Пример #28
0
def delete(module, link, kind):
    auth = GcpSession(module, 'bigquery')
    return return_if_object(module, auth.delete(link), kind)
Пример #29
0
def create(module, link):
    auth = GcpSession(module, 'cloudscheduler')
    return return_if_object(module, auth.post(link,
                                              resource_to_request(module)))
def create(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module,
                            auth.post(link, resource_to_request(module)), kind)