SchemaArgs

data class SchemaArgs(val content: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val registryName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val type: Output<String>? = null) : ConvertibleToJava<SchemaArgs>

Provides an EventBridge Schema resource.

Note: EventBridge was formerly known as CloudWatch Events. The functionality is identical.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.schemas.Registry;
import com.pulumi.aws.schemas.Schema;
import com.pulumi.aws.schemas.SchemaArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 testRegistry = new Registry("testRegistry");
var testSchema = new Schema("testSchema", SchemaArgs.builder()
.registryName(testRegistry.name())
.type("OpenApi3")
.description("The schema definition for my event")
.content(serializeJson(
jsonObject(
jsonProperty("openapi", "3.0.0"),
jsonProperty("info", jsonObject(
jsonProperty("version", "1.0.0"),
jsonProperty("title", "Event")
)),
jsonProperty("paths", jsonObject(
)),
jsonProperty("components", jsonObject(
jsonProperty("schemas", jsonObject(
jsonProperty("Event", jsonObject(
jsonProperty("type", "object"),
jsonProperty("properties", jsonObject(
jsonProperty("name", jsonObject(
jsonProperty("type", "string")
))
))
))
))
))
)))
.build());
}
}

Import

EventBridge schema can be imported using the name and registry_name, e.g., console

$ pulumi import aws:schemas/schema:Schema test name/registry

Constructors

Link copied to clipboard
constructor(content: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, registryName: Output<String>? = null, tags: Output<Map<String, String>>? = null, type: Output<String>? = null)

Properties

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

The schema specification. Must be a valid Open API 3.0 spec.

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

The description of the schema. Maximum of 256 characters.

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

The name of the schema. Maximum of 385 characters consisting of lower case letters, upper case letters, ., -, _, @.

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

The name of the registry in which this schema belongs.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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

The type of the schema. Valid values: OpenApi3.

Functions

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