All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.appsync.DynamoDbDataSource Maven / Gradle / Ivy

package software.amazon.awscdk.services.appsync;

/**
 * (experimental) An AppSync datasource backed by a DynamoDB table.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.29.0 (build 41df200)", date = "2021-05-25T18:24:52.506Z")
@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.DynamoDbDataSource")
public class DynamoDbDataSource extends software.amazon.awscdk.services.appsync.BackedDataSource {

    protected DynamoDbDataSource(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected DynamoDbDataSource(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 DynamoDbDataSource(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.DynamoDbDataSourceProps 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) A fluent builder for {@link software.amazon.awscdk.services.appsync.DynamoDbDataSource}.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        /**
         * @return a new instance of {@link Builder}.
         * @param scope This parameter is required.
         * @param id This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
            return new Builder(scope, id);
        }

        private final software.constructs.Construct scope;
        private final java.lang.String id;
        private final software.amazon.awscdk.services.appsync.DynamoDbDataSourceProps.Builder props;

        private Builder(final software.constructs.Construct scope, final java.lang.String id) {
            this.scope = scope;
            this.id = id;
            this.props = new software.amazon.awscdk.services.appsync.DynamoDbDataSourceProps.Builder();
        }

        /**
         * (experimental) The API to attach this data source to.
         * 

* @return {@code this} * @param api The API to attach this data source to. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder api(final software.amazon.awscdk.services.appsync.IGraphqlApi api) { this.props.api(api); return this; } /** * (experimental) the description of the data source. *

* Default: - None *

* @return {@code this} * @param description the description of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(final java.lang.String description) { this.props.description(description); return this; } /** * (experimental) The name of the data source. *

* Default: - id of data source *

* @return {@code this} * @param name The name of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder name(final java.lang.String name) { this.props.name(name); return this; } /** * (experimental) The IAM service role to be assumed by AppSync to interact with the data source. *

* Default: - Create a new role *

* @return {@code this} * @param serviceRole The IAM service role to be assumed by AppSync to interact with the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder serviceRole(final software.amazon.awscdk.services.iam.IRole serviceRole) { this.props.serviceRole(serviceRole); return this; } /** * (experimental) The DynamoDB table backing this data source. *

* @return {@code this} * @param table The DynamoDB table backing this data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder table(final software.amazon.awscdk.services.dynamodb.ITable table) { this.props.table(table); return this; } /** * (experimental) Specify whether this DS is read only or has read and write permissions to the DynamoDB table. *

* Default: false *

* @return {@code this} * @param readOnlyAccess Specify whether this DS is read only or has read and write permissions to the DynamoDB table. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder readOnlyAccess(final java.lang.Boolean readOnlyAccess) { this.props.readOnlyAccess(readOnlyAccess); return this; } /** * (experimental) use credentials of caller to access DynamoDB. *

* Default: false *

* @return {@code this} * @param useCallerCredentials use credentials of caller to access DynamoDB. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder useCallerCredentials(final java.lang.Boolean useCallerCredentials) { this.props.useCallerCredentials(useCallerCredentials); return this; } /** * @returns a newly built instance of {@link software.amazon.awscdk.services.appsync.DynamoDbDataSource}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.appsync.DynamoDbDataSource build() { return new software.amazon.awscdk.services.appsync.DynamoDbDataSource( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy