| { |
| "clientLibrary": { |
| "name": "cloud.google.com/go/assuredworkloads/apiv1", |
| "version": "1.7.0", |
| "language": "GO", |
| "apis": [ |
| { |
| "id": "google.cloud.assuredworkloads.v1", |
| "version": "v1" |
| } |
| ] |
| }, |
| "snippets": [ |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync", |
| "title": "assuredworkloads AcknowledgeViolation Sample", |
| "description": "AcknowledgeViolation acknowledges an existing violation. By acknowledging a violation, users\nacknowledge the existence of a compliance violation in their workload and\ndecide to ignore it due to a valid business justification. Acknowledgement\nis a permanent operation and it cannot be reverted.", |
| "file": "Client/AcknowledgeViolation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "AcknowledgeViolation", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.AcknowledgeViolation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.AcknowledgeViolationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "assuredworkloadspb.AcknowledgeViolationResponse", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "AcknowledgeViolation", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.AcknowledgeViolation", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync", |
| "title": "assuredworkloads CreateWorkload Sample", |
| "description": "CreateWorkload creates Assured Workload.", |
| "file": "Client/CreateWorkload/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "CreateWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.CreateWorkload", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.CreateWorkloadRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "CreateWorkloadOperation", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "CreateWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.CreateWorkload", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 57, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync", |
| "title": "assuredworkloads DeleteWorkload Sample", |
| "description": "DeleteWorkload deletes the workload. Make sure that workload’s direct children are already\nin a deleted state, otherwise the request will fail with a\nFAILED_PRECONDITION error.", |
| "file": "Client/DeleteWorkload/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "DeleteWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.DeleteWorkload", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.DeleteWorkloadRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "DeleteWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.DeleteWorkload", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 50, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetOperation_sync", |
| "title": "assuredworkloads GetOperation Sample", |
| "description": "GetOperation is a utility method from google.longrunning.Operations.", |
| "file": "Client/GetOperation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetOperation", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.GetOperation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "longrunningpb.GetOperationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "longrunningpb.Operation", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetOperation", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetOperation", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync", |
| "title": "assuredworkloads GetViolation Sample", |
| "description": "GetViolation retrieves Assured Workload Violation based on ID.", |
| "file": "Client/GetViolation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetViolation", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.GetViolation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.GetViolationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "assuredworkloadspb.Violation", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetViolation", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetViolation", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync", |
| "title": "assuredworkloads GetWorkload Sample", |
| "description": "GetWorkload gets Assured Workload associated with a CRM Node", |
| "file": "Client/GetWorkload/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.GetWorkload", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.GetWorkloadRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "assuredworkloadspb.Workload", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetWorkload", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListOperations_sync", |
| "title": "assuredworkloads ListOperations Sample", |
| "description": "ListOperations is a utility method from google.longrunning.Operations.", |
| "file": "Client/ListOperations/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListOperations", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.ListOperations", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "longrunningpb.ListOperationsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "OperationIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListOperations", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListOperations", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync", |
| "title": "assuredworkloads ListViolations Sample", |
| "description": "ListViolations lists the Violations in the AssuredWorkload Environment.\nCallers may also choose to read across multiple Workloads as per\nAIP-159 (at https: //google.aip.dev/159) by using ‘-’ (the hyphen or dash\ncharacter) as a wildcard character instead of workload-id in the parent.\nFormat organizations/{org_id}/locations/{location}/workloads/-", |
| "file": "Client/ListViolations/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListViolations", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.ListViolations", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.ListViolationsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "ViolationIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListViolations", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListViolations", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync", |
| "title": "assuredworkloads ListWorkloads Sample", |
| "description": "ListWorkloads lists Assured Workloads under a CRM Node.", |
| "file": "Client/ListWorkloads/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListWorkloads", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.ListWorkloads", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.ListWorkloadsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "WorkloadIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListWorkloads", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListWorkloads", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", |
| "title": "assuredworkloads RestrictAllowedResources Sample", |
| "description": "RestrictAllowedResources restrict the list of resources allowed in the Workload environment.\nThe current list of allowed products can be found at\nhttps: //cloud.google.com/assured-workloads/docs/supported-products (at https: //cloud.google.com/assured-workloads/docs/supported-products)\nIn addition to assuredworkloads.workload.update permission, the user should\nalso have orgpolicy.policy.set permission on the folder resource\nto use this functionality.", |
| "file": "Client/RestrictAllowedResources/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "RestrictAllowedResources", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.RestrictAllowedResources", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.RestrictAllowedResourcesRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "assuredworkloadspb.RestrictAllowedResourcesResponse", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "RestrictAllowedResources", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.RestrictAllowedResources", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync", |
| "title": "assuredworkloads UpdateWorkload Sample", |
| "description": "UpdateWorkload updates an existing workload.\nCurrently allows updating of workload display_name and labels.\nFor force updates don’t set etag field in the Workload.\nOnly one update operation per workload can be in progress.", |
| "file": "Client/UpdateWorkload/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "UpdateWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.Client.UpdateWorkload", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "assuredworkloadspb.UpdateWorkloadRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "assuredworkloadspb.Workload", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.assuredworkloads.v1.Client" |
| }, |
| "method": { |
| "shortName": "UpdateWorkload", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.UpdateWorkload", |
| "service": { |
| "shortName": "AssuredWorkloadsService", |
| "fullName": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| } |
| ] |
| } |