Skip to content

Commit f69b30f

Browse files
feat(iam/v1alpha1): add GetSamlInformation (scaleway#2678)
Co-authored-by: Jonathan R. <[email protected]>
1 parent d5d4cc2 commit f69b30f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

api/iam/v1alpha1/iam_sdk.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,6 +1819,9 @@ type GetSSHKeyRequest struct {
18191819
SSHKeyID string `json:"-"`
18201820
}
18211821

1822+
// GetSamlInformationRequest: get saml information request.
1823+
type GetSamlInformationRequest struct{}
1824+
18221825
// GetUserConnectionsRequest: get user connections request.
18231826
type GetUserConnectionsRequest struct {
18241827
// UserID: ID of the user to list connections for.
@@ -2562,6 +2565,15 @@ type Saml struct {
25622565
SingleSignOnURL string `json:"single_sign_on_url"`
25632566
}
25642567

2568+
// SamlInformation: saml information.
2569+
type SamlInformation struct {
2570+
// EntityID: entity ID.
2571+
EntityID string `json:"entity_id"`
2572+
2573+
// AssertionConsumerServiceURL: sAML Assertion Consumer Service url.
2574+
AssertionConsumerServiceURL string `json:"assertion_consumer_service_url"`
2575+
}
2576+
25652577
// SetGroupMembersRequest: set group members request.
25662578
type SetGroupMembersRequest struct {
25672579
GroupID string `json:"-"`
@@ -4684,3 +4696,21 @@ func (s *API) DeleteSamlCertificate(req *DeleteSamlCertificateRequest, opts ...s
46844696
}
46854697
return nil
46864698
}
4699+
4700+
// GetSamlInformation: Get SAML information.
4701+
func (s *API) GetSamlInformation(req *GetSamlInformationRequest, opts ...scw.RequestOption) (*SamlInformation, error) {
4702+
var err error
4703+
4704+
scwReq := &scw.ScalewayRequest{
4705+
Method: "GET",
4706+
Path: "/iam/v1alpha1/saml-information",
4707+
}
4708+
4709+
var resp SamlInformation
4710+
4711+
err = s.client.Do(scwReq, &resp, opts...)
4712+
if err != nil {
4713+
return nil, err
4714+
}
4715+
return &resp, nil
4716+
}

0 commit comments

Comments
 (0)