@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:42.809Z") @Stability(value=Experimental) public class Directive extends software.amazon.jsii.JsiiObject
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());
| Modifier | Constructor and Description |
|---|---|
protected |
Directive(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Directive(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static Directive |
apiKey()
(experimental) Add the @aws_api_key directive.
|
static Directive |
cognito(String... groups)
(experimental) Add the @aws_auth or @aws_cognito_user_pools directive.
|
static Directive |
custom(String statement)
(experimental) Add a custom directive.
|
AuthorizationType |
getMode()
(experimental) The authorization type of this directive.
|
protected List<AuthorizationType> |
getModes()
(experimental) the authorization modes for this intermediate type.
|
List<String> |
getMutationFields()
(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 |
subscribe(String... mutations)
(experimental) Add the @aws_subscribe directive.
|
String |
toString()
(experimental) Generate the directive statement.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Directive(software.amazon.jsii.JsiiObjectRef objRef)
protected Directive(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) @NotNull public static Directive apiKey()
@Stability(value=Experimental) @NotNull public static Directive cognito(@NotNull String... groups)
groups - the groups to allow access to. This parameter is required.@Stability(value=Experimental) @NotNull public static Directive custom(@NotNull String statement)
statement - - the directive statement to append. This parameter is required.@Stability(value=Experimental) @NotNull public static Directive iam()
@Stability(value=Experimental) @NotNull public static Directive oidc()
@Stability(value=Experimental) @NotNull public static Directive subscribe(@NotNull String... mutations)
Only use for top level Subscription type.
mutations - the mutation fields to link to. This parameter is required.@Stability(value=Experimental) @NotNull public String toString()
@Stability(value=Experimental) @Nullable public AuthorizationType getMode()
Default: - not an authorization directive
@Stability(value=Experimental) @Nullable public List<String> getMutationFields()
Default: - not a subscription directive
@Stability(value=Experimental) @Nullable protected List<AuthorizationType> getModes()
@Stability(value=Experimental)
protected void setModes(@Nullable
List<AuthorizationType> value)
Copyright © 2022. All rights reserved.