Package com.pulumi.aws.schemas
Class Schema
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.schemas.Schema
-
public class Schema extends com.pulumi.resources.CustomResourceProvides an EventBridge Schema resource. > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical. ## Example Usage
## Import Using `pulumi import`, import EventBridge schema using the `name` and `registryName`. For example: ```sh $ pulumi import aws:schemas/schema:Schema test name/registry ```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.RegistryArgs; import com.pulumi.aws.schemas.Schema; import com.pulumi.aws.schemas.SchemaArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; 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 test = new Registry("test", RegistryArgs.builder() .name("my_own_registry") .build()); var testSchema = new Schema("testSchema", SchemaArgs.builder() .name("my_schema") .registryName(test.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()); } }
-
-
Constructor Summary
Constructors Constructor Description Schema(java.lang.String name)Schema(java.lang.String name, SchemaArgs args)Schema(java.lang.String name, SchemaArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>content()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()static Schemaget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SchemaState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>lastModified()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>registryName()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.String>type()com.pulumi.core.Output<java.lang.String>version()com.pulumi.core.Output<java.lang.String>versionCreatedDate()
-
-
-
Constructor Detail
-
Schema
public Schema(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Schema
public Schema(java.lang.String name, SchemaArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Schema
public Schema(java.lang.String name, SchemaArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the discoverer.
-
content
public com.pulumi.core.Output<java.lang.String> content()
- Returns:
- The schema specification. Must be a valid Open API 3.0 spec.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- The description of the schema. Maximum of 256 characters.
-
lastModified
public com.pulumi.core.Output<java.lang.String> lastModified()
- Returns:
- The last modified date of the schema.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the schema. Maximum of 385 characters consisting of lower case letters, upper case letters, ., -, _, @.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
registryName
public com.pulumi.core.Output<java.lang.String> registryName()
- Returns:
- The name of the registry in which this schema belongs.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- The type of the schema. Valid values: `OpenApi3` or `JSONSchemaDraft4`.
-
version
public com.pulumi.core.Output<java.lang.String> version()
- Returns:
- The version of the schema.
-
versionCreatedDate
public com.pulumi.core.Output<java.lang.String> versionCreatedDate()
- Returns:
- The created date of the version of the schema.
-
get
public static Schema get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SchemaState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-