1. Packages
  2. Google Cloud Native
  3. API Docs
  4. retail
  5. retail/v2
  6. getModel

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.retail/v2.getModel

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

    Gets a model.

    Using getModel

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getModel(args: GetModelArgs, opts?: InvokeOptions): Promise<GetModelResult>
    function getModelOutput(args: GetModelOutputArgs, opts?: InvokeOptions): Output<GetModelResult>
    def get_model(catalog_id: Optional[str] = None,
                  location: Optional[str] = None,
                  model_id: Optional[str] = None,
                  project: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetModelResult
    def get_model_output(catalog_id: Optional[pulumi.Input[str]] = None,
                  location: Optional[pulumi.Input[str]] = None,
                  model_id: Optional[pulumi.Input[str]] = None,
                  project: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetModelResult]
    func LookupModel(ctx *Context, args *LookupModelArgs, opts ...InvokeOption) (*LookupModelResult, error)
    func LookupModelOutput(ctx *Context, args *LookupModelOutputArgs, opts ...InvokeOption) LookupModelResultOutput

    > Note: This function is named LookupModel in the Go SDK.

    public static class GetModel 
    {
        public static Task<GetModelResult> InvokeAsync(GetModelArgs args, InvokeOptions? opts = null)
        public static Output<GetModelResult> Invoke(GetModelInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: google-native:retail/v2:getModel
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CatalogId string
    Location string
    ModelId string
    Project string
    CatalogId string
    Location string
    ModelId string
    Project string
    catalogId String
    location String
    modelId String
    project String
    catalogId string
    location string
    modelId string
    project string
    catalogId String
    location String
    modelId String
    project String

    getModel Result

    The following output properties are available:

    CreateTime string
    Timestamp the Recommendation Model was created at.
    DataState string
    The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
    DisplayName string
    The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
    FilteringOption string
    Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.
    LastTuneTime string
    The timestamp when the latest successful tune finished.
    ModelFeaturesConfig Pulumi.GoogleNative.Retail.V2.Outputs.GoogleCloudRetailV2ModelModelFeaturesConfigResponse
    Optional. Additional model features config.
    Name string
    The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
    OptimizationObjective string
    Optional. The optimization objective e.g. cvr. Currently supported values: ctr, cvr, revenue-per-order. If not specified, we choose default based on model type. Default depends on type of recommendation: recommended-for-you => ctr others-you-may-like => ctr frequently-bought-together => revenue_per_order This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    PeriodicTuningState string
    Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.
    ServingConfigLists List<Pulumi.GoogleNative.Retail.V2.Outputs.GoogleCloudRetailV2ModelServingConfigListResponse>
    The list of valid serving configs associated with the PageOptimizationConfig.
    ServingState string
    The serving state of the model: ACTIVE, NOT_ACTIVE.
    TrainingState string
    Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. The default value for UpdateModel method is to keep the state the same as before.
    TuningOperation string
    The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
    Type string
    The type of model e.g. home-page. Currently supported values: recommended-for-you, others-you-may-like, frequently-bought-together, page-optimization, similar-items, buy-it-again, on-sale-items, and recently-viewed(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    UpdateTime string
    Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.
    CreateTime string
    Timestamp the Recommendation Model was created at.
    DataState string
    The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
    DisplayName string
    The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
    FilteringOption string
    Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.
    LastTuneTime string
    The timestamp when the latest successful tune finished.
    ModelFeaturesConfig GoogleCloudRetailV2ModelModelFeaturesConfigResponse
    Optional. Additional model features config.
    Name string
    The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
    OptimizationObjective string
    Optional. The optimization objective e.g. cvr. Currently supported values: ctr, cvr, revenue-per-order. If not specified, we choose default based on model type. Default depends on type of recommendation: recommended-for-you => ctr others-you-may-like => ctr frequently-bought-together => revenue_per_order This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    PeriodicTuningState string
    Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.
    ServingConfigLists []GoogleCloudRetailV2ModelServingConfigListResponse
    The list of valid serving configs associated with the PageOptimizationConfig.
    ServingState string
    The serving state of the model: ACTIVE, NOT_ACTIVE.
    TrainingState string
    Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. The default value for UpdateModel method is to keep the state the same as before.
    TuningOperation string
    The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
    Type string
    The type of model e.g. home-page. Currently supported values: recommended-for-you, others-you-may-like, frequently-bought-together, page-optimization, similar-items, buy-it-again, on-sale-items, and recently-viewed(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    UpdateTime string
    Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.
    createTime String
    Timestamp the Recommendation Model was created at.
    dataState String
    The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
    displayName String
    The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
    filteringOption String
    Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.
    lastTuneTime String
    The timestamp when the latest successful tune finished.
    modelFeaturesConfig GoogleCloudRetailV2ModelModelFeaturesConfigResponse
    Optional. Additional model features config.
    name String
    The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
    optimizationObjective String
    Optional. The optimization objective e.g. cvr. Currently supported values: ctr, cvr, revenue-per-order. If not specified, we choose default based on model type. Default depends on type of recommendation: recommended-for-you => ctr others-you-may-like => ctr frequently-bought-together => revenue_per_order This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    periodicTuningState String
    Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.
    servingConfigLists List<GoogleCloudRetailV2ModelServingConfigListResponse>
    The list of valid serving configs associated with the PageOptimizationConfig.
    servingState String
    The serving state of the model: ACTIVE, NOT_ACTIVE.
    trainingState String
    Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. The default value for UpdateModel method is to keep the state the same as before.
    tuningOperation String
    The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
    type String
    The type of model e.g. home-page. Currently supported values: recommended-for-you, others-you-may-like, frequently-bought-together, page-optimization, similar-items, buy-it-again, on-sale-items, and recently-viewed(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    updateTime String
    Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.
    createTime string
    Timestamp the Recommendation Model was created at.
    dataState string
    The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
    displayName string
    The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
    filteringOption string
    Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.
    lastTuneTime string
    The timestamp when the latest successful tune finished.
    modelFeaturesConfig GoogleCloudRetailV2ModelModelFeaturesConfigResponse
    Optional. Additional model features config.
    name string
    The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
    optimizationObjective string
    Optional. The optimization objective e.g. cvr. Currently supported values: ctr, cvr, revenue-per-order. If not specified, we choose default based on model type. Default depends on type of recommendation: recommended-for-you => ctr others-you-may-like => ctr frequently-bought-together => revenue_per_order This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    periodicTuningState string
    Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.
    servingConfigLists GoogleCloudRetailV2ModelServingConfigListResponse[]
    The list of valid serving configs associated with the PageOptimizationConfig.
    servingState string
    The serving state of the model: ACTIVE, NOT_ACTIVE.
    trainingState string
    Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. The default value for UpdateModel method is to keep the state the same as before.
    tuningOperation string
    The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
    type string
    The type of model e.g. home-page. Currently supported values: recommended-for-you, others-you-may-like, frequently-bought-together, page-optimization, similar-items, buy-it-again, on-sale-items, and recently-viewed(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    updateTime string
    Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.
    create_time str
    Timestamp the Recommendation Model was created at.
    data_state str
    The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
    display_name str
    The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
    filtering_option str
    Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.
    last_tune_time str
    The timestamp when the latest successful tune finished.
    model_features_config GoogleCloudRetailV2ModelModelFeaturesConfigResponse
    Optional. Additional model features config.
    name str
    The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
    optimization_objective str
    Optional. The optimization objective e.g. cvr. Currently supported values: ctr, cvr, revenue-per-order. If not specified, we choose default based on model type. Default depends on type of recommendation: recommended-for-you => ctr others-you-may-like => ctr frequently-bought-together => revenue_per_order This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    periodic_tuning_state str
    Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.
    serving_config_lists Sequence[GoogleCloudRetailV2ModelServingConfigListResponse]
    The list of valid serving configs associated with the PageOptimizationConfig.
    serving_state str
    The serving state of the model: ACTIVE, NOT_ACTIVE.
    training_state str
    Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. The default value for UpdateModel method is to keep the state the same as before.
    tuning_operation str
    The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
    type str
    The type of model e.g. home-page. Currently supported values: recommended-for-you, others-you-may-like, frequently-bought-together, page-optimization, similar-items, buy-it-again, on-sale-items, and recently-viewed(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    update_time str
    Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.
    createTime String
    Timestamp the Recommendation Model was created at.
    dataState String
    The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
    displayName String
    The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
    filteringOption String
    Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.
    lastTuneTime String
    The timestamp when the latest successful tune finished.
    modelFeaturesConfig Property Map
    Optional. Additional model features config.
    name String
    The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
    optimizationObjective String
    Optional. The optimization objective e.g. cvr. Currently supported values: ctr, cvr, revenue-per-order. If not specified, we choose default based on model type. Default depends on type of recommendation: recommended-for-you => ctr others-you-may-like => ctr frequently-bought-together => revenue_per_order This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    periodicTuningState String
    Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.
    servingConfigLists List<Property Map>
    The list of valid serving configs associated with the PageOptimizationConfig.
    servingState String
    The serving state of the model: ACTIVE, NOT_ACTIVE.
    trainingState String
    Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. The default value for UpdateModel method is to keep the state the same as before.
    tuningOperation String
    The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
    type String
    The type of model e.g. home-page. Currently supported values: recommended-for-you, others-you-may-like, frequently-bought-together, page-optimization, similar-items, buy-it-again, on-sale-items, and recently-viewed(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = frequently-bought-together and optimization_objective = ctr), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
    updateTime String
    Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.

    Supporting Types

    GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfigResponse

    ContextProductsType string
    Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the frequently-bought-together type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.
    ContextProductsType string
    Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the frequently-bought-together type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.
    contextProductsType String
    Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the frequently-bought-together type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.
    contextProductsType string
    Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the frequently-bought-together type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.
    context_products_type str
    Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the frequently-bought-together type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.
    contextProductsType String
    Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the frequently-bought-together type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.

    GoogleCloudRetailV2ModelModelFeaturesConfigResponse

    frequentlyBoughtTogetherConfig Property Map
    Additional configs for frequently-bought-together models.

    GoogleCloudRetailV2ModelServingConfigListResponse

    ServingConfigIds List<string>
    Optional. A set of valid serving configs that may be used for PAGE_OPTIMIZATION.
    ServingConfigIds []string
    Optional. A set of valid serving configs that may be used for PAGE_OPTIMIZATION.
    servingConfigIds List<String>
    Optional. A set of valid serving configs that may be used for PAGE_OPTIMIZATION.
    servingConfigIds string[]
    Optional. A set of valid serving configs that may be used for PAGE_OPTIMIZATION.
    serving_config_ids Sequence[str]
    Optional. A set of valid serving configs that may be used for PAGE_OPTIMIZATION.
    servingConfigIds List<String>
    Optional. A set of valid serving configs that may be used for PAGE_OPTIMIZATION.

    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