Class Directive
(experimental) Directives for types.
Inheritance
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public class Directive : DeputyBase
Syntax (vb)
Public Class Directive
Inherits DeputyBase
Remarks
i.e. @aws_iam or @aws_subscribe
Stability: Experimental
ExampleMetadata: infused
Examples
GraphqlApi api;
InterfaceType film;
api.AddSubscription("addedFilm", new Field(new FieldOptions {
ReturnType = film.Attribute(),
Args = new Dictionary<string, GraphqlType> { { "id", GraphqlType.Id(new BaseTypeOptions { IsRequired = true }) } },
Directives = new [] { Directive.Subscribe("addFilm") }
}));
Synopsis
Constructors
Directive(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Directive(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Mode | (experimental) The authorization type of this directive. |
Modes | (experimental) the authorization modes for this intermediate type. |
MutationFields | (experimental) Mutation fields for a subscription directive. |
Methods
ApiKey() | (experimental) Add the @aws_api_key directive. |
Cognito(String[]) | (experimental) Add the @aws_auth or @aws_cognito_user_pools directive. |
Custom(String) | (experimental) Add a custom directive. |
Iam() | (experimental) Add the @aws_iam directive. |
Oidc() | (experimental) Add the @aws_oidc directive. |
Subscribe(String[]) | (experimental) Add the @aws_subscribe directive. |
ToString() | (experimental) Generate the directive statement. |
Constructors
Directive(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Directive(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Directive(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Directive(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Mode
(experimental) The authorization type of this directive.
public virtual Nullable<AuthorizationType> Mode { get; }
Property Value
System.Nullable<AuthorizationType>
Remarks
Default: - not an authorization directive
Stability: Experimental
Modes
(experimental) the authorization modes for this intermediate type.
protected virtual AuthorizationType[] Modes { get; set; }
Property Value
Remarks
Stability: Experimental
MutationFields
(experimental) Mutation fields for a subscription directive.
public virtual string[] MutationFields { get; }
Property Value
System.String[]
Remarks
Default: - not a subscription directive
Stability: Experimental
Methods
ApiKey()
(experimental) Add the @aws_api_key directive.
public static Directive ApiKey()
Returns
Remarks
Stability: Experimental
Cognito(String[])
(experimental) Add the @aws_auth or @aws_cognito_user_pools directive.
public static Directive Cognito(params string[] groups)
Parameters
- groups System.String[]
the groups to allow access to.
Returns
Remarks
Stability: Experimental
Custom(String)
(experimental) Add a custom directive.
public static Directive Custom(string statement)
Parameters
- statement System.String
- the directive statement to append.
Returns
Remarks
Stability: Experimental
Iam()
(experimental) Add the @aws_iam directive.
public static Directive Iam()
Returns
Remarks
Stability: Experimental
Oidc()
(experimental) Add the @aws_oidc directive.
public static Directive Oidc()
Returns
Remarks
Stability: Experimental
Subscribe(String[])
(experimental) Add the @aws_subscribe directive.
public static Directive Subscribe(params string[] mutations)
Parameters
- mutations System.String[]
the mutation fields to link to.
Returns
Remarks
Only use for top level Subscription type.
Stability: Experimental
ToString()
(experimental) Generate the directive statement.
public override string ToString()
Returns
System.String
Remarks
Stability: Experimental