Class ExternalKeyCreateParams.ProviderConfig
-
- All Implemented Interfaces:
public final class ExternalKeyCreateParams.ProviderConfigKMS provider identity and auth coordinates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceExternalKeyCreateParams.ProviderConfig.VisitorAn interface that defines how to map each variant of ProviderConfig to a value of type T.
public final classExternalKeyCreateParams.ProviderConfig.Type
-
Method Summary
-
-
Method Detail
-
aws
final Optional<AwsExternalKeyConfig> aws()
-
gcp
final Optional<GcpExternalKeyConfig> gcp()
-
azure
final Optional<AzureExternalKeyConfigParam> azure()
Azure Key Vault provider configuration.
-
type
final ExternalKeyCreateParams.ProviderConfig.Type type()
-
asAws
final AwsExternalKeyConfig asAws()
-
asGcp
final GcpExternalKeyConfig asGcp()
-
asAzure
final AzureExternalKeyConfigParam asAzure()
Azure Key Vault provider configuration.
-
accept
final <T extends Any> T accept(ExternalKeyCreateParams.ProviderConfig.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = providerConfig.accept(new ProviderConfig.Visitor<Optional<String>>() { @Override public Optional<String> visitAws(AwsExternalKeyConfig aws) { return Optional.of(aws.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final ExternalKeyCreateParams.ProviderConfig validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofAws
final static ExternalKeyCreateParams.ProviderConfig ofAws(AwsExternalKeyConfig aws)
-
ofAws
final static ExternalKeyCreateParams.ProviderConfig ofAws(String kmsArn)
Returns an immutable instance of ProviderConfig whose ofAws variant is built from the given required kmsArn.
-
ofGcp
final static ExternalKeyCreateParams.ProviderConfig ofGcp(GcpExternalKeyConfig gcp)
-
ofGcp
final static ExternalKeyCreateParams.ProviderConfig ofGcp(String keyName)
Returns an immutable instance of ProviderConfig whose ofGcp variant is built from the given required keyName.
-
ofAzure
final static ExternalKeyCreateParams.ProviderConfig ofAzure(AzureExternalKeyConfigParam azure)
Azure Key Vault provider configuration.
-
-
-
-