(instanceSettings())
- update - Update instance settings
- updateRestrictions - Update instance restrictions
- updateOrganizationSettings - Update instance organization settings
Updates the settings of an instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceRequestBody;
import com.clerk.backend_api.models.operations.UpdateInstanceResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceRequestBody req = UpdateInstanceRequestBody.builder()
.build();
UpdateInstanceResponse res = sdk.instanceSettings().update()
.request(req)
.call();
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
UpdateInstanceRequestBody | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 422 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Updates the restriction settings of an instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsRequestBody;
import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceRestrictionsRequestBody req = UpdateInstanceRestrictionsRequestBody.builder()
.build();
UpdateInstanceRestrictionsResponse res = sdk.instanceSettings().updateRestrictions()
.request(req)
.call();
if (res.instanceRestrictions().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
UpdateInstanceRestrictionsRequestBody | ✔️ | The request object to use for the request. |
UpdateInstanceRestrictionsResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 402, 422 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Updates the organization settings of the instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsRequestBody;
import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceOrganizationSettingsRequestBody req = UpdateInstanceOrganizationSettingsRequestBody.builder()
.build();
UpdateInstanceOrganizationSettingsResponse res = sdk.instanceSettings().updateOrganizationSettings()
.request(req)
.call();
if (res.organizationSettings().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
UpdateInstanceOrganizationSettingsRequestBody | ✔️ | The request object to use for the request. |
UpdateInstanceOrganizationSettingsResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 402, 404, 422 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |