{ "clientLibrary": { "name": "cloud.google.com/go/iam/credentials/apiv1", "version": "1.5.2", "language": "GO", "apis": [ { "id": "google.iam.credentials.v1", "version": "v1" } ] }, "snippets": [ { "regionTag": "iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync", "title": "iamcredentials GenerateAccessToken Sample", "description": "GenerateAccessToken generates an OAuth 2.0 access token for a service account.", "file": "IamCredentialsClient/GenerateAccessToken/main.go", "language": "GO", "clientMethod": { "shortName": "GenerateAccessToken", "fullName": "google.iam.credentials.v1.IamCredentialsClient.GenerateAccessToken", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "credentialspb.GenerateAccessTokenRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*credentialspb.GenerateAccessTokenResponse", "client": { "shortName": "IamCredentialsClient", "fullName": "google.iam.credentials.v1.IamCredentialsClient" }, "method": { "shortName": "GenerateAccessToken", "fullName": "google.iam.credentials.v1.IAMCredentials.GenerateAccessToken", "service": { "shortName": "IAMCredentials", "fullName": "google.iam.credentials.v1.IAMCredentials" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync", "title": "iamcredentials GenerateIdToken Sample", "description": "GenerateIdToken generates an OpenID Connect ID token for a service account.", "file": "IamCredentialsClient/GenerateIdToken/main.go", "language": "GO", "clientMethod": { "shortName": "GenerateIdToken", "fullName": "google.iam.credentials.v1.IamCredentialsClient.GenerateIdToken", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "credentialspb.GenerateIdTokenRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*credentialspb.GenerateIdTokenResponse", "client": { "shortName": "IamCredentialsClient", "fullName": "google.iam.credentials.v1.IamCredentialsClient" }, "method": { "shortName": "GenerateIdToken", "fullName": "google.iam.credentials.v1.IAMCredentials.GenerateIdToken", "service": { "shortName": "IAMCredentials", "fullName": "google.iam.credentials.v1.IAMCredentials" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "iamcredentials_v1_generated_IAMCredentials_SignBlob_sync", "title": "iamcredentials SignBlob Sample", "description": "SignBlob signs a blob using a service account's system-managed private key.", "file": "IamCredentialsClient/SignBlob/main.go", "language": "GO", "clientMethod": { "shortName": "SignBlob", "fullName": "google.iam.credentials.v1.IamCredentialsClient.SignBlob", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "credentialspb.SignBlobRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*credentialspb.SignBlobResponse", "client": { "shortName": "IamCredentialsClient", "fullName": "google.iam.credentials.v1.IamCredentialsClient" }, "method": { "shortName": "SignBlob", "fullName": "google.iam.credentials.v1.IAMCredentials.SignBlob", "service": { "shortName": "IAMCredentials", "fullName": "google.iam.credentials.v1.IAMCredentials" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "iamcredentials_v1_generated_IAMCredentials_SignJwt_sync", "title": "iamcredentials SignJwt Sample", "description": "SignJwt signs a JWT using a service account's system-managed private key.", "file": "IamCredentialsClient/SignJwt/main.go", "language": "GO", "clientMethod": { "shortName": "SignJwt", "fullName": "google.iam.credentials.v1.IamCredentialsClient.SignJwt", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "credentialspb.SignJwtRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*credentialspb.SignJwtResponse", "client": { "shortName": "IamCredentialsClient", "fullName": "google.iam.credentials.v1.IamCredentialsClient" }, "method": { "shortName": "SignJwt", "fullName": "google.iam.credentials.v1.IAMCredentials.SignJwt", "service": { "shortName": "IAMCredentials", "fullName": "google.iam.credentials.v1.IAMCredentials" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] } ] }