Answer by Brian McCutchon for Labeling a Google Cloud Platform Deployment after it has been created
There's no need to get the manifest. Using patch is the right idea, but there's an extra header you need to add. Here's an example: dep = self.deploymentManagerService.deployments().get( deployment=deployment, project=project).execute() body = {'labels': [{'key': 'foo', 'value': 'bar'}], 'fingerprint': dep['fingerprint']} req = self.deploymentManagerService.deployments().patch( project=project,…
