Class Authorization
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.Authorization
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-06T14:43:19.273Z")
@Stability(Stable)
public abstract class Authorization
extends software.amazon.jsii.JsiiObject
Authorization type for an API Destination Connection.
Example:
Connection connection = Connection.Builder.create(this, "Connection") .authorization(Authorization.apiKey("x-api-key", SecretValue.secretsManager("ApiSecretName"))) .description("Connection with API Key x-api-key") .build(); ApiDestination destination = ApiDestination.Builder.create(this, "Destination") .connection(connection) .endpoint("https://example.com") .description("Calling example.com with API key x-api-key") .build(); Rule rule = Rule.Builder.create(this, "Rule") .schedule(Schedule.rate(Duration.minutes(1))) .targets(List.of(new ApiDestination(destination))) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
Authorization
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Authorization
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic Authorization
apiKey
(String apiKeyName, SecretValue apiKeyValue) Use API key authorization.static Authorization
basic
(String username, SecretValue password) Use username and password authorization.static Authorization
oauth
(OAuthAuthorizationProps props) Use OAuth authorization.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Authorization
protected Authorization(software.amazon.jsii.JsiiObjectRef objRef) -
Authorization
protected Authorization(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Authorization
@Stability(Stable) protected Authorization()
-
-
Method Details
-
apiKey
@Stability(Stable) @NotNull public static Authorization apiKey(@NotNull String apiKeyName, @NotNull SecretValue apiKeyValue) Use API key authorization.API key authorization has two components: an API key name and an API key value. What these are depends on the target of your connection.
- Parameters:
apiKeyName
- This parameter is required.apiKeyValue
- This parameter is required.
-
basic
@Stability(Stable) @NotNull public static Authorization basic(@NotNull String username, @NotNull SecretValue password) Use username and password authorization.- Parameters:
username
- This parameter is required.password
- This parameter is required.
-
oauth
@Stability(Stable) @NotNull public static Authorization oauth(@NotNull OAuthAuthorizationProps props) Use OAuth authorization.- Parameters:
props
- This parameter is required.
-