Get
Returns the specified UserAccount resource.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetUserAccountRequest =
cloudApi.iam.user_account_service.GetUserAccountRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.UserAccountServiceClient);
const result = await client.get(
GetUserAccountRequest.fromPartial({
userAccountId: "userAccountId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.iam.v1.user_account_service_pb2 import GetUserAccountRequest
from yandex.cloud.iam.v1.user_account_service_pb2_grpc import UserAccountServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(UserAccountServiceStub)
response = service.Get(GetUserAccountRequest(user_account_id="userAccountId"))
print(response)
GetUserAccountRequest
userAccountId
: string
ID of the UserAccount resource to return.
UserAccount
Currently represents only Yandex account.
id
: string
ID of the user account.
One of userAccount
yandexPassportUserAccount
: YandexPassportUserAccountA YandexPassportUserAccount resource.
samlUserAccount
: SamlUserAccountA SAML federated user.
YandexPassportUserAccount
A YandexPassportUserAccount resource. For more information, see Yandex account.
login
: string
Login of the Yandex user account.
defaultEmail
: string
Default email of the Yandex user account.
SamlUserAccount
A SAML federated user. For more information, see federations.
Attribute
value
: string
federationId
: string
ID of the federation that the federation belongs to.
nameId
: string
Name Id of the SAML federated user. The name is unique within the federation. 1-256 characters long.
attributes
: Attribute
Additional attributes of the SAML federated user.