Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.vision/v1.Product
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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.
Constructor 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=[{
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- Display
Name 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. - Product
Category 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.
- Product
Id 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
/
. - Product
Labels List<Pulumi.Google Native. Vision. V1. Inputs. Key Value> - 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.
- Display
Name 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. - Product
Category 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.
- Product
Id 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
/
. - Product
Labels []KeyValue Args - 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.
- display
Name 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. - product
Category 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.
- product
Id 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
/
. - product
Labels 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.
- display
Name 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. - product
Category 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.
- product
Id 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
/
. - product
Labels 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[KeyValue Args] - 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.
- display
Name 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. - product
Category 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.
- product
Id 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
/
. - product
Labels 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
KeyValueResponse, KeyValueResponseArgs
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.