Class BetaManagedAgentsExecutionIdentityParams
-
- All Implemented Interfaces:
public final class BetaManagedAgentsExecutionIdentityParamsExecution principal for runs of this agent:
service_account(the default) oraws_role.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsExecutionIdentityParams.VisitorAn interface that defines how to map each variant of BetaManagedAgentsExecutionIdentityParams to a value of type T.
public final classBetaManagedAgentsExecutionIdentityParams.Type
-
Method Summary
-
-
Method Detail
-
awsRole
final Optional<BetaManagedAgentsAwsRoleExecutionIdentityParams> awsRole()
An AWS IAM role principal.
-
serviceAccount
final Optional<BetaManagedAgentsServiceAccountExecutionIdentityParams> serviceAccount()
The Anthropic-managed service account — the default execution principal. Carries no identifier.
-
type
final BetaManagedAgentsExecutionIdentityParams.Type type()
-
isServiceAccount
final Boolean isServiceAccount()
-
asAwsRole
final BetaManagedAgentsAwsRoleExecutionIdentityParams asAwsRole()
An AWS IAM role principal.
-
asServiceAccount
final BetaManagedAgentsServiceAccountExecutionIdentityParams asServiceAccount()
The Anthropic-managed service account — the default execution principal. Carries no identifier.
-
accept
final <T extends Any> T accept(BetaManagedAgentsExecutionIdentityParams.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 = betaManagedAgentsExecutionIdentityParams.accept(new BetaManagedAgentsExecutionIdentityParams.Visitor<Optional<String>>() { @Override public Optional<String> visitAwsRole(BetaManagedAgentsAwsRoleExecutionIdentityParams awsRole) { return Optional.of(awsRole.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsExecutionIdentityParams 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.
-
ofAwsRole
final static BetaManagedAgentsExecutionIdentityParams ofAwsRole(BetaManagedAgentsAwsRoleExecutionIdentityParams awsRole)
An AWS IAM role principal.
-
ofAwsRole
final static BetaManagedAgentsExecutionIdentityParams ofAwsRole(String roleArn)
Returns an immutable instance of BetaManagedAgentsExecutionIdentityParams whose ofAwsRole variant is built from the given required roleArn.
-
ofServiceAccount
final static BetaManagedAgentsExecutionIdentityParams ofServiceAccount(BetaManagedAgentsServiceAccountExecutionIdentityParams serviceAccount)
The Anthropic-managed service account — the default execution principal. Carries no identifier.
-
-
-
-