Skip to content

Latest commit

 

History

History
363 lines (231 loc) · 12.6 KB

ManagedClustersAPI.md

File metadata and controls

363 lines (231 loc) · 12.6 KB

\ManagedClustersAPI

All URIs are relative to https://sailpoint.api.identitynow.com/v3

Method HTTP request Description
CreateManagedCluster Post /managed-clusters Create a new Managed Cluster
DeleteManagedCluster Delete /managed-clusters/{id} Delete a Managed Cluster
GetManagedCluster Get /managed-clusters/{id} Get a specified Managed Cluster.
GetManagedClusters Get /managed-clusters Retrieve all Managed Clusters.
UpdateManagedCluster Patch /managed-clusters/{id} Update a Managed Cluster

CreateManagedCluster

ManagedCluster CreateManagedCluster(ctx).ManagedClusterRequest(managedClusterRequest).Execute()

Create a new Managed Cluster

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    managedClusterRequest := *openapiclient.NewManagedClusterRequest("Managed Cluster Name") // ManagedClusterRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagedClustersAPI.CreateManagedCluster(context.Background()).ManagedClusterRequest(managedClusterRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.CreateManagedCluster``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateManagedCluster`: ManagedCluster
    fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.CreateManagedCluster`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateManagedClusterRequest struct via the builder pattern

Name Type Description Notes
managedClusterRequest ManagedClusterRequest

Return type

ManagedCluster

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteManagedCluster

DeleteManagedCluster(ctx, id).RemoveClients(removeClients).Execute()

Delete a Managed Cluster

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    id := "aClusterId" // string | The Managed Cluster ID
    removeClients := false // bool | Flag to determine the need to delete a cluster with clients (optional) (default to false)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.ManagedClustersAPI.DeleteManagedCluster(context.Background(), id).RemoveClients(removeClients).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.DeleteManagedCluster``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The Managed Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiDeleteManagedClusterRequest struct via the builder pattern

Name Type Description Notes

removeClients | bool | Flag to determine the need to delete a cluster with clients | [default to false]

Return type

(empty response body)

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetManagedCluster

ManagedCluster GetManagedCluster(ctx, id).Execute()

Get a specified Managed Cluster.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    id := "aClusterId" // string | ID of the ManagedCluster to get

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagedClustersAPI.GetManagedCluster(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.GetManagedCluster``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetManagedCluster`: ManagedCluster
    fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.GetManagedCluster`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID of the ManagedCluster to get

Other Parameters

Other parameters are passed through a pointer to a apiGetManagedClusterRequest struct via the builder pattern

Name Type Description Notes

Return type

ManagedCluster

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetManagedClusters

[]ManagedCluster GetManagedClusters(ctx).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()

Retrieve all Managed Clusters.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    offset := int32(0) // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
    limit := int32(250) // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
    count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored.  Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used.  See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
    filters := "operational eq "operation"" // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)  Filtering is supported for the following fields and operators:  **operational**: *eq* (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagedClustersAPI.GetManagedClusters(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.GetManagedClusters``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetManagedClusters`: []ManagedCluster
    fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.GetManagedClusters`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetManagedClustersRequest struct via the builder pattern

Name Type Description Notes
offset int32 Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. [default to 0]
limit int32 Max number of results to return. See V3 API Standard Collection Parameters for more information. [default to 250]
count bool If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information. [default to false]
filters string Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: operational: eq

Return type

[]ManagedCluster

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateManagedCluster

ManagedCluster UpdateManagedCluster(ctx, id).JsonPatch(jsonPatch).Execute()

Update a Managed Cluster

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    id := "aClusterId" // string | The Managed Cluster ID
    jsonPatch := *openapiclient.NewJsonPatch() // JsonPatch | The JSONPatch payload used to update the schema.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagedClustersAPI.UpdateManagedCluster(context.Background(), id).JsonPatch(jsonPatch).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.UpdateManagedCluster``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateManagedCluster`: ManagedCluster
    fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.UpdateManagedCluster`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The Managed Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiUpdateManagedClusterRequest struct via the builder pattern

Name Type Description Notes

jsonPatch | JsonPatch | The JSONPatch payload used to update the schema. |

Return type

ManagedCluster

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

  • Content-Type: application/json-patch+json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]