Skip to content

Commit 8a68eca

Browse files
authored
feat(iam): clone a policy (#204)
1 parent 9c8bbf0 commit 8a68eca

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/clients/src/api/iam/v1alpha1/api.gen.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import type {
4242
APIKey,
4343
AddGroupMemberRequest,
4444
Application,
45+
ClonePolicyRequest,
4546
CreateAPIKeyRequest,
4647
CreateApplicationRequest,
4748
CreateGroupRequest,
@@ -665,6 +666,20 @@ export class IamV1Alpha1GenAPI extends API {
665666
)}`,
666667
})
667668

669+
clonePolicy = (request: Readonly<ClonePolicyRequest>) =>
670+
this.client.fetch<Policy>(
671+
{
672+
body: '{}',
673+
headers: jsonContentHeaders,
674+
method: 'POST',
675+
path: `/iam/v1alpha1/policies/${validatePathParam(
676+
'policyId',
677+
request.policyId,
678+
)}/clone`,
679+
},
680+
unmarshalPolicy,
681+
)
682+
668683
/**
669684
* Set rules of an existing policy
670685
*

packages/clients/src/api/iam/v1alpha1/types.gen.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,10 @@ export type DeletePolicyRequest = {
688688
policyId: string
689689
}
690690

691+
export type ClonePolicyRequest = {
692+
policyId: string
693+
}
694+
691695
export type SetRulesRequest = {
692696
/** Id of policy to update */
693697
policyId: string

0 commit comments

Comments
 (0)