Skip to main content

Get

Returns the specified federated credential.

To get the list of available federated credentials, make a List request.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetFederatedCredentialRequest =
cloudApi.iam.workload_federated_credential_service
.GetFederatedCredentialRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(
serviceClients.FederatedCredentialServiceClient
);

const result = await client.get(
GetFederatedCredentialRequest.fromPartial({
federatedCredentialId: "federatedCredentialId",
})
);
console.log(result);
})();

GetFederatedCredentialRequest

federatedCredentialId : string

ID of the federated credential to return. To get the federated credential ID, make a FederatedCredentialService.List request.

FederatedCredential

A federated credential.

id : string

Id of the federated credential.

serviceAccountId : string

Id of the service account that the federated credential belongs to.

federationId : string

ID of the workload identity federation which is used for authentication.

externalSubjectId : string

Id of the external subject.

createdAt : google.protobuf.Timestamp

Creation timestamp.