Schema
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());
}
}
Content copied to clipboard
Import
EventBridge schema can be imported using the name
and registry_name
, e.g., console
$ pulumi import aws:schemas/schema:Schema test name/registry
Content copied to clipboard
Properties
Link copied to clipboard
The description of the schema. Maximum of 256 characters.
Link copied to clipboard
The last modified date of the schema.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The name of the registry in which this schema belongs.
Link copied to clipboard
The created date of the version of the schema.