{
  "revision": "20260423",
  "basePath": "",
  "version": "v1",
  "baseUrl": "https://iamcredentials.googleapis.com/",
  "title": "IAM Service Account Credentials API",
  "mtlsRootUrl": "https://iamcredentials.mtls.googleapis.com/",
  "name": "iamcredentials",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "servicePath": "",
  "batchPath": "batch",
  "id": "iamcredentials:v1",
  "version_module": true,
  "discoveryVersion": "v1",
  "parameters": {
    "alt": {
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "description": "Data format for response.",
      "location": "query",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "callback": {
      "description": "JSONP",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string"
    },
    "prettyPrint": {
      "type": "boolean",
      "default": "true",
      "location": "query",
      "description": "Returns response with indentations and line breaks."
    },
    "quotaUser": {
      "type": "string",
      "location": "query",
      "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."
    },
    "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"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "location": "query",
      "type": "string"
    },
    "access_token": {
      "location": "query",
      "description": "OAuth access token.",
      "type": "string"
    },
    "uploadType": {
      "type": "string",
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
    },
    "$.xgafv": {
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "description": "V1 error format.",
      "location": "query"
    }
  },
  "schemas": {
    "GenerateAccessTokenRequest": {
      "properties": {
        "lifetime": {
          "format": "google-duration",
          "type": "string",
          "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."
        },
        "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.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "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.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "id": "GenerateAccessTokenRequest",
      "type": "object"
    },
    "GenerateIdTokenResponse": {
      "type": "object",
      "id": "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"
        }
      }
    },
    "GenerateAccessTokenResponse": {
      "type": "object",
      "properties": {
        "expireTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Token expiration time. The expiration time is always set."
        },
        "accessToken": {
          "description": "The OAuth 2.0 access token.",
          "type": "string"
        }
      },
      "id": "GenerateAccessTokenResponse"
    },
    "SignBlobResponse": {
      "type": "object",
      "properties": {
        "signedBlob": {
          "type": "string",
          "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."
        },
        "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"
        }
      },
      "id": "SignBlobResponse"
    },
    "SignJwtResponse": {
      "id": "SignJwtResponse",
      "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"
        }
      },
      "type": "object"
    },
    "ServiceAccountAllowedLocations": {
      "type": "object",
      "id": "ServiceAccountAllowedLocations",
      "description": "Represents a list of allowed locations for given service account.",
      "properties": {
        "encodedLocations": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The hex encoded bitmap of the trust boundary locations"
        },
        "locations": {
          "items": {
            "type": "string"
          },
          "description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]",
          "readOnly": true,
          "type": "array"
        }
      }
    },
    "WorkloadIdentityPoolAllowedLocations": {
      "description": "Represents a list of allowed locations for given workload identity pool.",
      "properties": {
        "encodedLocations": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The hex encoded bitmap of the trust boundary locations"
        },
        "locations": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]"
        }
      },
      "id": "WorkloadIdentityPoolAllowedLocations",
      "type": "object"
    },
    "WorkforcePoolAllowedLocations": {
      "description": "Represents a list of allowed locations for given workforce pool.",
      "properties": {
        "locations": {
          "items": {
            "type": "string"
          },
          "description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]",
          "readOnly": true,
          "type": "array"
        },
        "encodedLocations": {
          "description": "Output only. The hex encoded bitmap of the trust boundary locations",
          "readOnly": true,
          "type": "string"
        }
      },
      "id": "WorkforcePoolAllowedLocations",
      "type": "object"
    },
    "SignBlobRequest": {
      "type": "object",
      "id": "SignBlobRequest",
      "properties": {
        "delegates": {
          "items": {
            "type": "string"
          },
          "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"
        },
        "payload": {
          "type": "string",
          "format": "byte",
          "description": "Required. The bytes to sign."
        }
      }
    },
    "GenerateIdTokenRequest": {
      "properties": {
        "delegates": {
          "items": {
            "type": "string"
          },
          "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"
        },
        "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"
        },
        "audience": {
          "description": "Required. The audience for the token, such as the API or account that this token grants access to.",
          "type": "string"
        }
      },
      "id": "GenerateIdTokenRequest",
      "type": "object"
    },
    "SignJwtRequest": {
      "properties": {
        "delegates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "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."
        },
        "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"
        }
      },
      "id": "SignJwtRequest",
      "type": "object"
    }
  },
  "canonicalName": "IAM Credentials",
  "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."
        }
      }
    }
  },
  "ownerName": "Google",
  "endpoints": [
    {
      "description": "Regional Endpoint",
      "location": "asia-east1",
      "endpointUrl": "https://iamcredentials.asia-east1.rep.googleapis.com/"
    },
    {
      "endpointUrl": "https://iamcredentials.europe-west1.rep.googleapis.com/",
      "description": "Regional Endpoint",
      "location": "europe-west1"
    },
    {
      "description": "Regional Endpoint",
      "location": "us-central1",
      "endpointUrl": "https://iamcredentials.us-central1.rep.googleapis.com/"
    },
    {
      "location": "us-east1",
      "description": "Regional Endpoint",
      "endpointUrl": "https://iamcredentials.us-east1.rep.googleapis.com/"
    },
    {
      "endpointUrl": "https://iamcredentials.us-east7.rep.googleapis.com/",
      "location": "us-east7",
      "description": "Regional Endpoint"
    },
    {
      "description": "Regional Endpoint",
      "location": "us-west1",
      "endpointUrl": "https://iamcredentials.us-west1.rep.googleapis.com/"
    }
  ],
  "kind": "discovery#restDescription",
  "documentationLink": "https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials",
  "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. ",
  "protocol": "rest",
  "fullyEncodeReservedExpansion": true,
  "resources": {
    "projects": {
      "resources": {
        "serviceAccounts": {
          "methods": {
            "signBlob": {
              "description": "Signs a blob using a service account's system-managed private key.",
              "parameterOrder": [
                "projectsId",
                "serviceAccountsId"
              ],
              "id": "iamcredentials.projects.serviceAccounts.signBlob",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob",
              "path": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob",
              "response": {
                "$ref": "SignBlobResponse"
              },
              "httpMethod": "POST",
              "parameters": {
                "serviceAccountsId": {
                  "description": "Part of `name`. See documentation of `projectsId`.",
                  "location": "path",
                  "type": "string",
                  "required": true
                },
                "projectsId": {
                  "location": "path",
                  "description": "Part of `name`. 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.",
                  "required": true,
                  "type": "string"
                }
              },
              "request": {
                "$ref": "SignBlobRequest"
              }
            },
            "signJwt": {
              "httpMethod": "POST",
              "parameters": {
                "serviceAccountsId": {
                  "description": "Part of `name`. See documentation of `projectsId`.",
                  "location": "path",
                  "type": "string",
                  "required": true
                },
                "projectsId": {
                  "description": "Part of `name`. 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.",
                  "location": "path",
                  "type": "string",
                  "required": true
                }
              },
              "request": {
                "$ref": "SignJwtRequest"
              },
              "path": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt",
              "response": {
                "$ref": "SignJwtResponse"
              },
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt",
              "id": "iamcredentials.projects.serviceAccounts.signJwt",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "parameterOrder": [
                "projectsId",
                "serviceAccountsId"
              ],
              "description": "Signs a JWT using a service account's system-managed private key."
            },
            "generateIdToken": {
              "id": "iamcredentials.projects.serviceAccounts.generateIdToken",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateIdToken",
              "path": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateIdToken",
              "response": {
                "$ref": "GenerateIdTokenResponse"
              },
              "description": "Generates an OpenID Connect ID token for a service account.",
              "parameterOrder": [
                "projectsId",
                "serviceAccountsId"
              ],
              "httpMethod": "POST",
              "parameters": {
                "serviceAccountsId": {
                  "description": "Part of `name`. See documentation of `projectsId`.",
                  "location": "path",
                  "type": "string",
                  "required": true
                },
                "projectsId": {
                  "description": "Part of `name`. 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.",
                  "location": "path",
                  "type": "string",
                  "required": true
                }
              },
              "request": {
                "$ref": "GenerateIdTokenRequest"
              }
            },
            "generateAccessToken": {
              "httpMethod": "POST",
              "parameters": {
                "projectsId": {
                  "location": "path",
                  "description": "Part of `name`. 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.",
                  "required": true,
                  "type": "string"
                },
                "serviceAccountsId": {
                  "required": true,
                  "type": "string",
                  "location": "path",
                  "description": "Part of `name`. See documentation of `projectsId`."
                }
              },
              "request": {
                "$ref": "GenerateAccessTokenRequest"
              },
              "parameterOrder": [
                "projectsId",
                "serviceAccountsId"
              ],
              "description": "Generates an OAuth 2.0 access token for a service account.",
              "path": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateAccessToken",
              "response": {
                "$ref": "GenerateAccessTokenResponse"
              },
              "id": "iamcredentials.projects.serviceAccounts.generateAccessToken",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateAccessToken"
            },
            "getAllowedLocations": {
              "id": "iamcredentials.projects.serviceAccounts.getAllowedLocations",
              "httpMethod": "GET",
              "parameters": {
                "projectsId": {
                  "location": "path",
                  "description": "Part of `name`. Required. Resource name of service account. Format: `projects/-/serviceAccounts/{service_account_email}`",
                  "required": true,
                  "type": "string"
                },
                "serviceAccountsId": {
                  "required": true,
                  "type": "string",
                  "location": "path",
                  "description": "Part of `name`. See documentation of `projectsId`."
                }
              },
              "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/allowedLocations",
              "path": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/allowedLocations",
              "response": {
                "$ref": "ServiceAccountAllowedLocations"
              },
              "description": "Returns the trust boundary info for a given service account.",
              "parameterOrder": [
                "projectsId",
                "serviceAccountsId"
              ]
            }
          }
        },
        "locations": {
          "resources": {
            "workloadIdentityPools": {
              "methods": {
                "getAllowedLocations": {
                  "parameterOrder": [
                    "projectsId",
                    "locationsId",
                    "workloadIdentityPoolsId"
                  ],
                  "description": "Returns the trust boundary info for a given workload identity pool.",
                  "path": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/allowedLocations",
                  "response": {
                    "$ref": "WorkloadIdentityPoolAllowedLocations"
                  },
                  "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/allowedLocations",
                  "id": "iamcredentials.projects.locations.workloadIdentityPools.getAllowedLocations",
                  "httpMethod": "GET",
                  "parameters": {
                    "workloadIdentityPoolsId": {
                      "location": "path",
                      "description": "Part of `name`. See documentation of `projectsId`.",
                      "required": true,
                      "type": "string"
                    },
                    "projectsId": {
                      "description": "Part of `name`. Required. Resource name of workload identity pool. Format: `projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}`",
                      "location": "path",
                      "type": "string",
                      "required": true
                    },
                    "locationsId": {
                      "type": "string",
                      "required": true,
                      "description": "Part of `name`. See documentation of `projectsId`.",
                      "location": "path"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "locations": {
      "resources": {
        "workforcePools": {
          "methods": {
            "getAllowedLocations": {
              "path": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/allowedLocations",
              "response": {
                "$ref": "WorkforcePoolAllowedLocations"
              },
              "id": "iamcredentials.locations.workforcePools.getAllowedLocations",
              "httpMethod": "GET",
              "parameters": {
                "locationsId": {
                  "type": "string",
                  "required": true,
                  "description": "Part of `name`. Required. Resource name of workforce pool. Format: `locations/global/workforcePools/{pool_id}`",
                  "location": "path"
                },
                "workforcePoolsId": {
                  "location": "path",
                  "description": "Part of `name`. See documentation of `locationsId`.",
                  "required": true,
                  "type": "string"
                }
              },
              "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/allowedLocations",
              "parameterOrder": [
                "locationsId",
                "workforcePoolsId"
              ],
              "description": "Returns the trust boundary info for a given workforce pool."
            }
          }
        }
      }
    }
  },
  "ownerDomain": "google.com",
  "rootUrl": "https://iamcredentials.googleapis.com/"
}
