(instance())
- updateAuthConfig - Update instance settings
updateProductionDomain- Update production instance domain⚠️ Deprecated- update - Update instance settings
- updateRestrictions - Update instance restrictions
- changeProductionDomain - Update production instance domain
- 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.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;
public class Application {
public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceAuthConfigRequestBody req = UpdateInstanceAuthConfigRequestBody.builder()
.build();
UpdateInstanceAuthConfigResponse res = sdk.instance().updateAuthConfig()
.request(req)
.call();
if (res.instanceSettings().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (com.clerk.backend_api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.clerk.backend_api.models.operations.UpdateInstanceAuthConfigRequestBody | ✔️ | The request object to use for the request. |
Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceAuthConfigResponse>
Error Object | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 402,422 | application/json |
models/errors/SDKError | 4xx-5xx | / |
Change the domain of a production instance.
Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.
WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;
public class Application {
public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateProductionInstanceDomainRequestBody req = UpdateProductionInstanceDomainRequestBody.builder()
.build();
UpdateProductionInstanceDomainResponse res = sdk.instance().updateProductionDomain()
.request(req)
.call();
// handle response
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (com.clerk.backend_api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.clerk.backend_api.models.operations.UpdateProductionInstanceDomainRequestBody | ✔️ | The request object to use for the request. |
Optional<? extends com.clerk.backend_api.models.operations.UpdateProductionInstanceDomainResponse>
Error Object | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 400,422 | application/json |
models/errors/SDKError | 4xx-5xx | / |
Updates the settings of an instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;
public class Application {
public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceRequestBody req = UpdateInstanceRequestBody.builder()
.build();
UpdateInstanceResponse res = sdk.instance().update()
.request(req)
.call();
// handle response
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (com.clerk.backend_api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.clerk.backend_api.models.operations.UpdateInstanceRequestBody | ✔️ | The request object to use for the request. |
Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceResponse>
Error Object | 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.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;
public class Application {
public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceRestrictionsRequestBody req = UpdateInstanceRestrictionsRequestBody.builder()
.build();
UpdateInstanceRestrictionsResponse res = sdk.instance().updateRestrictions()
.request(req)
.call();
if (res.instanceRestrictions().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (com.clerk.backend_api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsRequestBody | ✔️ | The request object to use for the request. |
Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse>
Error Object | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 402,422 | application/json |
models/errors/SDKError | 4xx-5xx | / |
Change the domain of a production instance.
Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.
WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;
public class Application {
public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
ChangeProductionInstanceDomainRequestBody req = ChangeProductionInstanceDomainRequestBody.builder()
.build();
ChangeProductionInstanceDomainResponse res = sdk.instance().changeProductionDomain()
.request(req)
.call();
// handle response
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (com.clerk.backend_api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainRequestBody | ✔️ | The request object to use for the request. |
Optional<? extends com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainResponse>
Error Object | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 400,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.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;
public class Application {
public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateInstanceOrganizationSettingsRequestBody req = UpdateInstanceOrganizationSettingsRequestBody.builder()
.build();
UpdateInstanceOrganizationSettingsResponse res = sdk.instance().updateOrganizationSettings()
.request(req)
.call();
if (res.organizationSettings().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (com.clerk.backend_api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsRequestBody | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 402,404,422 | application/json |
models/errors/SDKError | 4xx-5xx | / |