def extra_statements_update(module, request, response):
    auth = GcpSession(module, 'spanner')
    auth.patch(
        ''.join([
            "https://spanner.googleapis.com/v1/",
            "projects/{project}/instances/{instance}/databases/{name}/ddl"
        ]).format(**module.params),
        {u'extraStatements': module.params.get('extra_statements')},
    )
def allow_global_access_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join([
            "https://www.googleapis.com/compute/v1/",
            "projects/{project}/regions/{region}/forwardingRules/{name}"
        ]).format(**module.params),
        {u'allowGlobalAccess': module.params.get('allow_global_access')},
    )
def description_update(module, request, response):
    auth = GcpSession(module, 'dns')
    auth.patch(
        ''.join(["https://www.googleapis.com/dns/v1/", "projects/{project}/managedZones/{name}"]).format(**module.params),
        {
            u'description': module.params.get('description'),
            u'labels': module.params.get('labels'),
            u'privateVisibilityConfig': ManagedZonePrivatevisibilityconfig(module.params.get('private_visibility_config', {}), module).to_request(),
        },
    )
def private_ipv6_google_access_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join([
            "https://compute.googleapis.com/compute/v1/",
            "projects/{project}/regions/{region}/subnetworks/{name}"
        ]).format(**module.params),
        {
            u'privateIpv6GoogleAccess':
            module.params.get('private_ipv6_google_access')
        },
    )
def routing_config_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join([
            "https://www.googleapis.com/compute/v1/",
            "projects/{project}/global/networks/{name}"
        ]).format(**module.params),
        {
            u'routingConfig':
            NetworkRoutingconfig(module.params.get('routing_config', {}),
                                 module).to_request()
        },
    )
Exemple #6
0
def secondary_ip_ranges_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join([
            "https://www.googleapis.com/compute/v1/",
            "projects/{project}/regions/{region}/subnetworks/{name}"
        ]).format(**module.params),
        {
            u'secondaryIpRanges':
            SubnetworkSecondaryiprangesArray(
                module.params.get('secondary_ip_ranges', []),
                module).to_request()
        },
    )
def update(module, link, fetch):
    auth = GcpSession(module, 'kms')
    params = {
        'updateMask':
        updateMask(resource_to_request(module),
                   response_to_hash(module, fetch))
    }
    request = resource_to_request(module)
    return return_if_object(module, auth.patch(link, request, params=params))
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 update(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module,
                              auth.patch(link, resource_to_request(module)))
def update(module, link):
    auth = GcpSession(module, 'cloudbuild')
    return return_if_object(module,
                            auth.patch(link, resource_to_request(module)))
Exemple #11
0
def update(module, link, kind):
    auth = GcpSession(module, 'dns')
    return return_if_object(module, auth.patch(link, resource_to_request(module)), kind)