aws.appsync.ApiCache
Explore with Pulumi AI
Provides an AppSync API Cache.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleGraphQLApi = new Aws.AppSync.GraphQLApi("exampleGraphQLApi", new()
{
AuthenticationType = "API_KEY",
});
var exampleApiCache = new Aws.AppSync.ApiCache("exampleApiCache", new()
{
ApiId = exampleGraphQLApi.Id,
ApiCachingBehavior = "FULL_REQUEST_CACHING",
Type = "LARGE",
Ttl = 900,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/appsync"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleGraphQLApi, err := appsync.NewGraphQLApi(ctx, "exampleGraphQLApi", &appsync.GraphQLApiArgs{
AuthenticationType: pulumi.String("API_KEY"),
})
if err != nil {
return err
}
_, err = appsync.NewApiCache(ctx, "exampleApiCache", &appsync.ApiCacheArgs{
ApiId: exampleGraphQLApi.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 exampleGraphQLApi = new GraphQLApi("exampleGraphQLApi", GraphQLApiArgs.builder()
.authenticationType("API_KEY")
.build());
var exampleApiCache = new ApiCache("exampleApiCache", ApiCacheArgs.builder()
.apiId(exampleGraphQLApi.id())
.apiCachingBehavior("FULL_REQUEST_CACHING")
.type("LARGE")
.ttl(900)
.build());
}
}
import pulumi
import pulumi_aws as aws
example_graph_ql_api = aws.appsync.GraphQLApi("exampleGraphQLApi", authentication_type="API_KEY")
example_api_cache = aws.appsync.ApiCache("exampleApiCache",
api_id=example_graph_ql_api.id,
api_caching_behavior="FULL_REQUEST_CACHING",
type="LARGE",
ttl=900)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleGraphQLApi = new aws.appsync.GraphQLApi("exampleGraphQLApi", {authenticationType: "API_KEY"});
const exampleApiCache = new aws.appsync.ApiCache("exampleApiCache", {
apiId: exampleGraphQLApi.id,
apiCachingBehavior: "FULL_REQUEST_CACHING",
type: "LARGE",
ttl: 900,
});
resources:
exampleGraphQLApi:
type: aws:appsync:GraphQLApi
properties:
authenticationType: API_KEY
exampleApiCache:
type: aws:appsync:ApiCache
properties:
apiId: ${exampleGraphQLApi.id}
apiCachingBehavior: FULL_REQUEST_CACHING
type: LARGE
ttl: 900
Create ApiCache Resource
new ApiCache(name: string, args: ApiCacheArgs, opts?: CustomResourceOptions);
@overload
def ApiCache(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_caching_behavior: Optional[str] = None,
api_id: Optional[str] = None,
at_rest_encryption_enabled: Optional[bool] = None,
transit_encryption_enabled: Optional[bool] = None,
ttl: Optional[int] = None,
type: Optional[str] = None)
@overload
def ApiCache(resource_name: str,
args: ApiCacheArgs,
opts: Optional[ResourceOptions] = None)
func NewApiCache(ctx *Context, name string, args ApiCacheArgs, opts ...ResourceOption) (*ApiCache, error)
public ApiCache(string name, ApiCacheArgs args, CustomResourceOptions? opts = null)
public ApiCache(String name, ApiCacheArgs args)
public ApiCache(String name, ApiCacheArgs args, CustomResourceOptions options)
type: aws:appsync:ApiCache
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiCacheArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApiCache Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApiCache resource accepts the following input properties:
- Api
Caching stringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- Api
Id string GraphQL API ID.
- Ttl int
TTL in seconds for cache entries.
- Type string
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
.- At
Rest boolEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- Transit
Encryption boolEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- Api
Caching stringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- Api
Id string GraphQL API ID.
- Ttl int
TTL in seconds for cache entries.
- Type string
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
.- At
Rest boolEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- Transit
Encryption boolEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api
Caching StringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api
Id String GraphQL API ID.
- ttl Integer
TTL in seconds for cache entries.
- type String
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
.- at
Rest BooleanEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit
Encryption BooleanEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api
Caching stringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api
Id string GraphQL API ID.
- ttl number
TTL in seconds for cache entries.
- type string
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
.- at
Rest booleanEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit
Encryption booleanEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api_
caching_ strbehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api_
id str GraphQL API ID.
- ttl int
TTL in seconds for cache entries.
- type str
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
.- at_
rest_ boolencryption_ enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit_
encryption_ boolenabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- api
Caching StringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api
Id String GraphQL API ID.
- ttl Number
TTL in seconds for cache entries.
- type String
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
.- at
Rest BooleanEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit
Encryption BooleanEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiCache resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ApiCache Resource
Get an existing ApiCache resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiCacheState, opts?: CustomResourceOptions): ApiCache
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_caching_behavior: Optional[str] = None,
api_id: Optional[str] = None,
at_rest_encryption_enabled: Optional[bool] = None,
transit_encryption_enabled: Optional[bool] = None,
ttl: Optional[int] = None,
type: Optional[str] = None) -> ApiCache
func GetApiCache(ctx *Context, name string, id IDInput, state *ApiCacheState, opts ...ResourceOption) (*ApiCache, error)
public static ApiCache Get(string name, Input<string> id, ApiCacheState? state, CustomResourceOptions? opts = null)
public static ApiCache get(String name, Output<String> id, ApiCacheState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Caching stringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- Api
Id string GraphQL API ID.
- At
Rest boolEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- Transit
Encryption boolEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- Ttl int
TTL in seconds for cache entries.
- Type string
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
.
- Api
Caching stringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- Api
Id string GraphQL API ID.
- At
Rest boolEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- Transit
Encryption boolEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- Ttl int
TTL in seconds for cache entries.
- Type string
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
.
- api
Caching StringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api
Id String GraphQL API ID.
- at
Rest BooleanEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit
Encryption BooleanEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- ttl Integer
TTL in seconds for cache entries.
- type String
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
.
- api
Caching stringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api
Id string GraphQL API ID.
- at
Rest booleanEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit
Encryption booleanEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- ttl number
TTL in seconds for cache entries.
- type string
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
.
- api_
caching_ strbehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api_
id str GraphQL API ID.
- at_
rest_ boolencryption_ enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit_
encryption_ boolenabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- ttl int
TTL in seconds for cache entries.
- type str
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
.
- api
Caching StringBehavior Caching behavior. Valid values are
FULL_REQUEST_CACHING
andPER_RESOLVER_CACHING
.- api
Id String GraphQL API ID.
- at
Rest BooleanEncryption Enabled At-rest encryption flag for cache. You cannot update this setting after creation.
- transit
Encryption BooleanEnabled Transit encryption flag when connecting to cache. You cannot update this setting after creation.
- ttl Number
TTL in seconds for cache entries.
- type String
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
.
Import
aws_appsync_api_cache
can be imported using the AppSync API ID, e.g.,
$ pulumi import aws:appsync/apiCache:ApiCache example xxxxx
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.