@@ -17,7 +17,7 @@ const withAccessKey = (sdk: CoreSdk, managementKey?: string) => ({
1717 * @param name Access key name
1818 * @param expireTime When the access key expires. Keep at 0 to make it indefinite.
1919 * @param roles Optional roles in the project. Does not apply for multi-tenants
20- * @param keyTenants Optional associated tenants for this key and its roles for each.
20+ * @param tenants Optional associated tenants for this key and its roles for each.
2121 * @param userId Optional bind this access key to a specific user.
2222 * @param customClaims Optional map of claims and their values that will be present in the JWT.
2323 * @param description Optional free text description
@@ -28,7 +28,7 @@ const withAccessKey = (sdk: CoreSdk, managementKey?: string) => ({
2828 name : string ,
2929 expireTime : number ,
3030 roles ?: string [ ] ,
31- keyTenants ?: AssociatedTenant [ ] ,
31+ tenants ?: AssociatedTenant [ ] ,
3232 userId ?: string ,
3333 customClaims ?: Record < string , any > ,
3434 description ?: string ,
@@ -41,7 +41,7 @@ const withAccessKey = (sdk: CoreSdk, managementKey?: string) => ({
4141 name,
4242 expireTime,
4343 roleNames : roles ,
44- keyTenants,
44+ keyTenants : tenants ,
4545 userId,
4646 customClaims,
4747 description,
@@ -78,13 +78,33 @@ const withAccessKey = (sdk: CoreSdk, managementKey?: string) => ({
7878 * @param id Access key ID to load
7979 * @param name The updated access key name
8080 * @param description Optional updated access key description
81+ * @param roles Optional roles in the project. Does not apply for multi-tenants
82+ * @param tenants Optional associated tenants for this key and its roles for each.
83+ * @param customClaims Optional map of claims and their values that will be present in the JWT.
84+ * @param permittedIps Optional list of IP addresses or CIDR ranges that are allowed to use this access key.
8185 * @returns The updated access key
8286 */
83- update : ( id : string , name : string , description ?: string ) : Promise < SdkResponse < AccessKey > > =>
87+ update : (
88+ id : string ,
89+ name : string ,
90+ description ?: string ,
91+ roles ?: string [ ] ,
92+ tenants ?: AssociatedTenant [ ] ,
93+ customClaims ?: Record < string , any > ,
94+ permittedIps ?: string [ ] ,
95+ ) : Promise < SdkResponse < AccessKey > > =>
8496 transformResponse < SingleKeyResponse , AccessKey > (
8597 sdk . httpClient . post (
8698 apiPaths . accessKey . update ,
87- { id, name, description } ,
99+ {
100+ id,
101+ name,
102+ description,
103+ roleNames : roles ,
104+ keyTenants : tenants ,
105+ customClaims,
106+ permittedIps,
107+ } ,
88108 { token : managementKey } ,
89109 ) ,
90110 ( data ) => data . key ,
0 commit comments