Api Cache Args
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,
});
Content copied to clipboard
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)
Content copied to clipboard
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,
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Import
Using pulumi import
, import aws_appsync_api_cache
using the AppSync API ID. For example:
$ pulumi import aws:appsync/apiCache:ApiCache example xxxxx
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
Caching behavior. Valid values are FULL_REQUEST_CACHING
and PER_RESOLVER_CACHING
.
Link copied to clipboard
At-rest encryption flag for cache. You cannot update this setting after creation.
Link copied to clipboard
Transit encryption flag when connecting to cache. You cannot update this setting after creation.