Skip to content

Commit 71db561

Browse files
feat(iam/v1alpha1): add GetSamlInformation (#2324)
Co-authored-by: Jonathan R. <[email protected]>
1 parent 868efe3 commit 71db561

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

packages_generated/iam/src/v1alpha1/api.gen.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import {
6464
unmarshalQuotum,
6565
unmarshalSaml,
6666
unmarshalSamlCertificate,
67+
unmarshalSamlInformation,
6768
unmarshalSetRulesResponse,
6869
unmarshalSSHKey,
6970
unmarshalUser,
@@ -106,6 +107,7 @@ import type {
106107
GetOrganizationSecuritySettingsRequest,
107108
GetPolicyRequest,
108109
GetQuotumRequest,
110+
GetSamlInformationRequest,
109111
GetSSHKeyRequest,
110112
GetUserConnectionsRequest,
111113
GetUserConnectionsResponse,
@@ -153,6 +155,7 @@ import type {
153155
RemoveUserConnectionRequest,
154156
Saml,
155157
SamlCertificate,
158+
SamlInformation,
156159
SetGroupMembersRequest,
157160
SetOrganizationAliasRequest,
158161
SetRulesRequest,
@@ -1518,4 +1521,19 @@ export class API extends ParentAPI {
15181521
method: 'DELETE',
15191522
path: `/iam/v1alpha1/saml-certificates/${validatePathParam('certificateId', request.certificateId)}`,
15201523
})
1524+
1525+
/**
1526+
* Get SAML information.
1527+
*
1528+
* @param request - The request {@link GetSamlInformationRequest}
1529+
* @returns A Promise of SamlInformation
1530+
*/
1531+
getSamlInformation = (request: Readonly<GetSamlInformationRequest> = {}) =>
1532+
this.client.fetch<SamlInformation>(
1533+
{
1534+
method: 'GET',
1535+
path: `/iam/v1alpha1/saml-information`,
1536+
},
1537+
unmarshalSamlInformation,
1538+
)
15211539
}

packages_generated/iam/src/v1alpha1/index.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type {
4444
GetOrganizationSecuritySettingsRequest,
4545
GetPolicyRequest,
4646
GetQuotumRequest,
47+
GetSamlInformationRequest,
4748
GetSSHKeyRequest,
4849
GetUserConnectionsRequest,
4950
GetUserConnectionsResponse,
@@ -113,6 +114,7 @@ export type {
113114
SamlCertificate,
114115
SamlCertificateOrigin,
115116
SamlCertificateType,
117+
SamlInformation,
116118
SetGroupMembersRequest,
117119
SetOrganizationAliasRequest,
118120
SetRulesRequest,

packages_generated/iam/src/v1alpha1/marshalling.gen.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import type {
6060
RuleSpecs,
6161
Saml,
6262
SamlCertificate,
63+
SamlInformation,
6364
SetGroupMembersRequest,
6465
SetOrganizationAliasRequest,
6566
SetRulesRequest,
@@ -711,6 +712,19 @@ export const unmarshalSaml = (data: unknown): Saml => {
711712
} as Saml
712713
}
713714

715+
export const unmarshalSamlInformation = (data: unknown): SamlInformation => {
716+
if (!isJSONObject(data)) {
717+
throw new TypeError(
718+
`Unmarshalling the type 'SamlInformation' failed as data isn't a dictionary.`,
719+
)
720+
}
721+
722+
return {
723+
assertionConsumerServiceUrl: data.assertion_consumer_service_url,
724+
entityId: data.entity_id,
725+
} as SamlInformation
726+
}
727+
714728
export const unmarshalSetRulesResponse = (data: unknown): SetRulesResponse => {
715729
if (!isJSONObject(data)) {
716730
throw new TypeError(

packages_generated/iam/src/v1alpha1/types.gen.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,8 @@ export type GetSSHKeyRequest = {
11911191
sshKeyId: string
11921192
}
11931193

1194+
export type GetSamlInformationRequest = Record<string, never>
1195+
11941196
export type GetUserConnectionsRequest = {
11951197
/**
11961198
* ID of the user to list connections for.
@@ -1842,6 +1844,17 @@ export interface Saml {
18421844
singleSignOnUrl: string
18431845
}
18441846

1847+
export interface SamlInformation {
1848+
/**
1849+
* Entity ID.
1850+
*/
1851+
entityId: string
1852+
/**
1853+
* SAML Assertion Consumer Service url.
1854+
*/
1855+
assertionConsumerServiceUrl: string
1856+
}
1857+
18451858
export type SetGroupMembersRequest = {
18461859
groupId: string
18471860
userIds: string[]

0 commit comments

Comments
 (0)