GetByLogin
Returns the specified YandexPassportUserAccount resource.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetUserAccountByLoginRequest =
cloudApi.iam.yandex_passport_user_account_service
.GetUserAccountByLoginRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(
serviceClients.YandexPassportUserAccountServiceClient
);
const result = await client.getByLogin(
GetUserAccountByLoginRequest.fromPartial({
login: "login",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.iam.v1.yandex_passport_user_account_service_pb2 import (
GetUserAccountByLoginRequest,
)
from yandex.cloud.iam.v1.yandex_passport_user_account_service_pb2_grpc import (
YandexPassportUserAccountServiceStub,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(YandexPassportUserAccountServiceStub)
response = service.GetByLogin(GetUserAccountByLoginRequest(login="login"))
print(response)
GetUserAccountByLoginRequest
login
: string
Login of the YandexPassportUserAccount 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.