Sieradzki, Lukasz 2024-11-07 11:02:53 +01:00
parent 0e9c32fcde
commit 6794d18478

View file

@ -636,7 +636,7 @@ def update(module, link, fetch):
params = {'updateMask': updateMask(resource_to_request(module), response_to_hash(module, fetch))} params = {'updateMask': updateMask(resource_to_request(module), response_to_hash(module, fetch))}
subscription = resource_to_request(module) subscription = resource_to_request(module)
del subscription['name'] del subscription['name']
request = { 'subscription': subscription } request = {'subscription': subscription}
return return_if_object(module, auth.patch(link, request, params=params)) return return_if_object(module, auth.patch(link, request, params=params))
@ -665,6 +665,7 @@ def delete(module, link):
auth = GcpSession(module, 'pubsub') auth = GcpSession(module, 'pubsub')
return return_if_object(module, auth.delete(link)) return return_if_object(module, auth.delete(link))
def resource_to_request(module): def resource_to_request(module):
request = { request = {
u'name': name_pattern(module.params.get('name'), module), u'name': name_pattern(module.params.get('name'), module),