UNPKG

8.21 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class SSO extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: SSO.Types.ClientConfiguration)
13 config: Config & SSO.Types.ClientConfiguration;
14 /**
15 * Returns the STS short-term credentials for a given role name that is assigned to the user.
16 */
17 getRoleCredentials(params: SSO.Types.GetRoleCredentialsRequest, callback?: (err: AWSError, data: SSO.Types.GetRoleCredentialsResponse) => void): Request<SSO.Types.GetRoleCredentialsResponse, AWSError>;
18 /**
19 * Returns the STS short-term credentials for a given role name that is assigned to the user.
20 */
21 getRoleCredentials(callback?: (err: AWSError, data: SSO.Types.GetRoleCredentialsResponse) => void): Request<SSO.Types.GetRoleCredentialsResponse, AWSError>;
22 /**
23 * Lists all roles that are assigned to the user for a given AWS account.
24 */
25 listAccountRoles(params: SSO.Types.ListAccountRolesRequest, callback?: (err: AWSError, data: SSO.Types.ListAccountRolesResponse) => void): Request<SSO.Types.ListAccountRolesResponse, AWSError>;
26 /**
27 * Lists all roles that are assigned to the user for a given AWS account.
28 */
29 listAccountRoles(callback?: (err: AWSError, data: SSO.Types.ListAccountRolesResponse) => void): Request<SSO.Types.ListAccountRolesResponse, AWSError>;
30 /**
31 * Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the AWS SSO User Guide. This operation returns a paginated response.
32 */
33 listAccounts(params: SSO.Types.ListAccountsRequest, callback?: (err: AWSError, data: SSO.Types.ListAccountsResponse) => void): Request<SSO.Types.ListAccountsResponse, AWSError>;
34 /**
35 * Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the AWS SSO User Guide. This operation returns a paginated response.
36 */
37 listAccounts(callback?: (err: AWSError, data: SSO.Types.ListAccountsResponse) => void): Request<SSO.Types.ListAccountsResponse, AWSError>;
38 /**
39 * Removes the client- and server-side session that is associated with the user.
40 */
41 logout(params: SSO.Types.LogoutRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
42 /**
43 * Removes the client- and server-side session that is associated with the user.
44 */
45 logout(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
46}
47declare namespace SSO {
48 export type AccessKeyType = string;
49 export type AccessTokenType = string;
50 export type AccountIdType = string;
51 export interface AccountInfo {
52 /**
53 * The identifier of the AWS account that is assigned to the user.
54 */
55 accountId?: AccountIdType;
56 /**
57 * The display name of the AWS account that is assigned to the user.
58 */
59 accountName?: AccountNameType;
60 /**
61 * The email address of the AWS account that is assigned to the user.
62 */
63 emailAddress?: EmailAddressType;
64 }
65 export type AccountListType = AccountInfo[];
66 export type AccountNameType = string;
67 export type EmailAddressType = string;
68 export type ExpirationTimestampType = number;
69 export interface GetRoleCredentialsRequest {
70 /**
71 * The friendly name of the role that is assigned to the user.
72 */
73 roleName: RoleNameType;
74 /**
75 * The identifier for the AWS account that is assigned to the user.
76 */
77 accountId: AccountIdType;
78 /**
79 * The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide.
80 */
81 accessToken: AccessTokenType;
82 }
83 export interface GetRoleCredentialsResponse {
84 /**
85 * The credentials for the role that is assigned to the user.
86 */
87 roleCredentials?: RoleCredentials;
88 }
89 export interface ListAccountRolesRequest {
90 /**
91 * The page token from the previous response output when you request subsequent pages.
92 */
93 nextToken?: NextTokenType;
94 /**
95 * The number of items that clients can request per page.
96 */
97 maxResults?: MaxResultType;
98 /**
99 * The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide.
100 */
101 accessToken: AccessTokenType;
102 /**
103 * The identifier for the AWS account that is assigned to the user.
104 */
105 accountId: AccountIdType;
106 }
107 export interface ListAccountRolesResponse {
108 /**
109 * The page token client that is used to retrieve the list of accounts.
110 */
111 nextToken?: NextTokenType;
112 /**
113 * A paginated response with the list of roles and the next token if more results are available.
114 */
115 roleList?: RoleListType;
116 }
117 export interface ListAccountsRequest {
118 /**
119 * (Optional) When requesting subsequent pages, this is the page token from the previous response output.
120 */
121 nextToken?: NextTokenType;
122 /**
123 * This is the number of items clients can request per page.
124 */
125 maxResults?: MaxResultType;
126 /**
127 * The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide.
128 */
129 accessToken: AccessTokenType;
130 }
131 export interface ListAccountsResponse {
132 /**
133 * The page token client that is used to retrieve the list of accounts.
134 */
135 nextToken?: NextTokenType;
136 /**
137 * A paginated response with the list of account information and the next token if more results are available.
138 */
139 accountList?: AccountListType;
140 }
141 export interface LogoutRequest {
142 /**
143 * The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide.
144 */
145 accessToken: AccessTokenType;
146 }
147 export type MaxResultType = number;
148 export type NextTokenType = string;
149 export interface RoleCredentials {
150 /**
151 * The identifier used for the temporary security credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide.
152 */
153 accessKeyId?: AccessKeyType;
154 /**
155 * The key that is used to sign the request. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide.
156 */
157 secretAccessKey?: SecretAccessKeyType;
158 /**
159 * The token used for temporary credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide.
160 */
161 sessionToken?: SessionTokenType;
162 /**
163 * The date on which temporary security credentials expire.
164 */
165 expiration?: ExpirationTimestampType;
166 }
167 export interface RoleInfo {
168 /**
169 * The friendly name of the role that is assigned to the user.
170 */
171 roleName?: RoleNameType;
172 /**
173 * The identifier of the AWS account assigned to the user.
174 */
175 accountId?: AccountIdType;
176 }
177 export type RoleListType = RoleInfo[];
178 export type RoleNameType = string;
179 export type SecretAccessKeyType = string;
180 export type SessionTokenType = string;
181 /**
182 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
183 */
184 export type apiVersion = "2019-06-10"|"latest"|string;
185 export interface ClientApiVersions {
186 /**
187 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
188 */
189 apiVersion?: apiVersion;
190 }
191 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
192 /**
193 * Contains interfaces for use with the SSO client.
194 */
195 export import Types = SSO;
196}
197export = SSO;