Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.pubsub/v1.Schema
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a schema.
Create Schema Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Schema(name: string, args?: SchemaArgs, opts?: CustomResourceOptions);
@overload
def Schema(resource_name: str,
args: Optional[SchemaArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Schema(resource_name: str,
opts: Optional[ResourceOptions] = None,
definition: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
schema_id: Optional[str] = None,
type: Optional[SchemaType] = None)
func NewSchema(ctx *Context, name string, args *SchemaArgs, opts ...ResourceOption) (*Schema, error)
public Schema(string name, SchemaArgs? args = null, CustomResourceOptions? opts = null)
public Schema(String name, SchemaArgs args)
public Schema(String name, SchemaArgs args, CustomResourceOptions options)
type: google-native:pubsub/v1:Schema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SchemaArgs
- 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 SchemaArgs
- 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 SchemaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleschemaResourceResourceFromPubsubv1 = new GoogleNative.Pubsub.V1.Schema("exampleschemaResourceResourceFromPubsubv1", new()
{
Definition = "string",
Name = "string",
Project = "string",
SchemaId = "string",
Type = GoogleNative.Pubsub.V1.SchemaType.TypeUnspecified,
});
example, err := pubsub.NewSchema(ctx, "exampleschemaResourceResourceFromPubsubv1", &pubsub.SchemaArgs{
Definition: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
SchemaId: pulumi.String("string"),
Type: pubsub.SchemaTypeTypeUnspecified,
})
var exampleschemaResourceResourceFromPubsubv1 = new Schema("exampleschemaResourceResourceFromPubsubv1", SchemaArgs.builder()
.definition("string")
.name("string")
.project("string")
.schemaId("string")
.type("TYPE_UNSPECIFIED")
.build());
exampleschema_resource_resource_from_pubsubv1 = google_native.pubsub.v1.Schema("exampleschemaResourceResourceFromPubsubv1",
definition="string",
name="string",
project="string",
schema_id="string",
type=google_native.pubsub.v1.SchemaType.TYPE_UNSPECIFIED)
const exampleschemaResourceResourceFromPubsubv1 = new google_native.pubsub.v1.Schema("exampleschemaResourceResourceFromPubsubv1", {
definition: "string",
name: "string",
project: "string",
schemaId: "string",
type: google_native.pubsub.v1.SchemaType.TypeUnspecified,
});
type: google-native:pubsub/v1:Schema
properties:
definition: string
name: string
project: string
schemaId: string
type: TYPE_UNSPECIFIED
Schema Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Schema resource accepts the following input properties:
- Definition string
- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in
type
. - Name string
- Name of the schema. Format is
projects/{project}/schemas/{schema}
. - Project string
- Schema
Id string - The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
- Type
Pulumi.
Google Native. Pubsub. V1. Schema Type - The type of the schema definition.
- Definition string
- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in
type
. - Name string
- Name of the schema. Format is
projects/{project}/schemas/{schema}
. - Project string
- Schema
Id string - The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
- Type
Schema
Type - The type of the schema definition.
- definition String
- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in
type
. - name String
- Name of the schema. Format is
projects/{project}/schemas/{schema}
. - project String
- schema
Id String - The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
- type
Schema
Type - The type of the schema definition.
- definition string
- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in
type
. - name string
- Name of the schema. Format is
projects/{project}/schemas/{schema}
. - project string
- schema
Id string - The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
- type
Schema
Type - The type of the schema definition.
- definition str
- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in
type
. - name str
- Name of the schema. Format is
projects/{project}/schemas/{schema}
. - project str
- schema_
id str - The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
- type
Schema
Type - The type of the schema definition.
- definition String
- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in
type
. - name String
- Name of the schema. Format is
projects/{project}/schemas/{schema}
. - project String
- schema
Id String - The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
- type "TYPE_UNSPECIFIED" | "PROTOCOL_BUFFER" | "AVRO"
- The type of the schema definition.
Outputs
All input properties are implicitly available as output properties. Additionally, the Schema resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Create stringTime - The timestamp that the revision was created.
- Revision
Id string - Immutable. The revision ID of the schema.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Create stringTime - The timestamp that the revision was created.
- Revision
Id string - Immutable. The revision ID of the schema.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Create StringTime - The timestamp that the revision was created.
- revision
Id String - Immutable. The revision ID of the schema.
- id string
- The provider-assigned unique ID for this managed resource.
- revision
Create stringTime - The timestamp that the revision was created.
- revision
Id string - Immutable. The revision ID of the schema.
- id str
- The provider-assigned unique ID for this managed resource.
- revision_
create_ strtime - The timestamp that the revision was created.
- revision_
id str - Immutable. The revision ID of the schema.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Create StringTime - The timestamp that the revision was created.
- revision
Id String - Immutable. The revision ID of the schema.
Supporting Types
SchemaType, SchemaTypeArgs
- Type
Unspecified - TYPE_UNSPECIFIEDDefault value. This value is unused.
- Protocol
Buffer - PROTOCOL_BUFFERA Protocol Buffer schema definition.
- Avro
- AVROAn Avro schema definition.
- Schema
Type Type Unspecified - TYPE_UNSPECIFIEDDefault value. This value is unused.
- Schema
Type Protocol Buffer - PROTOCOL_BUFFERA Protocol Buffer schema definition.
- Schema
Type Avro - AVROAn Avro schema definition.
- Type
Unspecified - TYPE_UNSPECIFIEDDefault value. This value is unused.
- Protocol
Buffer - PROTOCOL_BUFFERA Protocol Buffer schema definition.
- Avro
- AVROAn Avro schema definition.
- Type
Unspecified - TYPE_UNSPECIFIEDDefault value. This value is unused.
- Protocol
Buffer - PROTOCOL_BUFFERA Protocol Buffer schema definition.
- Avro
- AVROAn Avro schema definition.
- TYPE_UNSPECIFIED
- TYPE_UNSPECIFIEDDefault value. This value is unused.
- PROTOCOL_BUFFER
- PROTOCOL_BUFFERA Protocol Buffer schema definition.
- AVRO
- AVROAn Avro schema definition.
- "TYPE_UNSPECIFIED"
- TYPE_UNSPECIFIEDDefault value. This value is unused.
- "PROTOCOL_BUFFER"
- PROTOCOL_BUFFERA Protocol Buffer schema definition.
- "AVRO"
- AVROAn Avro schema definition.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.