1. Packages
  2. Google Cloud Native
  3. API Docs
  4. vision
  5. vision/v1
  6. Product

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.vision/v1.Product

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 and returns a new product resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is missing or invalid.

    Create Product Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Product(name: string, args?: ProductArgs, opts?: CustomResourceOptions);
    @overload
    def Product(resource_name: str,
                args: Optional[ProductArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Product(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                display_name: Optional[str] = None,
                location: Optional[str] = None,
                name: Optional[str] = None,
                product_category: Optional[str] = None,
                product_id: Optional[str] = None,
                product_labels: Optional[Sequence[KeyValueArgs]] = None,
                project: Optional[str] = None)
    func NewProduct(ctx *Context, name string, args *ProductArgs, opts ...ResourceOption) (*Product, error)
    public Product(string name, ProductArgs? args = null, CustomResourceOptions? opts = null)
    public Product(String name, ProductArgs args)
    public Product(String name, ProductArgs args, CustomResourceOptions options)
    
    type: google-native:vision/v1:Product
    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 ProductArgs
    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 ProductArgs
    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 ProductArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProductArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProductArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var exampleproductResourceResourceFromVisionv1 = new GoogleNative.Vision.V1.Product("exampleproductResourceResourceFromVisionv1", new()
    {
        Description = "string",
        DisplayName = "string",
        Location = "string",
        Name = "string",
        ProductCategory = "string",
        ProductId = "string",
        ProductLabels = new[]
        {
            new GoogleNative.Vision.V1.Inputs.KeyValueArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        Project = "string",
    });
    
    example, err := vision.NewProduct(ctx, "exampleproductResourceResourceFromVisionv1", &vision.ProductArgs{
    Description: pulumi.String("string"),
    DisplayName: pulumi.String("string"),
    Location: pulumi.String("string"),
    Name: pulumi.String("string"),
    ProductCategory: pulumi.String("string"),
    ProductId: pulumi.String("string"),
    ProductLabels: vision.KeyValueArray{
    &vision.KeyValueArgs{
    Key: pulumi.String("string"),
    Value: pulumi.String("string"),
    },
    },
    Project: pulumi.String("string"),
    })
    
    var exampleproductResourceResourceFromVisionv1 = new Product("exampleproductResourceResourceFromVisionv1", ProductArgs.builder()        
        .description("string")
        .displayName("string")
        .location("string")
        .name("string")
        .productCategory("string")
        .productId("string")
        .productLabels(KeyValueArgs.builder()
            .key("string")
            .value("string")
            .build())
        .project("string")
        .build());
    
    exampleproduct_resource_resource_from_visionv1 = google_native.vision.v1.Product("exampleproductResourceResourceFromVisionv1",
        description="string",
        display_name="string",
        location="string",
        name="string",
        product_category="string",
        product_id="string",
        product_labels=[google_native.vision.v1.KeyValueArgs(
            key="string",
            value="string",
        )],
        project="string")
    
    const exampleproductResourceResourceFromVisionv1 = new google_native.vision.v1.Product("exampleproductResourceResourceFromVisionv1", {
        description: "string",
        displayName: "string",
        location: "string",
        name: "string",
        productCategory: "string",
        productId: "string",
        productLabels: [{
            key: "string",
            value: "string",
        }],
        project: "string",
    });
    
    type: google-native:vision/v1:Product
    properties:
        description: string
        displayName: string
        location: string
        name: string
        productCategory: string
        productId: string
        productLabels:
            - key: string
              value: string
        project: string
    

    Product Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Product resource accepts the following input properties:

    Description string
    User-provided metadata to be stored with this product. Must be at most 4096 characters long.
    DisplayName string
    The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
    Location string
    Name string
    The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.
    ProductCategory string
    Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.
    ProductId string
    A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.
    ProductLabels List<Pulumi.GoogleNative.Vision.V1.Inputs.KeyValue>
    Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
    Project string
    Description string
    User-provided metadata to be stored with this product. Must be at most 4096 characters long.
    DisplayName string
    The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
    Location string
    Name string
    The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.
    ProductCategory string
    Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.
    ProductId string
    A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.
    ProductLabels []KeyValueArgs
    Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
    Project string
    description String
    User-provided metadata to be stored with this product. Must be at most 4096 characters long.
    displayName String
    The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
    location String
    name String
    The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.
    productCategory String
    Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.
    productId String
    A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.
    productLabels List<KeyValue>
    Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
    project String
    description string
    User-provided metadata to be stored with this product. Must be at most 4096 characters long.
    displayName string
    The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
    location string
    name string
    The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.
    productCategory string
    Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.
    productId string
    A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.
    productLabels KeyValue[]
    Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
    project string
    description str
    User-provided metadata to be stored with this product. Must be at most 4096 characters long.
    display_name str
    The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
    location str
    name str
    The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.
    product_category str
    Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.
    product_id str
    A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.
    product_labels Sequence[KeyValueArgs]
    Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
    project str
    description String
    User-provided metadata to be stored with this product. Must be at most 4096 characters long.
    displayName String
    The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
    location String
    name String
    The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.
    productCategory String
    Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.
    productId String
    A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.
    productLabels List<Property Map>
    Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
    project String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Product resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    KeyValue, KeyValueArgs

    Key string
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    Value string
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    Key string
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    Value string
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key String
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value String
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key string
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value string
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key str
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value str
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key String
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value String
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.

    KeyValueResponse, KeyValueResponseArgs

    Key string
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    Value string
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    Key string
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    Value string
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key String
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value String
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key string
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value string
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key str
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value str
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    key String
    The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.
    value String
    The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.

    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