• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * A client to IAM Service Account Credentials API
19  *
20  * <p>The interfaces provided are listed below, along with usage samples.
21  *
22  * <p>======================= IamCredentialsClient =======================
23  *
24  * <p>Service Description: A service account is a special type of Google account that belongs to
25  * your application or a virtual machine (VM), instead of to an individual end user. Your
26  * application assumes the identity of the service account to call Google APIs, so that the users
27  * aren't directly involved.
28  *
29  * <p>Service account credentials are used to temporarily assume the identity of the service
30  * account. Supported credential types include OAuth 2.0 access tokens, OpenID Connect ID tokens,
31  * self-signed JSON Web Tokens (JWTs), and more.
32  *
33  * <p>Sample for IamCredentialsClient:
34  *
35  * <pre>{@code
36  * // This snippet has been automatically generated and should be regarded as a code template only.
37  * // It will require modifications to work:
38  * // - It may require correct/in-range values for request initialization.
39  * // - It may require specifying regional endpoints when creating the service client as shown in
40  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
41  * try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
42  *   ServiceAccountName name = ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]");
43  *   List<String> delegates = new ArrayList<>();
44  *   List<String> scope = new ArrayList<>();
45  *   Duration lifetime = Duration.newBuilder().build();
46  *   GenerateAccessTokenResponse response =
47  *       iamCredentialsClient.generateAccessToken(name, delegates, scope, lifetime);
48  * }
49  * }</pre>
50  */
51 @Generated("by gapic-generator-java")
52 package com.google.cloud.iam.credentials.v1;
53 
54 import javax.annotation.Generated;
55