Directive¶
-
class
aws_cdk.aws_appsync.
Directive
(*args: Any, **kwargs)¶ Bases:
object
(experimental) Directives for types.
i.e. @aws_iam or @aws_subscribe
- Stability
experimental
- ExampleMetadata
infused
Example:
# api: appsync.GraphqlApi # film: appsync.InterfaceType api.add_subscription("addedFilm", appsync.Field( return_type=film.attribute(), args={"id": appsync.GraphqlType.id(is_required=True)}, directives=[appsync.Directive.subscribe("addFilm")] ))
Methods
-
to_string
()¶ (experimental) Generate the directive statement.
- Stability
experimental
- Return type
str
Attributes
-
mode
¶ (experimental) The authorization type of this directive.
- Default
not an authorization directive
- Stability
experimental
- Return type
Optional
[AuthorizationType
]
-
mutation_fields
¶ (experimental) Mutation fields for a subscription directive.
- Default
not a subscription directive
- Stability
experimental
- Return type
Optional
[List
[str
]]
Static Methods
-
classmethod
api_key
()¶ (experimental) Add the @aws_api_key directive.
- Stability
experimental
- Return type
-
classmethod
cognito
(*groups)¶ (experimental) Add the @aws_auth or @aws_cognito_user_pools directive.
- Parameters
groups (
str
) – the groups to allow access to.- Stability
experimental
- Return type
-
classmethod
custom
(statement)¶ (experimental) Add a custom directive.
- Parameters
statement (
str
) –the directive statement to append.
- Stability
experimental
- Return type
-
classmethod
iam
()¶ (experimental) Add the @aws_iam directive.
- Stability
experimental
- Return type
-
classmethod
oidc
()¶ (experimental) Add the @aws_oidc directive.
- Stability
experimental
- Return type