ApiCacheArgs

data class ApiCacheArgs(val apiCachingBehavior: Output<String>? = null, val apiId: Output<String>? = null, val atRestEncryptionEnabled: Output<Boolean>? = null, val transitEncryptionEnabled: Output<Boolean>? = null, val ttl: Output<Int>? = null, val type: Output<String>? = null) : ConvertibleToJava<ApiCacheArgs>

Provides an AppSync API Cache.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.appsync.GraphQLApi("example", {
authenticationType: "API_KEY",
name: "example",
});
const exampleApiCache = new aws.appsync.ApiCache("example", {
apiId: example.id,
apiCachingBehavior: "FULL_REQUEST_CACHING",
type: "LARGE",
ttl: 900,
});
import pulumi
import pulumi_aws as aws
example = aws.appsync.GraphQLApi("example",
authentication_type="API_KEY",
name="example")
example_api_cache = aws.appsync.ApiCache("example",
api_id=example.id,
api_caching_behavior="FULL_REQUEST_CACHING",
type="LARGE",
ttl=900)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AppSync.GraphQLApi("example", new()
{
AuthenticationType = "API_KEY",
Name = "example",
});
var exampleApiCache = new Aws.AppSync.ApiCache("example", new()
{
ApiId = example.Id,
ApiCachingBehavior = "FULL_REQUEST_CACHING",
Type = "LARGE",
Ttl = 900,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := appsync.NewGraphQLApi(ctx, "example", &appsync.GraphQLApiArgs{
AuthenticationType: pulumi.String("API_KEY"),
Name: pulumi.String("example"),
})
if err != nil {
return err
}
_, err = appsync.NewApiCache(ctx, "example", &appsync.ApiCacheArgs{
ApiId: example.ID(),
ApiCachingBehavior: pulumi.String("FULL_REQUEST_CACHING"),
Type: pulumi.String("LARGE"),
Ttl: pulumi.Int(900),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appsync.GraphQLApi;
import com.pulumi.aws.appsync.GraphQLApiArgs;
import com.pulumi.aws.appsync.ApiCache;
import com.pulumi.aws.appsync.ApiCacheArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new GraphQLApi("example", GraphQLApiArgs.builder()
.authenticationType("API_KEY")
.name("example")
.build());
var exampleApiCache = new ApiCache("exampleApiCache", ApiCacheArgs.builder()
.apiId(example.id())
.apiCachingBehavior("FULL_REQUEST_CACHING")
.type("LARGE")
.ttl(900)
.build());
}
}
resources:
example:
type: aws:appsync:GraphQLApi
properties:
authenticationType: API_KEY
name: example
exampleApiCache:
type: aws:appsync:ApiCache
name: example
properties:
apiId: ${example.id}
apiCachingBehavior: FULL_REQUEST_CACHING
type: LARGE
ttl: 900

Import

Using pulumi import, import aws_appsync_api_cache using the AppSync API ID. For example:

$ pulumi import aws:appsync/apiCache:ApiCache example xxxxx

Constructors

Link copied to clipboard
constructor(apiCachingBehavior: Output<String>? = null, apiId: Output<String>? = null, atRestEncryptionEnabled: Output<Boolean>? = null, transitEncryptionEnabled: Output<Boolean>? = null, ttl: Output<Int>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val apiCachingBehavior: Output<String>? = null

Caching behavior. Valid values are FULL_REQUEST_CACHING and PER_RESOLVER_CACHING.

Link copied to clipboard
val apiId: Output<String>? = null

GraphQL API ID.

Link copied to clipboard
val atRestEncryptionEnabled: Output<Boolean>? = null

At-rest encryption flag for cache. You cannot update this setting after creation.

Link copied to clipboard
val transitEncryptionEnabled: Output<Boolean>? = null

Transit encryption flag when connecting to cache. You cannot update this setting after creation.

Link copied to clipboard
val ttl: Output<Int>? = null

TTL in seconds for cache entries.

Link copied to clipboard
val type: Output<String>? = null

Cache instance type. Valid values are SMALL, MEDIUM, LARGE, XLARGE, LARGE_2X, LARGE_4X, LARGE_8X, LARGE_12X, T2_SMALL, T2_MEDIUM, R4_LARGE, R4_XLARGE, R4_2XLARGE, R4_4XLARGE, R4_8XLARGE.

Functions

Link copied to clipboard
open override fun toJava(): ApiCacheArgs