{ "clientLibrary": { "name": "cloud.google.com/go/kms/apiv1", "version": "1.23.0", "language": "GO", "apis": [ { "id": "google.cloud.kms.v1", "version": "v1" } ] }, "snippets": [ { "regionTag": "cloudkms_v1_generated_Autokey_CreateKeyHandle_sync", "title": "cloudkms CreateKeyHandle Sample", "description": "CreateKeyHandle creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the\nprovisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK\nuse with the given resource type in the configured key project and the same\nlocation. [GetOperation][google.longrunning.Operations.GetOperation] should\nbe used to resolve the resulting long-running operation and get the\nresulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and\n[CryptoKey][google.cloud.kms.v1.CryptoKey].", "file": "AutokeyClient/CreateKeyHandle/main.go", "language": "GO", "clientMethod": { "shortName": "CreateKeyHandle", "fullName": "google.cloud.kms.v1.AutokeyClient.CreateKeyHandle", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.CreateKeyHandleRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "CreateKeyHandleOperation", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "CreateKeyHandle", "fullName": "google.cloud.kms.v1.Autokey.CreateKeyHandle", "service": { "shortName": "Autokey", "fullName": "google.cloud.kms.v1.Autokey" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 58, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_GetIamPolicy_sync", "title": "cloudkms GetIamPolicy Sample", "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", "file": "AutokeyClient/GetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "GetIamPolicy", "fullName": "google.cloud.kms.v1.AutokeyClient.GetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.GetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "GetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.GetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_GetKeyHandle_sync", "title": "cloudkms GetKeyHandle Sample", "description": "GetKeyHandle returns the [KeyHandle][google.cloud.kms.v1.KeyHandle].", "file": "AutokeyClient/GetKeyHandle/main.go", "language": "GO", "clientMethod": { "shortName": "GetKeyHandle", "fullName": "google.cloud.kms.v1.AutokeyClient.GetKeyHandle", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetKeyHandleRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.KeyHandle", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "GetKeyHandle", "fullName": "google.cloud.kms.v1.Autokey.GetKeyHandle", "service": { "shortName": "Autokey", "fullName": "google.cloud.kms.v1.Autokey" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_GetLocation_sync", "title": "cloudkms GetLocation Sample", "description": "GetLocation gets information about a location.", "file": "AutokeyClient/GetLocation/main.go", "language": "GO", "clientMethod": { "shortName": "GetLocation", "fullName": "google.cloud.kms.v1.AutokeyClient.GetLocation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.GetLocationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*locationpb.Location", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "GetLocation", "fullName": "google.cloud.location.Locations.GetLocation", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_GetOperation_sync", "title": "cloudkms GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "AutokeyClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.kms.v1.AutokeyClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_ListKeyHandles_sync", "title": "cloudkms ListKeyHandles Sample", "description": "ListKeyHandles lists [KeyHandles][google.cloud.kms.v1.KeyHandle].", "file": "AutokeyClient/ListKeyHandles/main.go", "language": "GO", "clientMethod": { "shortName": "ListKeyHandles", "fullName": "google.cloud.kms.v1.AutokeyClient.ListKeyHandles", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ListKeyHandlesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "KeyHandleIterator", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "ListKeyHandles", "fullName": "google.cloud.kms.v1.Autokey.ListKeyHandles", "service": { "shortName": "Autokey", "fullName": "google.cloud.kms.v1.Autokey" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_ListLocations_sync", "title": "cloudkms ListLocations Sample", "description": "ListLocations lists information about the supported locations for this service.", "file": "AutokeyClient/ListLocations/main.go", "language": "GO", "clientMethod": { "shortName": "ListLocations", "fullName": "google.cloud.kms.v1.AutokeyClient.ListLocations", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.ListLocationsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "LocationIterator", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "ListLocations", "fullName": "google.cloud.location.Locations.ListLocations", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_SetIamPolicy_sync", "title": "cloudkms SetIamPolicy Sample", "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`\nerrors.", "file": "AutokeyClient/SetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "SetIamPolicy", "fullName": "google.cloud.kms.v1.AutokeyClient.SetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.SetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "SetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.SetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_Autokey_TestIamPermissions_sync", "title": "cloudkms TestIamPermissions Sample", "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may \"fail open\" without warning.", "file": "AutokeyClient/TestIamPermissions/main.go", "language": "GO", "clientMethod": { "shortName": "TestIamPermissions", "fullName": "google.cloud.kms.v1.AutokeyClient.TestIamPermissions", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.TestIamPermissionsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.TestIamPermissionsResponse", "client": { "shortName": "AutokeyClient", "fullName": "google.cloud.kms.v1.AutokeyClient" }, "method": { "shortName": "TestIamPermissions", "fullName": "google.iam.v1.IAMPolicy.TestIamPermissions", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_GetAutokeyConfig_sync", "title": "cloudkms GetAutokeyConfig Sample", "description": "GetAutokeyConfig returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a\nfolder.", "file": "AutokeyAdminClient/GetAutokeyConfig/main.go", "language": "GO", "clientMethod": { "shortName": "GetAutokeyConfig", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.GetAutokeyConfig", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetAutokeyConfigRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.AutokeyConfig", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "GetAutokeyConfig", "fullName": "google.cloud.kms.v1.AutokeyAdmin.GetAutokeyConfig", "service": { "shortName": "AutokeyAdmin", "fullName": "google.cloud.kms.v1.AutokeyAdmin" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_GetIamPolicy_sync", "title": "cloudkms GetIamPolicy Sample", "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", "file": "AutokeyAdminClient/GetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "GetIamPolicy", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.GetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.GetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "GetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.GetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_GetLocation_sync", "title": "cloudkms GetLocation Sample", "description": "GetLocation gets information about a location.", "file": "AutokeyAdminClient/GetLocation/main.go", "language": "GO", "clientMethod": { "shortName": "GetLocation", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.GetLocation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.GetLocationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*locationpb.Location", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "GetLocation", "fullName": "google.cloud.location.Locations.GetLocation", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_GetOperation_sync", "title": "cloudkms GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "AutokeyAdminClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_ListLocations_sync", "title": "cloudkms ListLocations Sample", "description": "ListLocations lists information about the supported locations for this service.", "file": "AutokeyAdminClient/ListLocations/main.go", "language": "GO", "clientMethod": { "shortName": "ListLocations", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.ListLocations", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.ListLocationsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "LocationIterator", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "ListLocations", "fullName": "google.cloud.location.Locations.ListLocations", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_SetIamPolicy_sync", "title": "cloudkms SetIamPolicy Sample", "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`\nerrors.", "file": "AutokeyAdminClient/SetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "SetIamPolicy", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.SetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.SetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "SetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.SetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_ShowEffectiveAutokeyConfig_sync", "title": "cloudkms ShowEffectiveAutokeyConfig Sample", "description": "ShowEffectiveAutokeyConfig returns the effective Cloud KMS Autokey configuration for a given project.", "file": "AutokeyAdminClient/ShowEffectiveAutokeyConfig/main.go", "language": "GO", "clientMethod": { "shortName": "ShowEffectiveAutokeyConfig", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.ShowEffectiveAutokeyConfig", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ShowEffectiveAutokeyConfigRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.ShowEffectiveAutokeyConfigResponse", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "ShowEffectiveAutokeyConfig", "fullName": "google.cloud.kms.v1.AutokeyAdmin.ShowEffectiveAutokeyConfig", "service": { "shortName": "AutokeyAdmin", "fullName": "google.cloud.kms.v1.AutokeyAdmin" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_TestIamPermissions_sync", "title": "cloudkms TestIamPermissions Sample", "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may \"fail open\" without warning.", "file": "AutokeyAdminClient/TestIamPermissions/main.go", "language": "GO", "clientMethod": { "shortName": "TestIamPermissions", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.TestIamPermissions", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.TestIamPermissionsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.TestIamPermissionsResponse", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "TestIamPermissions", "fullName": "google.iam.v1.IAMPolicy.TestIamPermissions", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_AutokeyAdmin_UpdateAutokeyConfig_sync", "title": "cloudkms UpdateAutokeyConfig Sample", "description": "UpdateAutokeyConfig updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a\nfolder. The caller must have both `cloudkms.autokeyConfigs.update`\npermission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy`\npermission on the provided key project. A\n[KeyHandle][google.cloud.kms.v1.KeyHandle] creation in the folder's\ndescendant projects will use this configuration to determine where to\ncreate the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey].", "file": "AutokeyAdminClient/UpdateAutokeyConfig/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateAutokeyConfig", "fullName": "google.cloud.kms.v1.AutokeyAdminClient.UpdateAutokeyConfig", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.UpdateAutokeyConfigRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.AutokeyConfig", "client": { "shortName": "AutokeyAdminClient", "fullName": "google.cloud.kms.v1.AutokeyAdminClient" }, "method": { "shortName": "UpdateAutokeyConfig", "fullName": "google.cloud.kms.v1.AutokeyAdmin.UpdateAutokeyConfig", "service": { "shortName": "AutokeyAdmin", "fullName": "google.cloud.kms.v1.AutokeyAdmin" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_CreateEkmConnection_sync", "title": "cloudkms CreateEkmConnection Sample", "description": "CreateEkmConnection creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given\nProject and Location.", "file": "EkmClient/CreateEkmConnection/main.go", "language": "GO", "clientMethod": { "shortName": "CreateEkmConnection", "fullName": "google.cloud.kms.v1.EkmClient.CreateEkmConnection", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.CreateEkmConnectionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.EkmConnection", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "CreateEkmConnection", "fullName": "google.cloud.kms.v1.EkmService.CreateEkmConnection", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_GetEkmConfig_sync", "title": "cloudkms GetEkmConfig Sample", "description": "GetEkmConfig returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource\nfor a given project and location.", "file": "EkmClient/GetEkmConfig/main.go", "language": "GO", "clientMethod": { "shortName": "GetEkmConfig", "fullName": "google.cloud.kms.v1.EkmClient.GetEkmConfig", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetEkmConfigRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.EkmConfig", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "GetEkmConfig", "fullName": "google.cloud.kms.v1.EkmService.GetEkmConfig", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_GetEkmConnection_sync", "title": "cloudkms GetEkmConnection Sample", "description": "GetEkmConnection returns metadata for a given\n[EkmConnection][google.cloud.kms.v1.EkmConnection].", "file": "EkmClient/GetEkmConnection/main.go", "language": "GO", "clientMethod": { "shortName": "GetEkmConnection", "fullName": "google.cloud.kms.v1.EkmClient.GetEkmConnection", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetEkmConnectionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.EkmConnection", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "GetEkmConnection", "fullName": "google.cloud.kms.v1.EkmService.GetEkmConnection", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_GetIamPolicy_sync", "title": "cloudkms GetIamPolicy Sample", "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", "file": "EkmClient/GetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "GetIamPolicy", "fullName": "google.cloud.kms.v1.EkmClient.GetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.GetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "GetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.GetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_GetLocation_sync", "title": "cloudkms GetLocation Sample", "description": "GetLocation gets information about a location.", "file": "EkmClient/GetLocation/main.go", "language": "GO", "clientMethod": { "shortName": "GetLocation", "fullName": "google.cloud.kms.v1.EkmClient.GetLocation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.GetLocationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*locationpb.Location", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "GetLocation", "fullName": "google.cloud.location.Locations.GetLocation", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_GetOperation_sync", "title": "cloudkms GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "EkmClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.kms.v1.EkmClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_ListEkmConnections_sync", "title": "cloudkms ListEkmConnections Sample", "description": "ListEkmConnections lists [EkmConnections][google.cloud.kms.v1.EkmConnection].", "file": "EkmClient/ListEkmConnections/main.go", "language": "GO", "clientMethod": { "shortName": "ListEkmConnections", "fullName": "google.cloud.kms.v1.EkmClient.ListEkmConnections", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ListEkmConnectionsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "EkmConnectionIterator", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "ListEkmConnections", "fullName": "google.cloud.kms.v1.EkmService.ListEkmConnections", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_ListLocations_sync", "title": "cloudkms ListLocations Sample", "description": "ListLocations lists information about the supported locations for this service.", "file": "EkmClient/ListLocations/main.go", "language": "GO", "clientMethod": { "shortName": "ListLocations", "fullName": "google.cloud.kms.v1.EkmClient.ListLocations", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.ListLocationsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "LocationIterator", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "ListLocations", "fullName": "google.cloud.location.Locations.ListLocations", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_SetIamPolicy_sync", "title": "cloudkms SetIamPolicy Sample", "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`\nerrors.", "file": "EkmClient/SetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "SetIamPolicy", "fullName": "google.cloud.kms.v1.EkmClient.SetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.SetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "SetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.SetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_TestIamPermissions_sync", "title": "cloudkms TestIamPermissions Sample", "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may \"fail open\" without warning.", "file": "EkmClient/TestIamPermissions/main.go", "language": "GO", "clientMethod": { "shortName": "TestIamPermissions", "fullName": "google.cloud.kms.v1.EkmClient.TestIamPermissions", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.TestIamPermissionsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.TestIamPermissionsResponse", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "TestIamPermissions", "fullName": "google.iam.v1.IAMPolicy.TestIamPermissions", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_UpdateEkmConfig_sync", "title": "cloudkms UpdateEkmConfig Sample", "description": "UpdateEkmConfig updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource\nfor a given project and location.", "file": "EkmClient/UpdateEkmConfig/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateEkmConfig", "fullName": "google.cloud.kms.v1.EkmClient.UpdateEkmConfig", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.UpdateEkmConfigRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.EkmConfig", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "UpdateEkmConfig", "fullName": "google.cloud.kms.v1.EkmService.UpdateEkmConfig", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_UpdateEkmConnection_sync", "title": "cloudkms UpdateEkmConnection Sample", "description": "UpdateEkmConnection updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.", "file": "EkmClient/UpdateEkmConnection/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateEkmConnection", "fullName": "google.cloud.kms.v1.EkmClient.UpdateEkmConnection", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.UpdateEkmConnectionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.EkmConnection", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "UpdateEkmConnection", "fullName": "google.cloud.kms.v1.EkmService.UpdateEkmConnection", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_EkmService_VerifyConnectivity_sync", "title": "cloudkms VerifyConnectivity Sample", "description": "VerifyConnectivity verifies that Cloud KMS can successfully connect to the external key\nmanager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection].\nIf there is an error connecting to the EKM, this method returns a\nFAILED_PRECONDITION status containing structured information as described\nat https: //cloud.google.com/kms/docs/reference/ekm_errors.", "file": "EkmClient/VerifyConnectivity/main.go", "language": "GO", "clientMethod": { "shortName": "VerifyConnectivity", "fullName": "google.cloud.kms.v1.EkmClient.VerifyConnectivity", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.VerifyConnectivityRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.VerifyConnectivityResponse", "client": { "shortName": "EkmClient", "fullName": "google.cloud.kms.v1.EkmClient" }, "method": { "shortName": "VerifyConnectivity", "fullName": "google.cloud.kms.v1.EkmService.VerifyConnectivity", "service": { "shortName": "EkmService", "fullName": "google.cloud.kms.v1.EkmService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync", "title": "cloudkms AsymmetricDecrypt Sample", "description": "AsymmetricDecrypt decrypts data that was encrypted with a public key retrieved from\n[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]\ncorresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]\nwith [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]\nASYMMETRIC_DECRYPT.", "file": "KeyManagementClient/AsymmetricDecrypt/main.go", "language": "GO", "clientMethod": { "shortName": "AsymmetricDecrypt", "fullName": "google.cloud.kms.v1.KeyManagementClient.AsymmetricDecrypt", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.AsymmetricDecryptRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.AsymmetricDecryptResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "AsymmetricDecrypt", "fullName": "google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync", "title": "cloudkms AsymmetricSign Sample", "description": "AsymmetricSign signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]\nwith [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]\nASYMMETRIC_SIGN, producing a signature that can be verified with the public\nkey retrieved from\n[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].", "file": "KeyManagementClient/AsymmetricSign/main.go", "language": "GO", "clientMethod": { "shortName": "AsymmetricSign", "fullName": "google.cloud.kms.v1.KeyManagementClient.AsymmetricSign", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.AsymmetricSignRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.AsymmetricSignResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "AsymmetricSign", "fullName": "google.cloud.kms.v1.KeyManagementService.AsymmetricSign", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync", "title": "cloudkms CreateCryptoKey Sample", "description": "CreateCryptoKey create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a\n[KeyRing][google.cloud.kms.v1.KeyRing].\n\n[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and\n[CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm]\nare required.", "file": "KeyManagementClient/CreateCryptoKey/main.go", "language": "GO", "clientMethod": { "shortName": "CreateCryptoKey", "fullName": "google.cloud.kms.v1.KeyManagementClient.CreateCryptoKey", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.CreateCryptoKeyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKey", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "CreateCryptoKey", "fullName": "google.cloud.kms.v1.KeyManagementService.CreateCryptoKey", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync", "title": "cloudkms CreateCryptoKeyVersion Sample", "description": "CreateCryptoKeyVersion create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a\n[CryptoKey][google.cloud.kms.v1.CryptoKey].\n\nThe server will assign the next sequential id. If unset,\n[state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to\n[ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED].", "file": "KeyManagementClient/CreateCryptoKeyVersion/main.go", "language": "GO", "clientMethod": { "shortName": "CreateCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.CreateCryptoKeyVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.CreateCryptoKeyVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKeyVersion", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "CreateCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync", "title": "cloudkms CreateImportJob Sample", "description": "CreateImportJob create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a\n[KeyRing][google.cloud.kms.v1.KeyRing].\n\n[ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is\nrequired.", "file": "KeyManagementClient/CreateImportJob/main.go", "language": "GO", "clientMethod": { "shortName": "CreateImportJob", "fullName": "google.cloud.kms.v1.KeyManagementClient.CreateImportJob", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.CreateImportJobRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.ImportJob", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "CreateImportJob", "fullName": "google.cloud.kms.v1.KeyManagementService.CreateImportJob", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync", "title": "cloudkms CreateKeyRing Sample", "description": "CreateKeyRing create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and\nLocation.", "file": "KeyManagementClient/CreateKeyRing/main.go", "language": "GO", "clientMethod": { "shortName": "CreateKeyRing", "fullName": "google.cloud.kms.v1.KeyManagementClient.CreateKeyRing", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.CreateKeyRingRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.KeyRing", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "CreateKeyRing", "fullName": "google.cloud.kms.v1.KeyManagementService.CreateKeyRing", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_Decapsulate_sync", "title": "cloudkms Decapsulate Sample", "description": "Decapsulate decapsulates data that was encapsulated with a public key retrieved from\n[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]\ncorresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]\nwith [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]\nKEY_ENCAPSULATION.", "file": "KeyManagementClient/Decapsulate/main.go", "language": "GO", "clientMethod": { "shortName": "Decapsulate", "fullName": "google.cloud.kms.v1.KeyManagementClient.Decapsulate", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.DecapsulateRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.DecapsulateResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "Decapsulate", "fullName": "google.cloud.kms.v1.KeyManagementService.Decapsulate", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_Decrypt_sync", "title": "cloudkms Decrypt Sample", "description": "Decrypt decrypts data that was protected by\n[Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The\n[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be\n[ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].", "file": "KeyManagementClient/Decrypt/main.go", "language": "GO", "clientMethod": { "shortName": "Decrypt", "fullName": "google.cloud.kms.v1.KeyManagementClient.Decrypt", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.DecryptRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.DecryptResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "Decrypt", "fullName": "google.cloud.kms.v1.KeyManagementService.Decrypt", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync", "title": "cloudkms DestroyCryptoKeyVersion Sample", "description": "DestroyCryptoKeyVersion schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for\ndestruction.\n\nUpon calling this method,\n[CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will\nbe set to\n[DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED],\nand [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will\nbe set to the time\n[destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration]\nin the future. At that time, the\n[state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically\nchange to\n[DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED],\nand the key material will be irrevocably destroyed.\n\nBefore the\n[destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is\nreached,\n[RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]\nmay be called to reverse the process.", "file": "KeyManagementClient/DestroyCryptoKeyVersion/main.go", "language": "GO", "clientMethod": { "shortName": "DestroyCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.DestroyCryptoKeyVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.DestroyCryptoKeyVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKeyVersion", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "DestroyCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_Encrypt_sync", "title": "cloudkms Encrypt Sample", "description": "Encrypt encrypts data, so that it can only be recovered by a call to\n[Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The\n[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be\n[ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].", "file": "KeyManagementClient/Encrypt/main.go", "language": "GO", "clientMethod": { "shortName": "Encrypt", "fullName": "google.cloud.kms.v1.KeyManagementClient.Encrypt", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.EncryptRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.EncryptResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "Encrypt", "fullName": "google.cloud.kms.v1.KeyManagementService.Encrypt", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GenerateRandomBytes_sync", "title": "cloudkms GenerateRandomBytes Sample", "description": "GenerateRandomBytes generate random bytes using the Cloud KMS randomness source in the provided\nlocation.", "file": "KeyManagementClient/GenerateRandomBytes/main.go", "language": "GO", "clientMethod": { "shortName": "GenerateRandomBytes", "fullName": "google.cloud.kms.v1.KeyManagementClient.GenerateRandomBytes", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GenerateRandomBytesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.GenerateRandomBytesResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GenerateRandomBytes", "fullName": "google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync", "title": "cloudkms GetCryptoKey Sample", "description": "GetCryptoKey returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as\nwell as its [primary][google.cloud.kms.v1.CryptoKey.primary]\n[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].", "file": "KeyManagementClient/GetCryptoKey/main.go", "language": "GO", "clientMethod": { "shortName": "GetCryptoKey", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetCryptoKey", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetCryptoKeyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKey", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetCryptoKey", "fullName": "google.cloud.kms.v1.KeyManagementService.GetCryptoKey", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync", "title": "cloudkms GetCryptoKeyVersion Sample", "description": "GetCryptoKeyVersion returns metadata for a given\n[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].", "file": "KeyManagementClient/GetCryptoKeyVersion/main.go", "language": "GO", "clientMethod": { "shortName": "GetCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetCryptoKeyVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetCryptoKeyVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKeyVersion", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetIamPolicy_sync", "title": "cloudkms GetIamPolicy Sample", "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", "file": "KeyManagementClient/GetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "GetIamPolicy", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.GetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.GetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetImportJob_sync", "title": "cloudkms GetImportJob Sample", "description": "GetImportJob returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].", "file": "KeyManagementClient/GetImportJob/main.go", "language": "GO", "clientMethod": { "shortName": "GetImportJob", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetImportJob", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetImportJobRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.ImportJob", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetImportJob", "fullName": "google.cloud.kms.v1.KeyManagementService.GetImportJob", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync", "title": "cloudkms GetKeyRing Sample", "description": "GetKeyRing returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].", "file": "KeyManagementClient/GetKeyRing/main.go", "language": "GO", "clientMethod": { "shortName": "GetKeyRing", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetKeyRing", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetKeyRingRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.KeyRing", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetKeyRing", "fullName": "google.cloud.kms.v1.KeyManagementService.GetKeyRing", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetLocation_sync", "title": "cloudkms GetLocation Sample", "description": "GetLocation gets information about a location.", "file": "KeyManagementClient/GetLocation/main.go", "language": "GO", "clientMethod": { "shortName": "GetLocation", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetLocation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.GetLocationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*locationpb.Location", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetLocation", "fullName": "google.cloud.location.Locations.GetLocation", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetOperation_sync", "title": "cloudkms GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "KeyManagementClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync", "title": "cloudkms GetPublicKey Sample", "description": "GetPublicKey returns the public key for the given\n[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The\n[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be\n[ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]\nor\n[ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].", "file": "KeyManagementClient/GetPublicKey/main.go", "language": "GO", "clientMethod": { "shortName": "GetPublicKey", "fullName": "google.cloud.kms.v1.KeyManagementClient.GetPublicKey", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.GetPublicKeyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.PublicKey", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "GetPublicKey", "fullName": "google.cloud.kms.v1.KeyManagementService.GetPublicKey", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync", "title": "cloudkms ImportCryptoKeyVersion Sample", "description": "ImportCryptoKeyVersion import wrapped key material into a\n[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].\n\nAll requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If\na [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally\nspecified in the request, key material will be reimported into that\nversion. Otherwise, a new version will be created, and will be assigned the\nnext sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey].", "file": "KeyManagementClient/ImportCryptoKeyVersion/main.go", "language": "GO", "clientMethod": { "shortName": "ImportCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.ImportCryptoKeyVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ImportCryptoKeyVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKeyVersion", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "ImportCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync", "title": "cloudkms ListCryptoKeyVersions Sample", "description": "ListCryptoKeyVersions lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].", "file": "KeyManagementClient/ListCryptoKeyVersions/main.go", "language": "GO", "clientMethod": { "shortName": "ListCryptoKeyVersions", "fullName": "google.cloud.kms.v1.KeyManagementClient.ListCryptoKeyVersions", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ListCryptoKeyVersionsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "CryptoKeyVersionIterator", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "ListCryptoKeyVersions", "fullName": "google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync", "title": "cloudkms ListCryptoKeys Sample", "description": "ListCryptoKeys lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].", "file": "KeyManagementClient/ListCryptoKeys/main.go", "language": "GO", "clientMethod": { "shortName": "ListCryptoKeys", "fullName": "google.cloud.kms.v1.KeyManagementClient.ListCryptoKeys", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ListCryptoKeysRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "CryptoKeyIterator", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "ListCryptoKeys", "fullName": "google.cloud.kms.v1.KeyManagementService.ListCryptoKeys", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync", "title": "cloudkms ListImportJobs Sample", "description": "ListImportJobs lists [ImportJobs][google.cloud.kms.v1.ImportJob].", "file": "KeyManagementClient/ListImportJobs/main.go", "language": "GO", "clientMethod": { "shortName": "ListImportJobs", "fullName": "google.cloud.kms.v1.KeyManagementClient.ListImportJobs", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ListImportJobsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "ImportJobIterator", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "ListImportJobs", "fullName": "google.cloud.kms.v1.KeyManagementService.ListImportJobs", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync", "title": "cloudkms ListKeyRings Sample", "description": "ListKeyRings lists [KeyRings][google.cloud.kms.v1.KeyRing].", "file": "KeyManagementClient/ListKeyRings/main.go", "language": "GO", "clientMethod": { "shortName": "ListKeyRings", "fullName": "google.cloud.kms.v1.KeyManagementClient.ListKeyRings", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.ListKeyRingsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "KeyRingIterator", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "ListKeyRings", "fullName": "google.cloud.kms.v1.KeyManagementService.ListKeyRings", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ListLocations_sync", "title": "cloudkms ListLocations Sample", "description": "ListLocations lists information about the supported locations for this service.", "file": "KeyManagementClient/ListLocations/main.go", "language": "GO", "clientMethod": { "shortName": "ListLocations", "fullName": "google.cloud.kms.v1.KeyManagementClient.ListLocations", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "locationpb.ListLocationsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "LocationIterator", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "ListLocations", "fullName": "google.cloud.location.Locations.ListLocations", "service": { "shortName": "Locations", "fullName": "google.cloud.location.Locations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_MacSign_sync", "title": "cloudkms MacSign Sample", "description": "MacSign signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]\nwith [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC,\nproducing a tag that can be verified by another source with the same key.", "file": "KeyManagementClient/MacSign/main.go", "language": "GO", "clientMethod": { "shortName": "MacSign", "fullName": "google.cloud.kms.v1.KeyManagementClient.MacSign", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.MacSignRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.MacSignResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "MacSign", "fullName": "google.cloud.kms.v1.KeyManagementService.MacSign", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_MacVerify_sync", "title": "cloudkms MacVerify Sample", "description": "MacVerify verifies MAC tag using a\n[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with\n[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns\na response that indicates whether or not the verification was successful.", "file": "KeyManagementClient/MacVerify/main.go", "language": "GO", "clientMethod": { "shortName": "MacVerify", "fullName": "google.cloud.kms.v1.KeyManagementClient.MacVerify", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.MacVerifyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.MacVerifyResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "MacVerify", "fullName": "google.cloud.kms.v1.KeyManagementService.MacVerify", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_RawDecrypt_sync", "title": "cloudkms RawDecrypt Sample", "description": "RawDecrypt decrypts data that was originally encrypted using a raw cryptographic\nmechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]\nmust be\n[RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].", "file": "KeyManagementClient/RawDecrypt/main.go", "language": "GO", "clientMethod": { "shortName": "RawDecrypt", "fullName": "google.cloud.kms.v1.KeyManagementClient.RawDecrypt", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.RawDecryptRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.RawDecryptResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "RawDecrypt", "fullName": "google.cloud.kms.v1.KeyManagementService.RawDecrypt", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_RawEncrypt_sync", "title": "cloudkms RawEncrypt Sample", "description": "RawEncrypt encrypts data using portable cryptographic primitives. Most users should\nchoose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and\n[Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than\ntheir raw counterparts. The\n[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be\n[RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].", "file": "KeyManagementClient/RawEncrypt/main.go", "language": "GO", "clientMethod": { "shortName": "RawEncrypt", "fullName": "google.cloud.kms.v1.KeyManagementClient.RawEncrypt", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.RawEncryptRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.RawEncryptResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "RawEncrypt", "fullName": "google.cloud.kms.v1.KeyManagementService.RawEncrypt", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync", "title": "cloudkms RestoreCryptoKeyVersion Sample", "description": "RestoreCryptoKeyVersion restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the\n[DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]\nstate.\n\nUpon restoration of the CryptoKeyVersion,\n[state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to\n[DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED],\nand [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will\nbe cleared.", "file": "KeyManagementClient/RestoreCryptoKeyVersion/main.go", "language": "GO", "clientMethod": { "shortName": "RestoreCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.RestoreCryptoKeyVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.RestoreCryptoKeyVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKeyVersion", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "RestoreCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_SetIamPolicy_sync", "title": "cloudkms SetIamPolicy Sample", "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`\nerrors.", "file": "KeyManagementClient/SetIamPolicy/main.go", "language": "GO", "clientMethod": { "shortName": "SetIamPolicy", "fullName": "google.cloud.kms.v1.KeyManagementClient.SetIamPolicy", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.SetIamPolicyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.Policy", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "SetIamPolicy", "fullName": "google.iam.v1.IAMPolicy.SetIamPolicy", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_TestIamPermissions_sync", "title": "cloudkms TestIamPermissions Sample", "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may \"fail open\" without warning.", "file": "KeyManagementClient/TestIamPermissions/main.go", "language": "GO", "clientMethod": { "shortName": "TestIamPermissions", "fullName": "google.cloud.kms.v1.KeyManagementClient.TestIamPermissions", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "iampb.TestIamPermissionsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*iampb.TestIamPermissionsResponse", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "TestIamPermissions", "fullName": "google.iam.v1.IAMPolicy.TestIamPermissions", "service": { "shortName": "IAMPolicy", "fullName": "google.iam.v1.IAMPolicy" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync", "title": "cloudkms UpdateCryptoKey Sample", "description": "UpdateCryptoKey update a [CryptoKey][google.cloud.kms.v1.CryptoKey].", "file": "KeyManagementClient/UpdateCryptoKey/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateCryptoKey", "fullName": "google.cloud.kms.v1.KeyManagementClient.UpdateCryptoKey", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.UpdateCryptoKeyRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKey", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "UpdateCryptoKey", "fullName": "google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync", "title": "cloudkms UpdateCryptoKeyPrimaryVersion Sample", "description": "UpdateCryptoKeyPrimaryVersion update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that\nwill be used in\n[Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].\n\nReturns an error if called on a key whose purpose is not\n[ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].", "file": "KeyManagementClient/UpdateCryptoKeyPrimaryVersion/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateCryptoKeyPrimaryVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.UpdateCryptoKeyPrimaryVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.UpdateCryptoKeyPrimaryVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKey", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "UpdateCryptoKeyPrimaryVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync", "title": "cloudkms UpdateCryptoKeyVersion Sample", "description": "UpdateCryptoKeyVersion update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s\nmetadata.\n\n[state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between\n[ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]\nand\n[DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]\nusing this method. See\n[DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]\nand\n[RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]\nto move between other states.", "file": "KeyManagementClient/UpdateCryptoKeyVersion/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementClient.UpdateCryptoKeyVersion", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "kmspb.UpdateCryptoKeyVersionRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*kmspb.CryptoKeyVersion", "client": { "shortName": "KeyManagementClient", "fullName": "google.cloud.kms.v1.KeyManagementClient" }, "method": { "shortName": "UpdateCryptoKeyVersion", "fullName": "google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion", "service": { "shortName": "KeyManagementService", "fullName": "google.cloud.kms.v1.KeyManagementService" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] } ] }