### Get Saviynt Connection Details Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/ConnectionsAPI.md This Go example demonstrates how to retrieve detailed information about a specific Saviynt connection. Initialize the API client and request the details. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { getConnectionDetailsRequest := *openapiclient.NewGetConnectionDetailsRequest() configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ConnectionsAPI.GetConnectionDetails(context.Background()).GetConnectionDetailsRequest(getConnectionDetailsRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConnectionsAPI.GetConnectionDetails``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetConnectionDetails`: GetConnectionDetailsResponse fmt.Fprintf(os.Stdout, "Response from `ConnectionsAPI.GetConnectionDetails`: %v\n", resp) } ``` -------------------------------- ### Install API Dependencies Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/README.md Install the required Go packages for the API client. ```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` -------------------------------- ### Get Delegate User List in Saviynt Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/delegatedadministration/docs/DelegatedAdministrationAPI.md This Go example shows how to retrieve a list of delegate users in Saviynt, using the parent username for the query. It utilizes the Saviynt client library. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { getDelegateUserListRequest := *openapiclient.NewGetDelegateUserListRequest("Parentusername_example") // GetDelegateUserListRequest | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DelegatedAdministrationAPI.GetDelegateUserList(context.Background()).GetDelegateUserListRequest(getDelegateUserListRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DelegatedAdministrationAPI.GetDelegateUserList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetDelegateUserList`: GetDelegateUserListResponse fmt.Fprintf(os.Stdout, "Response from `DelegatedAdministrationAPI.GetDelegateUserList`: %v\n", resp) } ``` -------------------------------- ### Simple REST Connector Example Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/examples/resources/saviynt_rest_connection_resource/README.md A basic example demonstrating the creation of a Saviynt REST connector. Refer to the Saviynt documentation for detailed configuration options. ```Terraform resource "saviynt_rest_connection_resource" "example" { name = "Example REST Connector" description = "This is a sample REST connector." url = "https://example.saviyntcloud.com/api" username = "admin" password = "password" tenant_id = "your_tenant_id" api_key = "your_api_key" client_id = "your_client_id" client_secret = "your_client_secret" token_url = "https://example.saviyntcloud.com/oauth/token" grant_type = "client_credentials" scope = "read write" connection_type = "oauth2" is_default = false is_enabled = true } ``` -------------------------------- ### Saviynt Terraform Provider Configuration Example Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/docs/resources/adsi_connection_resource.md Example configuration block for the Saviynt Terraform provider, demonstrating how to set up connection details and attributes. ```hcl distinguishedName = "$$${account.COMMENTS?.replace('', '\')?.replace('/', '/')}" moveObjectToOU = "OU=TestContainer,DC=domain1,DC=com" attributes = { displayName = "$$${user.displayname}" streetaddress = "$$${user.street}" } } ] }) } ``` -------------------------------- ### Create a privilege using Go Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/privileges/docs/PrivilegeAPI.md Demonstrates how to initialize the API client and execute a request to create a new privilege. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { createUpdatePrivilegeRequest := *openapiclient.NewCreateUpdatePrivilegeRequest("sample_ss", "sample_endpoint", "sample_ent_type", *openapiclient.NewCreateUpdatePrivilegeRequestPrivilege()) // CreateUpdatePrivilegeRequest | Request payload for creating a privilege configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.PrivilegeAPI.CreatePrivilege(context.Background()).CreateUpdatePrivilegeRequest(createUpdatePrivilegeRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PrivilegeAPI.CreatePrivilege``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreatePrivilege`: CreateUpdatePrivilegeResponse fmt.Fprintf(os.Stdout, "Response from `PrivilegeAPI.CreatePrivilege`: %v\n", resp) } ``` -------------------------------- ### Get Entitlement Type List Request Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlementtype/README.md Example of how to retrieve a list of entitlement types. This typically involves sending a GET request to the /ECM/api/v5/getEntitlementTypes endpoint. ```go /* // TODO: Uncomment the lines below and fill the appropriate params ctx := context.TODO() resp, httpres, err := entitlementtype.NewEntitlementTypeAPI(apiClient).GetEntitlementType(ctx) if err != nil { // handle error } // Close the http response, ensure that this is done in a finally block defer httpres.Body.Close() // data from response body fmt.Println(resp) */ ``` -------------------------------- ### Saviynt Get Workers Request XML Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/docs/resources/workday_soap_connection_resource.md Example XML payload for a Saviynt Get Workers request. This is used to retrieve worker information based on specified criteria and response filters. ```xml username@domain XXXX hVovDsRjkofd3OphNZ83kg== 2017-07-27T22:14:20.415Z false false false 2020-02-06T00:00:00 2020-02-07T00:00:00 1 500 false true false true false true true true false true true true true true true true true true true true true false false false false false false false false false false false false false false false false true false false false false false false false false ``` -------------------------------- ### Initialize GetKeyStoreCertificateDetailsResponse Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/mtlsauthentication/docs/GetKeyStoreCertificateDetailsResponse.md Constructors for creating a new GetKeyStoreCertificateDetailsResponse instance. ```go func NewGetKeyStoreCertificateDetailsResponse() *GetKeyStoreCertificateDetailsResponse ``` ```go func NewGetKeyStoreCertificateDetailsResponseWithDefaults() *GetKeyStoreCertificateDetailsResponse ``` -------------------------------- ### Initialize Terraform Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/README.md Run 'terraform init' to initialize the working directory, downloading provider plugins and setting up the backend. ```sh terraform init ``` -------------------------------- ### Get Endpoints using Saviynt Terraform Provider Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/endpoints/docs/EndpointsAPI.md This example demonstrates how to retrieve a list of endpoints. It initializes the request payload and uses the API client to fetch the endpoint list. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { getEndpointsRequest := *openapiclient.NewGetEndpointsRequest() // GetEndpointsRequest | Request payload for listing enpoints. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.EndpointsAPI.GetEndpoints(context.Background()).GetEndpointsRequest(getEndpointsRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `EndpointsAPI.GetEndpoints``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetEndpoints`: GetEndpoints200Response fmt.Fprintf(os.Stdout, "Response from `EndpointsAPI.GetEndpoints`: %v\n", resp) } ``` -------------------------------- ### Update Security System in Go Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/securitysystems/docs/SecuritySystemsAPI.md Demonstrates how to initialize the API client and execute an update request for a security system. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { updateSecuritySystemRequest := *openapiclient.NewUpdateSecuritySystemRequest("sys1", "sys1Disp") // UpdateSecuritySystemRequest | Request payload for updating a Security System. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.SecuritySystemsAPI.UpdateSecuritySystem(context.Background()).UpdateSecuritySystemRequest(updateSecuritySystemRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SecuritySystemsAPI.UpdateSecuritySystem``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateSecuritySystem`: CreateSecuritySystem200Response fmt.Fprintf(os.Stdout, "Response from `SecuritySystemsAPI.UpdateSecuritySystem`: %v\n", resp) } ``` -------------------------------- ### Select Server Configuration Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/README.md Use context to specify a server index other than the default. ```go ctx := context.WithValue(context.Background(), connections.ContextServerIndex, 1) ``` -------------------------------- ### Get KeyStore Certificate Details using MTLS Authentication API Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/mtlsauthentication/docs/MTLSAuthenticationAPI.md This Go example demonstrates how to retrieve details of a KeyStore certificate using the MTLS Authentication API. It prints the response or any errors encountered. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.MTLSAuthenticationAPI.GetKeyStoreCertificateDetails(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `MTLSAuthenticationAPI.GetKeyStoreCertificateDetails``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetKeyStoreCertificateDetails`: GetKeyStoreCertificateDetailsResponse fmt.Fprintf(os.Stdout, "Response from `MTLSAuthenticationAPI.GetKeyStoreCertificateDetails`: %v\n", resp) } ``` -------------------------------- ### Install Terraform on Windows Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/README.md This snippet shows how to install Terraform on Windows using Chocolatey. Ensure you have Chocolatey installed first. ```powershell choco install terraform ``` -------------------------------- ### Retrieve connections using Go Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/ConnectionsAPI.md Demonstrates initializing the API client and executing a GetConnections request. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { getConnectionsRequest := *openapiclient.NewGetConnectionsRequest() // GetConnectionsRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ConnectionsAPI.GetConnections(context.Background()).GetConnectionsRequest(getConnectionsRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConnectionsAPI.GetConnections``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetConnections`: GetConnectionsResponse fmt.Fprintf(os.Stdout, "Response from `ConnectionsAPI.GetConnections`: %v\n", resp) } ``` -------------------------------- ### Install Terraform on macOS Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/README.md This snippet shows how to install Terraform on macOS using Homebrew. Ensure you have Homebrew installed first. ```bash brew tap hashicorp/tap brew install hashicorp/tap/terraform ``` -------------------------------- ### Get SERVER_TYPE Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/UNIXConnector.md Retrieves the SERVER_TYPE. Use this to get the current value or check if it has been set. ```go func (o *UNIXConnector) GetSERVER_TYPEOk() (*string, bool) ``` -------------------------------- ### Initialize SFTPConnector Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/SFTPConnector.md Constructors for creating a new SFTPConnector instance. ```go func NewSFTPConnector(hOSTNAME string, pORTNUMBER string, uSERNAME string, aUTHCREDENTIALTYPE string, aUTHCREDENTIALVALUE string, ) *SFTPConnector ``` ```go func NewSFTPConnectorWithDefaults() *SFTPConnector ``` -------------------------------- ### GET /ECM/api/v5/getEcmVersion - GetEcmVersion Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/utility/docs/UtilityAPI.md This API call can be used for getting the ecm version. It does not require any parameters. ```APIDOC ## GET /ECM/api/v5/getEcmVersion ### Description This API call can be used for getting the ecm version. ### Method GET ### Endpoint /ECM/api/v5/getEcmVersion ### Parameters This endpoint does not require any parameters. ### Response #### Success Response (200) - **GetEcmVersionResponse** (object) - Contains the ECM version information. #### Response Example ```json { "version": "string" } ``` ``` -------------------------------- ### Instantiate UploadKeyStoreResponse Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/mtlsauthentication/docs/UploadKeyStoreResponse.md Constructors for creating a new UploadKeyStoreResponse instance. ```go func NewUploadKeyStoreResponse() *UploadKeyStoreResponse ``` ```go func NewUploadKeyStoreResponseWithDefaults() *UploadKeyStoreResponse ``` -------------------------------- ### Instantiate WSRetryJob Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/job_control/docs/WSRetryJob.md Constructors for creating a new WSRetryJob instance. ```go func NewWSRetryJob() *WSRetryJob ``` ```go func NewWSRetryJobWithDefaults() *WSRetryJob ``` -------------------------------- ### CustomProperty7 Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlements/docs/GetEntitlementResponseEntitlementdetailsInner.md Functions to get, get with ok check, set, and check existence for CustomProperty7. ```APIDOC ## GetCustomProperty7 ### Description Retrieves the value of the CustomProperty7 field. Returns the zero value if the field is nil. ### Method `GetCustomProperty7()` ### Parameters None ### Response - **string** - The value of CustomProperty7 or its zero value. ## GetCustomProperty7Ok ### Description Retrieves the value of the CustomProperty7 field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method `GetCustomProperty7Ok()` ### Parameters None ### Response - **(*string, bool)** - A tuple containing a pointer to the CustomProperty7 string value and a boolean indicating if the value was set. ## SetCustomProperty7 ### Description Sets the value of the CustomProperty7 field. ### Method `SetCustomProperty7(v string)` ### Parameters - **v** (string) - Required - The value to set for CustomProperty7. ### Response None ## HasCustomProperty7 ### Description Checks if the CustomProperty7 field has been set. ### Method `HasCustomProperty7()` ### Parameters None ### Response - **bool** - True if CustomProperty7 has been set, false otherwise. ``` -------------------------------- ### CustomProperty6 Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlements/docs/GetEntitlementResponseEntitlementdetailsInner.md Functions to get, get with ok check, set, and check existence for CustomProperty6. ```APIDOC ## GetCustomProperty6 ### Description Retrieves the value of the CustomProperty6 field. Returns the zero value if the field is nil. ### Method `GetCustomProperty6()` ### Parameters None ### Response - **string** - The value of CustomProperty6 or its zero value. ## GetCustomProperty6Ok ### Description Retrieves the value of the CustomProperty6 field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method `GetCustomProperty6Ok()` ### Parameters None ### Response - **(*string, bool)** - A tuple containing a pointer to the CustomProperty6 string value and a boolean indicating if the value was set. ## SetCustomProperty6 ### Description Sets the value of the CustomProperty6 field. ### Method `SetCustomProperty6(v string)` ### Parameters - **v** (string) - Required - The value to set for CustomProperty6. ### Response None ## HasCustomProperty6 ### Description Checks if the CustomProperty6 field has been set. ### Method `HasCustomProperty6()` ### Parameters None ### Response - **bool** - True if CustomProperty6 has been set, false otherwise. ``` -------------------------------- ### Instantiate GetSecuritySystems200ResponseSecuritySystemDetailsInner Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/securitysystems/docs/GetSecuritySystems200ResponseSecuritySystemDetailsInner.md Constructors for creating a new instance of the security system details object. ```go func NewGetSecuritySystems200ResponseSecuritySystemDetailsInner() *GetSecuritySystems200ResponseSecuritySystemDetailsInner ``` ```go func NewGetSecuritySystems200ResponseSecuritySystemDetailsInnerWithDefaults() *GetSecuritySystems200ResponseSecuritySystemDetailsInner ``` -------------------------------- ### CustomProperty5 Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlements/docs/GetEntitlementResponseEntitlementdetailsInner.md Functions to get, get with ok check, set, and check existence for CustomProperty5. ```APIDOC ## GetCustomProperty5 ### Description Retrieves the value of the CustomProperty5 field. Returns the zero value if the field is nil. ### Method `GetCustomProperty5()` ### Parameters None ### Response - **string** - The value of CustomProperty5 or its zero value. ## GetCustomProperty5Ok ### Description Retrieves the value of the CustomProperty5 field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method `GetCustomProperty5Ok()` ### Parameters None ### Response - **(*string, bool)** - A tuple containing a pointer to the CustomProperty5 string value and a boolean indicating if the value was set. ## SetCustomProperty5 ### Description Sets the value of the CustomProperty5 field. ### Method `SetCustomProperty5(v string)` ### Parameters - **v** (string) - Required - The value to set for CustomProperty5. ### Response None ## HasCustomProperty5 ### Description Checks if the CustomProperty5 field has been set. ### Method `HasCustomProperty5()` ### Parameters None ### Response - **bool** - True if CustomProperty5 has been set, false otherwise. ``` -------------------------------- ### CustomProperty4 Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlements/docs/GetEntitlementResponseEntitlementdetailsInner.md Functions to get, get with ok check, set, and check existence for CustomProperty4. ```APIDOC ## GetCustomProperty4 ### Description Retrieves the value of the CustomProperty4 field. Returns the zero value if the field is nil. ### Method `GetCustomProperty4()` ### Parameters None ### Response - **string** - The value of CustomProperty4 or its zero value. ## GetCustomProperty4Ok ### Description Retrieves the value of the CustomProperty4 field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method `GetCustomProperty4Ok()` ### Parameters None ### Response - **(*string, bool)** - A tuple containing a pointer to the CustomProperty4 string value and a boolean indicating if the value was set. ## SetCustomProperty4 ### Description Sets the value of the CustomProperty4 field. ### Method `SetCustomProperty4(v string)` ### Parameters - **v** (string) - Required - The value to set for CustomProperty4. ### Response None ## HasCustomProperty4 ### Description Checks if the CustomProperty4 field has been set. ### Method `HasCustomProperty4()` ### Parameters None ### Response - **bool** - True if CustomProperty4 has been set, false otherwise. ``` -------------------------------- ### Run a Job Trigger in Go Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/job_control/docs/JobControlAPI.md Demonstrates how to initialize the API client and execute a job trigger request using the JobControlAPI. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { runJobTriggerRequest := *openapiclient.NewRunJobTriggerRequest("DataImportJob", "DataImportTrigger", "DataImportGroup") // RunJobTriggerRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.JobControlAPI.RunJobTrigger(context.Background()).RunJobTriggerRequest(runJobTriggerRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `JobControlAPI.RunJobTrigger``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `RunJobTrigger`: RunJobTriggerResponse fmt.Fprintf(os.Stdout, "Response from `JobControlAPI.RunJobTrigger`: %v\n", resp) } ``` -------------------------------- ### Instantiate CreateRoleOwnerPayload Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/CreateRoleOwnerPayload.md Constructors for creating a new CreateRoleOwnerPayload instance with or without default values. ```go func NewCreateRoleOwnerPayload() *CreateRoleOwnerPayload ``` ```go func NewCreateRoleOwnerPayloadWithDefaults() *CreateRoleOwnerPayload ``` -------------------------------- ### CustomProperty3 Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlements/docs/GetEntitlementResponseEntitlementdetailsInner.md Functions to get, get with ok check, set, and check existence for CustomProperty3. ```APIDOC ## GetCustomProperty3 ### Description Retrieves the value of the CustomProperty3 field. Returns the zero value if the field is nil. ### Method `GetCustomProperty3()` ### Parameters None ### Response - **string** - The value of CustomProperty3 or its zero value. ## GetCustomProperty3Ok ### Description Retrieves the value of the CustomProperty3 field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method `GetCustomProperty3Ok()` ### Parameters None ### Response - **(*string, bool)** - A tuple containing a pointer to the CustomProperty3 string value and a boolean indicating if the value was set. ## SetCustomProperty3 ### Description Sets the value of the CustomProperty3 field. ### Method `SetCustomProperty3(v string)` ### Parameters - **v** (string) - Required - The value to set for CustomProperty3. ### Response None ## HasCustomProperty3 ### Description Checks if the CustomProperty3 field has been set. ### Method `HasCustomProperty3()` ### Parameters None ### Response - **bool** - True if CustomProperty3 has been set, false otherwise. ``` -------------------------------- ### Set Up Saviynt Test Credentials Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/README.md Configure the SAVNYINT_TEST_CREDENTIALS environment variable with your Saviynt instance details to run automated tests. ```bash export SAVIYNT_TEST_CREDENTIALS='{...}' ``` -------------------------------- ### CustomProperty2 Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlements/docs/GetEntitlementResponseEntitlementdetailsInner.md Functions to get, get with ok check, set, and check existence for CustomProperty2. ```APIDOC ## GetCustomProperty2 ### Description Retrieves the value of the CustomProperty2 field. Returns the zero value if the field is nil. ### Method `GetCustomProperty2()` ### Parameters None ### Response - **string** - The value of CustomProperty2 or its zero value. ## GetCustomProperty2Ok ### Description Retrieves the value of the CustomProperty2 field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method `GetCustomProperty2Ok()` ### Parameters None ### Response - **(*string, bool)** - A tuple containing a pointer to the CustomProperty2 string value and a boolean indicating if the value was set. ## SetCustomProperty2 ### Description Sets the value of the CustomProperty2 field. ### Method `SetCustomProperty2(v string)` ### Parameters - **v** (string) - Required - The value to set for CustomProperty2. ### Response None ## HasCustomProperty2 ### Description Checks if the CustomProperty2 field has been set. ### Method `HasCustomProperty2()` ### Parameters None ### Response - **bool** - True if CustomProperty2 has been set, false otherwise. ``` -------------------------------- ### Select Server Configuration using Context Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/job_control/README.md Set the server index using context.WithValue for the job_control.ContextServerIndex key to select a different server configuration. ```go ctx := context.WithValue(context.Background(), job_control.ContextServerIndex, 1) ``` -------------------------------- ### ADConnector DC_LOCATOR Configuration Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/ADConnector.md Methods for getting, getting with status, and setting the DC_LOCATOR configuration field. ```APIDOC ## ADConnector DC_LOCATOR Configuration ### Description Provides methods to manage the DC_LOCATOR configuration field. ### Methods #### GetDC_LOCATOR `func (o *ADConnector) GetDC_LOCATOR() string` Returns the DC_LOCATOR field. If the field is not set, it returns the zero value. #### GetDC_LOCATOROk `func (o *ADConnector) GetDC_LOCATOROk() (*string, bool)` Returns the DC_LOCATOR field and a boolean indicating if the field has been set. #### SetDC_LOCATOR `func (o *ADConnector) SetDC_LOCATOR(v string)` Sets the DC_LOCATOR field to the provided value. ``` -------------------------------- ### Get List of Saviynt Connections Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/ConnectionsAPI.md This Go code snippet shows how to fetch a list of all configured connections within Saviynt. Ensure the API client is properly set up before execution. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { getConnectionsRequest := *openapiclient.NewGetConnectionsRequest() configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ConnectionsAPI.GetConnections(context.Background()).GetConnectionsRequest(getConnectionsRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConnectionsAPI.GetConnections`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetConnections`: GetConnectionsResponse fmt.Fprintf(os.Stdout, "Response from `ConnectionsAPI.GetConnections`: %v\n", resp) } ``` -------------------------------- ### Get SSH Pass Through Passphrase Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/UNIXConnector.md Retrieves the SSHPassThroughPassphrase. Use this to get the current value or check if it has been set. ```go func (o *UNIXConnector) GetSSHPassThroughPassphraseOk() (*string, bool) ``` -------------------------------- ### Import Transport Package Resource Example Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/examples/resources/saviynt_import_transport_package_resource/README.md This is a simple example demonstrating the usage of the saviynt_import_transport_package_resource to import a transport package. ```terraform resource "saviynt_import_transport_package_resource" "example" { package_path = "/home/saviynt/transport/package.zip" business_justification = "Importing transport package for testing" } ``` -------------------------------- ### Review Generated Configuration Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/docs/index.md Display the contents of the generated configuration file. ```bash cat generated.tf # Move relevant parts to your organized .tf files ``` -------------------------------- ### Get Custom Property 44 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty44Ok to get the Customproperty44 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty44Ok() (*string, bool) ``` -------------------------------- ### Instantiate SFTPConnectionResponse Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/SFTPConnectionResponse.md Constructors for creating a new SFTPConnectionResponse instance, with or without default values. ```go func NewSFTPConnectionResponse() *SFTPConnectionResponse ``` ```go func NewSFTPConnectionResponseWithDefaults() *SFTPConnectionResponse ``` -------------------------------- ### Instantiate CreateSecuritySystem200Response with Defaults Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/securitysystems/docs/CreateSecuritySystem200Response.md Use NewCreateSecuritySystem200ResponseWithDefaults to create a new instance, applying only default values to defined properties. It does not guarantee that all required API properties are set. ```go func NewCreateSecuritySystem200ResponseWithDefaults() *CreateSecuritySystem200Response { NewCreateSecuritySystem200ResponseWithDefaults instantiates a new CreateSecuritySystem200Response object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set } ``` -------------------------------- ### Get Custom Property 43 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty43Ok to get the Customproperty43 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty43Ok() (*string, bool) ``` -------------------------------- ### Get Custom Property 42 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty42Ok to get the Customproperty42 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty42Ok() (*string, bool) ``` -------------------------------- ### Select Server Configuration Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/entitlementtype/README.md Select a specific server configuration by setting the `ContextServerIndex` in the context. The default is index 0. ```go ctx := context.WithValue(context.Background(), entitlementtype.ContextServerIndex, 1) ``` -------------------------------- ### Import Saviynt Go Client Package Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/savroles/README.md Import the Saviynt SAV Roles API client package into your project. Replace `GIT_USER_ID` and `GIT_REPO_ID` with your actual repository details. ```go import savroles "github.com/GIT_USER_ID/GIT_REPO_ID" ``` -------------------------------- ### Get Custom Property 41 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty41Ok to get the Customproperty41 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty41Ok() (*string, bool) ``` -------------------------------- ### Instantiate GetUserDetailsResponse Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetUserDetailsResponse.md Constructors for creating a new GetUserDetailsResponse instance with or without default values. ```go func NewGetUserDetailsResponse() *GetUserDetailsResponse ``` ```go func NewGetUserDetailsResponseWithDefaults() *GetUserDetailsResponse ``` -------------------------------- ### Get Custom Property 40 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty40Ok to get the Customproperty40 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty40Ok() (*string, bool) ``` -------------------------------- ### Get Custom Property 39 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty39Ok to get the Customproperty39 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty39Ok() (*string, bool) ``` -------------------------------- ### Apply Configuration Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/docs/index.md Apply the configuration after removing the import block. ```bash # Edit main.tf to remove the import block terraform apply -var-file=prod.tfvars ``` -------------------------------- ### Get Custom Property 38 Value and Status Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetRolesRequest.md Use GetCustomproperty38Ok to get the Customproperty38 field and a boolean indicating if it was set. ```go func (o *GetRolesRequest) GetCustomproperty38Ok() (*string, bool) ``` -------------------------------- ### Select Server Configuration Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/users/README.md Use context to select a specific server index from the OpenAPI specification. ```go ctx := context.WithValue(context.Background(), users.ContextServerIndex, 1) ``` -------------------------------- ### Instantiate GetEntitlementDetailsResponse Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/roles/docs/GetEntitlementDetailsResponse.md Constructors for creating a new GetEntitlementDetailsResponse instance. ```go func NewGetEntitlementDetailsResponse() *GetEntitlementDetailsResponse ``` ```go func NewGetEntitlementDetailsResponseWithDefaults() *GetEntitlementDetailsResponse ``` -------------------------------- ### Customproperty52Label Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/endpoints/docs/CreateEndpointRequest.md APIs for managing the Customproperty52Label field, including getting its value, getting its value with a boolean check, and setting its value. ```APIDOC ## GetCustomproperty52Label ### Description GetCustomproperty52Label returns the Customproperty52Label field if non-nil, zero value otherwise. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **string**: The value of the Customproperty52Label field. #### Response Example ```json { "value": "example_label" } ``` ## GetCustomproperty52LabelOk ### Description GetCustomproperty52LabelOk returns a tuple with the Customproperty52Label field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **(*string, bool)**: A tuple containing the string value of Customproperty52Label and a boolean indicating if it was set. #### Response Example ```json { "value": "example_label", "isSet": true } ``` ## SetCustomproperty52Label ### Description SetCustomproperty52Label sets the Customproperty52Label field to the given value. ### Method POST (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters #### Request Body - **v** (string) - Required - The value to set for Customproperty52Label. ### Request Example ```json { "v": "new_label_value" } ``` ### Response #### Success Response (200) None (typically void or status) #### Response Example None ## HasCustomproperty52Label ### Description HasCustomproperty52Label returns a boolean indicating if the Customproperty52Label field has been set. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **bool**: True if the field has been set, false otherwise. #### Response Example ```json { "isSet": true } ``` ``` -------------------------------- ### Customproperty51Label Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/endpoints/docs/CreateEndpointRequest.md APIs for managing the Customproperty51Label field, including getting its value, getting its value with a boolean check, and setting its value. ```APIDOC ## GetCustomproperty51Label ### Description GetCustomproperty51Label returns the Customproperty51Label field if non-nil, zero value otherwise. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **string**: The value of the Customproperty51Label field. #### Response Example ```json { "value": "example_label" } ``` ## GetCustomproperty51LabelOk ### Description GetCustomproperty51LabelOk returns a tuple with the Customproperty51Label field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **(*string, bool)**: A tuple containing the string value of Customproperty51Label and a boolean indicating if it was set. #### Response Example ```json { "value": "example_label", "isSet": true } ``` ## SetCustomproperty51Label ### Description SetCustomproperty51Label sets the Customproperty51Label field to the given value. ### Method POST (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters #### Request Body - **v** (string) - Required - The value to set for Customproperty51Label. ### Request Example ```json { "v": "new_label_value" } ``` ### Response #### Success Response (200) None (typically void or status) #### Response Example None ## HasCustomproperty51Label ### Description HasCustomproperty51Label returns a boolean indicating if the Customproperty51Label field has been set. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **bool**: True if the field has been set, false otherwise. #### Response Example ```json { "isSet": true } ``` ``` -------------------------------- ### Configure Templated Server URL Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/README.md Use context to provide variables for templated server URLs. ```go ctx := context.WithValue(context.Background(), connections.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` -------------------------------- ### Create Saviynt Connection Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/connections/docs/ConnectionsAPI.md Use this Go code to create or update a connection in Saviynt. Ensure the necessary client and configuration are initialized. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { createOrUpdateRequest := openapiclient.createOrUpdate_request{ADConnector: openapiclient.NewADConnector("PASSWORD_example", "Active Directory_Doc", "AD")} configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ConnectionsAPI.CreateOrUpdate(context.Background()).CreateOrUpdateRequest(createOrUpdateRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConnectionsAPI.CreateOrUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateOrUpdate`: CreateOrUpdateResponse fmt.Fprintf(os.Stdout, "Response from `ConnectionsAPI.CreateOrUpdate`: %v\n", resp) } ``` -------------------------------- ### Customproperty50Label Management Source: https://github.com/saviynt/terraform-provider-saviynt/blob/main/saviynt-api-go-client/endpoints/docs/CreateEndpointRequest.md APIs for managing the Customproperty50Label field, including getting its value, getting its value with a boolean check, and setting its value. ```APIDOC ## GetCustomproperty50Label ### Description GetCustomproperty50Label returns the Customproperty50Label field if non-nil, zero value otherwise. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **string**: The value of the Customproperty50Label field. #### Response Example ```json { "value": "example_label" } ``` ## GetCustomproperty50LabelOk ### Description GetCustomproperty50LabelOk returns a tuple with the Customproperty50Label field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **(*string, bool)**: A tuple containing the string value of Customproperty50Label and a boolean indicating if it was set. #### Response Example ```json { "value": "example_label", "isSet": true } ``` ## SetCustomproperty50Label ### Description SetCustomproperty50Label sets the Customproperty50Label field to the given value. ### Method POST (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters #### Request Body - **v** (string) - Required - The value to set for Customproperty50Label. ### Request Example ```json { "v": "new_label_value" } ``` ### Response #### Success Response (200) None (typically void or status) #### Response Example None ## HasCustomproperty50Label ### Description HasCustomproperty50Label returns a boolean indicating if the Customproperty50Label field has been set. ### Method GET (Conceptual) ### Endpoint N/A (Method on a struct) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **bool**: True if the field has been set, false otherwise. #### Response Example ```json { "isSet": true } ``` ```