get Account Key
Get service account public key. For more information, see the official documentation and API.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceAccount.Account;
import com.pulumi.gcp.serviceAccount.AccountArgs;
import com.pulumi.gcp.serviceAccount.Key;
import com.pulumi.gcp.serviceAccount.KeyArgs;
import com.pulumi.gcp.serviceAccount.ServiceAccountFunctions;
import com.pulumi.gcp.serviceAccount.inputs.GetAccountKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var myaccount = new Account("myaccount", AccountArgs.builder()
.accountId("dev-foo-account")
.build());
var mykeyKey = new Key("mykeyKey", KeyArgs.builder()
.serviceAccountId(myaccount.name())
.build());
final var mykeyAccountKey = ServiceAccountFunctions.getAccountKey(GetAccountKeyArgs.builder()
.name(mykeyKey.name())
.publicKeyType("TYPE_X509_PEM_FILE")
.build());
}
}
Return
A collection of values returned by getAccountKey.
Parameters
A collection of arguments for invoking getAccountKey.
Return
A collection of values returned by getAccountKey.
Parameters
The name of the service account key. This must have format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{KEYID}
, where {ACCOUNT}
is the email address or unique id of the service account.
The ID of the project that the service account will be created in. Defaults to the provider project configuration.
The output format of the public key requested. TYPE_X509_PEM_FILE is the default output format.
See also
Return
A collection of values returned by getAccountKey.
Parameters
Builder for com.pulumi.gcp.serviceAccount.kotlin.inputs.GetAccountKeyPlainArgs.