1. Packages
  2. Google Cloud Native
  3. API Docs
  4. pubsub
  5. pubsub/v1
  6. Schema

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.pubsub/v1.Schema

Explore with Pulumi AI

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

    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
    SchemaId 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.GoogleNative.Pubsub.V1.SchemaType
    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
    SchemaId 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 SchemaType
    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
    schemaId 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 SchemaType
    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
    schemaId 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 SchemaType
    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 SchemaType
    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
    schemaId 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.
    RevisionCreateTime string
    The timestamp that the revision was created.
    RevisionId string
    Immutable. The revision ID of the schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    RevisionCreateTime string
    The timestamp that the revision was created.
    RevisionId string
    Immutable. The revision ID of the schema.
    id String
    The provider-assigned unique ID for this managed resource.
    revisionCreateTime String
    The timestamp that the revision was created.
    revisionId String
    Immutable. The revision ID of the schema.
    id string
    The provider-assigned unique ID for this managed resource.
    revisionCreateTime string
    The timestamp that the revision was created.
    revisionId string
    Immutable. The revision ID of the schema.
    id str
    The provider-assigned unique ID for this managed resource.
    revision_create_time str
    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.
    revisionCreateTime String
    The timestamp that the revision was created.
    revisionId String
    Immutable. The revision ID of the schema.

    Supporting Types

    SchemaType, SchemaTypeArgs

    TypeUnspecified
    TYPE_UNSPECIFIEDDefault value. This value is unused.
    ProtocolBuffer
    PROTOCOL_BUFFERA Protocol Buffer schema definition.
    Avro
    AVROAn Avro schema definition.
    SchemaTypeTypeUnspecified
    TYPE_UNSPECIFIEDDefault value. This value is unused.
    SchemaTypeProtocolBuffer
    PROTOCOL_BUFFERA Protocol Buffer schema definition.
    SchemaTypeAvro
    AVROAn Avro schema definition.
    TypeUnspecified
    TYPE_UNSPECIFIEDDefault value. This value is unused.
    ProtocolBuffer
    PROTOCOL_BUFFERA Protocol Buffer schema definition.
    Avro
    AVROAn Avro schema definition.
    TypeUnspecified
    TYPE_UNSPECIFIEDDefault value. This value is unused.
    ProtocolBuffer
    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-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi