Class Directive
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.Directive
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:49.485Z")
@Stability(Experimental)
public class Directive
extends software.amazon.jsii.JsiiObject
(experimental) Directives for types.
i.e. @aws_iam or @aws_subscribe
Example:
GraphqlApi api; InterfaceType film; api.addSubscription("addedFilm", Field.Builder.create() .returnType(film.attribute()) .args(Map.of("id", GraphqlType.id(BaseTypeOptions.builder().isRequired(true).build()))) .directives(List.of(Directive.subscribe("addFilm"))) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Directive
apiKey()
(experimental) Add the @aws_api_key directive.static Directive
(experimental) Add the @aws_auth or @aws_cognito_user_pools directive.static Directive
(experimental) Add a custom directive.getMode()
(experimental) The authorization type of this directive.protected List<AuthorizationType>
getModes()
(experimental) the authorization modes for this intermediate type.(experimental) Mutation fields for a subscription directive.static Directive
iam()
(experimental) Add the @aws_iam directive.static Directive
oidc()
(experimental) Add the @aws_oidc directive.protected void
setModes
(List<AuthorizationType> value) (experimental) the authorization modes for this intermediate type.static Directive
(experimental) Add the @aws_subscribe directive.toString()
(experimental) Generate the directive statement.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, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Directive
protected Directive(software.amazon.jsii.JsiiObjectRef objRef) -
Directive
protected Directive(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
apiKey
(experimental) Add the @aws_api_key directive. -
cognito
@Stability(Experimental) @NotNull public static Directive cognito(@NotNull @NotNull String... groups) (experimental) Add the @aws_auth or @aws_cognito_user_pools directive.- Parameters:
groups
- the groups to allow access to. This parameter is required.
-
custom
(experimental) Add a custom directive.- Parameters:
statement
-- the directive statement to append.
-
iam
(experimental) Add the @aws_iam directive. -
oidc
(experimental) Add the @aws_oidc directive. -
subscribe
@Stability(Experimental) @NotNull public static Directive subscribe(@NotNull @NotNull String... mutations) (experimental) Add the @aws_subscribe directive.Only use for top level Subscription type.
- Parameters:
mutations
- the mutation fields to link to. This parameter is required.
-
toString
(experimental) Generate the directive statement. -
getMode
(experimental) The authorization type of this directive.Default: - not an authorization directive
-
getMutationFields
(experimental) Mutation fields for a subscription directive.Default: - not a subscription directive
-
getModes
(experimental) the authorization modes for this intermediate type. -
setModes
(experimental) the authorization modes for this intermediate type.
-