software.amazon.awscdk.services.appsync.GraphqlApi Maven / Gradle / Ivy
package software.amazon.awscdk.services.appsync;
/**
* (experimental) An AppSync GraphQL API.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-16T15:05:17.385Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.appsync.$Module.class, fqn = "@aws-cdk/aws-appsync.GraphqlApi")
public class GraphqlApi extends software.amazon.awscdk.services.appsync.GraphqlApiBase {
protected GraphqlApi(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected GraphqlApi(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public GraphqlApi(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.GraphqlApiProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) Import a GraphQL API through this function.
*
* @param scope scope. This parameter is required.
* @param id id. This parameter is required.
* @param attrs GraphQL API Attributes of an API. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.IGraphqlApi fromGraphqlApiAttributes(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.GraphqlApiAttributes attrs) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.appsync.GraphqlApi.class, "fromGraphqlApiAttributes", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appsync.IGraphqlApi.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(attrs, "attrs is required") });
}
/**
* (experimental) Add a mutation field to the schema's Mutation. CDK will create an Object Type called 'Mutation'. For example,.
*
* type Mutation {
* fieldName: Field.returnType
* }
*
* @param fieldName the name of the Mutation. This parameter is required.
* @param field the resolvable field to for this Mutation. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.ObjectType addMutation(final @org.jetbrains.annotations.NotNull java.lang.String fieldName, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.ResolvableField field) {
return software.amazon.jsii.Kernel.call(this, "addMutation", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appsync.ObjectType.class), new Object[] { java.util.Objects.requireNonNull(fieldName, "fieldName is required"), java.util.Objects.requireNonNull(field, "field is required") });
}
/**
* (experimental) Add a query field to the schema's Query. CDK will create an Object Type called 'Query'. For example,.
*
* type Query {
* fieldName: Field.returnType
* }
*
* @param fieldName the name of the query. This parameter is required.
* @param field the resolvable field to for this query. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.ObjectType addQuery(final @org.jetbrains.annotations.NotNull java.lang.String fieldName, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.ResolvableField field) {
return software.amazon.jsii.Kernel.call(this, "addQuery", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appsync.ObjectType.class), new Object[] { java.util.Objects.requireNonNull(fieldName, "fieldName is required"), java.util.Objects.requireNonNull(field, "field is required") });
}
/**
* (experimental) Add schema dependency to a given construct.
*
* @param construct the dependee. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.lang.Boolean addSchemaDependency(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.CfnResource construct) {
return software.amazon.jsii.Kernel.call(this, "addSchemaDependency", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(construct, "construct is required") });
}
/**
* (experimental) Add a subscription field to the schema's Subscription. CDK will create an Object Type called 'Subscription'. For example,.
*
* type Subscription {
* fieldName: Field.returnType
* }
*
* @param fieldName the name of the Subscription. This parameter is required.
* @param field the resolvable field to for this Subscription. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.ObjectType addSubscription(final @org.jetbrains.annotations.NotNull java.lang.String fieldName, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.ResolvableField field) {
return software.amazon.jsii.Kernel.call(this, "addSubscription", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appsync.ObjectType.class), new Object[] { java.util.Objects.requireNonNull(fieldName, "fieldName is required"), java.util.Objects.requireNonNull(field, "field is required") });
}
/**
* (experimental) Escape hatch to append to Schema as desired.
*
* Will always result
* in a newline.
*
* Default: - ''
*
* @param addition the addition to add to schema. This parameter is required.
* @param delimiter the delimiter between schema and addition.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addToSchema(final @org.jetbrains.annotations.NotNull java.lang.String addition, final @org.jetbrains.annotations.Nullable java.lang.String delimiter) {
software.amazon.jsii.Kernel.call(this, "addToSchema", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(addition, "addition is required"), delimiter });
}
/**
* (experimental) Escape hatch to append to Schema as desired.
*
* Will always result
* in a newline.
*
* Default: - ''
*
* @param addition the addition to add to schema. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addToSchema(final @org.jetbrains.annotations.NotNull java.lang.String addition) {
software.amazon.jsii.Kernel.call(this, "addToSchema", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(addition, "addition is required") });
}
/**
* (experimental) Add type to the schema.
*
* @param type the intermediate type to add to the schema. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.IIntermediateType addType(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.IIntermediateType type) {
return software.amazon.jsii.Kernel.call(this, "addType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appsync.IIntermediateType.class), new Object[] { java.util.Objects.requireNonNull(type, "type is required") });
}
/**
* (experimental) Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.
*
* @param grantee The principal. This parameter is required.
* @param resources The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...). This parameter is required.
* @param actions The actions that should be granted to the principal (i.e. appsync:graphql ). This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.Grant grant(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable grantee, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appsync.IamResource resources, final @org.jetbrains.annotations.NotNull java.lang.String... actions) {
return software.amazon.jsii.Kernel.call(this, "grant", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Grant.class), java.util.stream.Stream.concat(java.util.Arrays.