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

View file

@ -634,9 +634,9 @@ def create(module, link):
def update(module, link, fetch):
auth = GcpSession(module, 'pubsub')
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']
request = { 'subscription': subscription }
request = {'subscription': subscription}
return return_if_object(module, auth.patch(link, request, params=params))
@ -665,6 +665,7 @@ def delete(module, link):
auth = GcpSession(module, 'pubsub')
return return_if_object(module, auth.delete(link))
def resource_to_request(module):
request = {
u'name': name_pattern(module.params.get('name'), module),