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 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, '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, 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, 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)))
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()}, )