ApiKeyArgs

data class ApiKeyArgs(val apiId: Output<String>? = null, val description: Output<String>? = null, val expires: Output<String>? = null) : ConvertibleToJava<ApiKeyArgs>

Provides an AppSync API Key.

Example Usage

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.ApiKey;
import com.pulumi.aws.appsync.ApiKeyArgs;
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 exampleApiKey = new ApiKey("exampleApiKey", ApiKeyArgs.builder()
.apiId(exampleGraphQLApi.id())
.expires("2018-05-03T04:00:00Z")
.build());
}
}

Import

aws_appsync_api_key can be imported using the AppSync API ID and key separated by :, e.g.,

$ pulumi import aws:appsync/apiKey:ApiKey example xxxxx:yyyyy

Constructors

Link copied to clipboard
constructor(apiId: Output<String>? = null, description: Output<String>? = null, expires: Output<String>? = null)

Properties

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

ID of the associated AppSync API

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

API key description. Defaults to "Managed by Pulumi".

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

RFC3339 string representation of the expiry date. Rounded down to nearest hour. By default, it is 7 days from the date of creation.

Functions

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