@@ -1914,6 +1914,11 @@ type GetOrganizationSamlRequest struct {
19141914 OrganizationID string `json:"-"`
19151915}
19161916
1917+ // GetOrganizationScimRequest: get organization scim request.
1918+ type GetOrganizationScimRequest struct {
1919+ OrganizationID string `json:"-"`
1920+ }
1921+
19171922// GetOrganizationSecuritySettingsRequest: get organization security settings request.
19181923type GetOrganizationSecuritySettingsRequest struct {
19191924 // OrganizationID: ID of the Organization.
@@ -4940,7 +4945,34 @@ func (s *API) DeleteSamlCertificate(req *DeleteSamlCertificateRequest, opts ...s
49404945 return nil
49414946}
49424947
4943- // EnableOrganizationScim:
4948+ // GetOrganizationScim: Get SCIM configuration of an Organization.
4949+ func (s * API ) GetOrganizationScim (req * GetOrganizationScimRequest , opts ... scw.RequestOption ) (* Scim , error ) {
4950+ var err error
4951+
4952+ if req .OrganizationID == "" {
4953+ defaultOrganizationID , _ := s .client .GetDefaultOrganizationID ()
4954+ req .OrganizationID = defaultOrganizationID
4955+ }
4956+
4957+ if fmt .Sprint (req .OrganizationID ) == "" {
4958+ return nil , errors .New ("field OrganizationID cannot be empty in request" )
4959+ }
4960+
4961+ scwReq := & scw.ScalewayRequest {
4962+ Method : "GET" ,
4963+ Path : "/iam/v1alpha1/organizations/" + fmt .Sprint (req .OrganizationID ) + "/scim" ,
4964+ }
4965+
4966+ var resp Scim
4967+
4968+ err = s .client .Do (scwReq , & resp , opts ... )
4969+ if err != nil {
4970+ return nil , err
4971+ }
4972+ return & resp , nil
4973+ }
4974+
4975+ // EnableOrganizationScim: Enable SCIM for an Organization.
49444976func (s * API ) EnableOrganizationScim (req * EnableOrganizationScimRequest , opts ... scw.RequestOption ) (* Scim , error ) {
49454977 var err error
49464978
@@ -4972,7 +5004,7 @@ func (s *API) EnableOrganizationScim(req *EnableOrganizationScimRequest, opts ..
49725004 return & resp , nil
49735005}
49745006
4975- // DeleteScim:
5007+ // DeleteScim: Disable SCIM for an Organization.
49765008func (s * API ) DeleteScim (req * DeleteScimRequest , opts ... scw.RequestOption ) error {
49775009 var err error
49785010
@@ -4992,7 +5024,7 @@ func (s *API) DeleteScim(req *DeleteScimRequest, opts ...scw.RequestOption) erro
49925024 return nil
49935025}
49945026
4995- // ListScimTokens:
5027+ // ListScimTokens: List SCIM tokens.
49965028func (s * API ) ListScimTokens (req * ListScimTokensRequest , opts ... scw.RequestOption ) (* ListScimTokensResponse , error ) {
49975029 var err error
49985030
@@ -5025,7 +5057,7 @@ func (s *API) ListScimTokens(req *ListScimTokensRequest, opts ...scw.RequestOpti
50255057 return & resp , nil
50265058}
50275059
5028- // CreateScimToken:
5060+ // CreateScimToken: Create a SCIM token.
50295061func (s * API ) CreateScimToken (req * CreateScimTokenRequest , opts ... scw.RequestOption ) (* CreateScimTokenResponse , error ) {
50305062 var err error
50315063
@@ -5047,7 +5079,7 @@ func (s *API) CreateScimToken(req *CreateScimTokenRequest, opts ...scw.RequestOp
50475079 return & resp , nil
50485080}
50495081
5050- // DeleteScimToken:
5082+ // DeleteScimToken: Delete a SCIM token.
50515083func (s * API ) DeleteScimToken (req * DeleteScimTokenRequest , opts ... scw.RequestOption ) error {
50525084 var err error
50535085
0 commit comments