{
  "documentationLink": "https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials",
  "protocol": "rest",
  "canonicalName": "IAM Credentials",
  "version": "v1",
  "title": "IAM Service Account Credentials API",
  "discoveryVersion": "v1",
  "rootUrl": "https://iamcredentials.googleapis.com/",
  "ownerDomain": "google.com",
  "kind": "discovery#restDescription",
  "name": "iamcredentials",
  "id": "iamcredentials:v1",
  "batchPath": "batch",
  "resources": {
    "projects": {
      "resources": {
        "serviceAccounts": {
          "methods": {
            "generateAccessToken": {
              "parameters": {
                "name": {
                  "required": true,
                  "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
                  "type": "string",
                  "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$",
                  "location": "path"
                }
              },
              "request": {
                "$ref": "GenerateAccessTokenRequest"
              },
              "response": {
                "$ref": "GenerateAccessTokenResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateAccessToken",
              "description": "Generates an OAuth 2.0 access token for a service account.",
              "parameterOrder": [
                "name"
              ],
              "httpMethod": "POST",
              "id": "iamcredentials.projects.serviceAccounts.generateAccessToken",
              "path": "v1/{+name}:generateAccessToken"
            },
            "getAllowedLocations": {
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/allowedLocations",
              "description": "Returns the trust boundary info for a given service account.",
              "id": "iamcredentials.projects.serviceAccounts.getAllowedLocations",
              "path": "v1/{+name}/allowedLocations",
              "parameterOrder": [
                "name"
              ],
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "description": "Required. Resource name of service account. Format: `projects/-/serviceAccounts/{service_account_email}`",
                  "type": "string"
                }
              },
              "response": {
                "$ref": "ServiceAccountAllowedLocations"
              }
            },
            "signBlob": {
              "parameters": {
                "name": {
                  "location": "path",
                  "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$",
                  "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
                  "type": "string",
                  "required": true
                }
              },
              "request": {
                "$ref": "SignBlobRequest"
              },
              "response": {
                "$ref": "SignBlobResponse"
              },
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob",
              "description": "Signs a blob using a service account's system-managed private key.",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "httpMethod": "POST",
              "parameterOrder": [
                "name"
              ],
              "id": "iamcredentials.projects.serviceAccounts.signBlob",
              "path": "v1/{+name}:signBlob"
            },
            "signJwt": {
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt",
              "description": "Signs a JWT using a service account's system-managed private key.",
              "parameters": {
                "name": {
                  "required": true,
                  "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
                  "type": "string",
                  "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$",
                  "location": "path"
                }
              },
              "request": {
                "$ref": "SignJwtRequest"
              },
              "response": {
                "$ref": "SignJwtResponse"
              },
              "id": "iamcredentials.projects.serviceAccounts.signJwt",
              "path": "v1/{+name}:signJwt",
              "parameterOrder": [
                "name"
              ],
              "httpMethod": "POST"
            },
            "generateIdToken": {
              "id": "iamcredentials.projects.serviceAccounts.generateIdToken",
              "path": "v1/{+name}:generateIdToken",
              "httpMethod": "POST",
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateIdToken",
              "description": "Generates an OpenID Connect ID token for a service account.",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "parameters": {
                "name": {
                  "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
                  "type": "string"
                }
              },
              "request": {
                "$ref": "GenerateIdTokenRequest"
              },
              "response": {
                "$ref": "GenerateIdTokenResponse"
              }
            }
          }
        },
        "locations": {
          "resources": {
            "workloadIdentityPools": {
              "methods": {
                "getAllowedLocations": {
                  "parameterOrder": [
                    "name"
                  ],
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "location": "path",
                      "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$",
                      "description": "Required. Resource name of workload identity pool.",
                      "type": "string",
                      "required": true
                    }
                  },
                  "response": {
                    "$ref": "WorkloadIdentityPoolAllowedLocations"
                  },
                  "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/allowedLocations",
                  "description": "Returns the trust boundary info for a given workload identity pool.",
                  "id": "iamcredentials.projects.locations.workloadIdentityPools.getAllowedLocations",
                  "path": "v1/{+name}/allowedLocations"
                }
              }
            }
          }
        }
      }
    },
    "locations": {
      "resources": {
        "workforcePools": {
          "methods": {
            "getAllowedLocations": {
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "Required. Resource name of workforce pool.",
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "pattern": "^locations/[^/]+/workforcePools/[^/]+$"
                }
              },
              "response": {
                "$ref": "WorkforcePoolAllowedLocations"
              },
              "parameterOrder": [
                "name"
              ],
              "id": "iamcredentials.locations.workforcePools.getAllowedLocations",
              "path": "v1/{+name}/allowedLocations",
              "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/allowedLocations",
              "description": "Returns the trust boundary info for a given workforce pool."
            }
          }
        }
      }
    }
  },
  "servicePath": "",
  "parameters": {
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "$.xgafv": {
      "enum": [
        "1",
        "2"
      ],
      "type": "string",
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query"
    },
    "prettyPrint": {
      "default": "true",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "location": "query"
    },
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    }
  },
  "version_module": true,
  "baseUrl": "https://iamcredentials.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "ownerName": "Google",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "schemas": {
    "WorkloadIdentityPoolAllowedLocations": {
      "id": "WorkloadIdentityPoolAllowedLocations",
      "description": "Represents a list of allowed locations for given workload identity pool.",
      "type": "object",
      "properties": {
        "locations": {
          "description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]",
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "encodedLocations": {
          "description": "Output only. The hex encoded bitmap of the trust boundary locations",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "SignJwtRequest": {
      "id": "SignJwtRequest",
      "type": "object",
      "properties": {
        "delegates": {
          "description": "The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "payload": {
          "description": "Required. The JWT payload to sign. Must be a serialized JSON object that contains a JWT Claims Set. For example: `{\"sub\": \"user@example.com\", \"iat\": 313435}` If the JWT Claims Set contains an expiration time (`exp`) claim, it must be an integer timestamp that is not in the past and no more than 12 hours in the future.",
          "type": "string"
        }
      }
    },
    "SignBlobResponse": {
      "id": "SignBlobResponse",
      "type": "object",
      "properties": {
        "keyId": {
          "description": "The ID of the key used to sign the blob. The key used for signing will remain valid for at least 12 hours after the blob is signed. To verify the signature, you can retrieve the public key in several formats from the following endpoints: - RSA public key wrapped in an X.509 v3 certificate: `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL}` - Raw key in JSON format: `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` - JSON Web Key (JWK): `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}`",
          "type": "string"
        },
        "signedBlob": {
          "format": "byte",
          "description": "The signature for the blob. Does not include the original blob. After the key pair referenced by the `key_id` response field expires, Google no longer exposes the public key that can be used to verify the blob. As a result, the receiver can no longer verify the signature.",
          "type": "string"
        }
      }
    },
    "SignJwtResponse": {
      "id": "SignJwtResponse",
      "type": "object",
      "properties": {
        "keyId": {
          "description": "The ID of the key used to sign the JWT. The key used for signing will remain valid for at least 12 hours after the JWT is signed. To verify the signature, you can retrieve the public key in several formats from the following endpoints: - RSA public key wrapped in an X.509 v3 certificate: `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL}` - Raw key in JSON format: `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` - JSON Web Key (JWK): `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}`",
          "type": "string"
        },
        "signedJwt": {
          "description": "The signed JWT. Contains the automatically generated header; the client-supplied payload; and the signature, which is generated using the key referenced by the `kid` field in the header. After the key pair referenced by the `key_id` response field expires, Google no longer exposes the public key that can be used to verify the JWT. As a result, the receiver can no longer verify the signature.",
          "type": "string"
        }
      }
    },
    "GenerateIdTokenRequest": {
      "id": "GenerateIdTokenRequest",
      "type": "object",
      "properties": {
        "organizationNumberIncluded": {
          "description": "Include the organization number of the service account in the token. If set to `true`, the token will contain a `google.organization_number` claim. The value of the claim will be `null` if the service account isn't associated with an organization.",
          "type": "boolean"
        },
        "includeEmail": {
          "description": "Include the service account email in the token. If set to `true`, the token will contain `email` and `email_verified` claims.",
          "type": "boolean"
        },
        "delegates": {
          "description": "The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "audience": {
          "description": "Required. The audience for the token, such as the API or account that this token grants access to.",
          "type": "string"
        }
      }
    },
    "GenerateIdTokenResponse": {
      "properties": {
        "token": {
          "description": "The OpenId Connect ID token. The token is a JSON Web Token (JWT) that contains a payload with claims. See the [JSON Web Token spec](https://tools.ietf.org/html/rfc7519) for more information. Here is an example of a decoded JWT payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1496953245, \"exp\": 1496953245, \"aud\": \"https://www.example.com\", \"sub\": \"107517467455664443765\", \"azp\": \"107517467455664443765\", \"email\": \"my-iam-account@my-project.iam.gserviceaccount.com\", \"email_verified\": true, \"google\": { \"organization_number\": 123456 } } ```",
          "type": "string"
        }
      },
      "id": "GenerateIdTokenResponse",
      "type": "object"
    },
    "WorkforcePoolAllowedLocations": {
      "description": "Represents a list of allowed locations for given workforce pool.",
      "type": "object",
      "id": "WorkforcePoolAllowedLocations",
      "properties": {
        "locations": {
          "description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]",
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "encodedLocations": {
          "description": "Output only. The hex encoded bitmap of the trust boundary locations",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "GenerateAccessTokenResponse": {
      "properties": {
        "accessToken": {
          "description": "The OAuth 2.0 access token.",
          "type": "string"
        },
        "expireTime": {
          "description": "Token expiration time. The expiration time is always set.",
          "type": "string",
          "format": "google-datetime"
        }
      },
      "id": "GenerateAccessTokenResponse",
      "type": "object"
    },
    "GenerateAccessTokenRequest": {
      "type": "object",
      "id": "GenerateAccessTokenRequest",
      "properties": {
        "delegates": {
          "description": "The sequence of service accounts in a delegation chain. This field is required for [delegated requests](https://cloud.google.com/iam/help/credentials/delegated-request). For [direct requests](https://cloud.google.com/iam/help/credentials/direct-request), which are more common, do not specify this field. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lifetime": {
          "format": "google-duration",
          "description": "The desired lifetime duration of the access token in seconds. By default, the maximum allowed value is 1 hour. To set a lifetime of up to 12 hours, you can add the service account as an allowed value in an Organization Policy that enforces the `constraints/iam.allowServiceAccountCredentialLifetimeExtension` constraint. See detailed instructions at https://cloud.google.com/iam/help/credentials/lifetime If a value is not specified, the token's lifetime will be set to a default value of 1 hour.",
          "type": "string"
        },
        "scope": {
          "description": "Required. Code to identify the scopes to be included in the OAuth 2.0 access token. See https://developers.google.com/identity/protocols/googlescopes for more information. At least one value required.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "SignBlobRequest": {
      "properties": {
        "delegates": {
          "description": "The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "payload": {
          "format": "byte",
          "description": "Required. The bytes to sign.",
          "type": "string"
        }
      },
      "id": "SignBlobRequest",
      "type": "object"
    },
    "ServiceAccountAllowedLocations": {
      "properties": {
        "locations": {
          "description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]",
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "encodedLocations": {
          "description": "Output only. The hex encoded bitmap of the trust boundary locations",
          "readOnly": true,
          "type": "string"
        }
      },
      "description": "Represents a list of allowed locations for given service account.",
      "type": "object",
      "id": "ServiceAccountAllowedLocations"
    }
  },
  "description": "Creates short-lived credentials for impersonating IAM service accounts. Disabling this API also disables the IAM API (iam.googleapis.com). However, enabling this API doesn't enable the IAM API. ",
  "mtlsRootUrl": "https://iamcredentials.mtls.googleapis.com/",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "basePath": "",
  "revision": "20260709"
}
