Skip to content

Commit

Permalink
fix pr suggestions featureonlinestore
Browse files Browse the repository at this point in the history
  • Loading branch information
kkram01 committed Dec 20, 2023
1 parent 12c4de0 commit 4cb830c
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 155 deletions.
179 changes: 75 additions & 104 deletions mmv1/products/vertexai/FeatureOnlineStore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
name: FeatureOnlineStore
base_url: projects/{{project}}/locations/{{region}}/featureOnlineStores
create_url: projects/{{project}}/locations/{{region}}/featureOnlineStores?featureOnlineStoreId={{name}}
self_link: 'projects/{{project}}/locations/{{region}}/featureOnlineStores/{{name}}'
self_link: projects/{{project}}/locations/{{region}}/featureOnlineStores/{{name}}
update_verb: :PATCH
update_mask: true
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': 'https://cloud.google.com/vertex-ai/docs'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featureOnlineStores'
api: https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featureOnlineStores
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
Expand All @@ -43,56 +43,35 @@ description: Vertex AI Feature Online Store provides a centralized repository fo
autogen_async: false
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'vertex_ai_featureonlinestore_with_bigtable'
primary_resource_id: 'featureonlinestore'
primary_resource_name: "fmt.Sprintf(\"terraform%s\",
context[\"random_suffix\"\
])"
name: vertex_ai_feature_online_store
primary_resource_id: feature_online_store
vars:
name: 'terraform2'
project: 'appeng-flex'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
name: example_feature_online_store
ignore_read_extra:
- 'force_destroy'
- force_destroy
- !ruby/object:Provider::Terraform::Examples
name: 'vertex_ai_featureonlinestore_with_beta_fields_optimized'
primary_resource_id: 'featureonlinestore'
primary_resource_name: "fmt.Sprintf(\"terraform%s\",
context[\"random_suffix\"\
])"
name: vertex_ai_featureonlinestore_with_beta_fields_optimized
primary_resource_id: featureonlinestore
vars:
name: 'terraform'
project: 'appeng-flex'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
name: example_feature_online_store_optimized
ignore_read_extra:
- 'force_destroy'
- force_destroy
min_version: beta
- !ruby/object:Provider::Terraform::Examples
name: 'vertex_ai_featureonlinestore_with_beta_fields_bigtable'
primary_resource_id: 'featureonlinestore'
primary_resource_name: "fmt.Sprintf(\"terraform%s\",
context[\"random_suffix\"\
])"
name: vertex_ai_featureonlinestore_with_beta_fields_bigtable
primary_resource_id: featureonlinestore
vars:
name: 'terraform3'
project: 'appeng-flex'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
name: example_feature_online_store_beta_bigtable
ignore_read_extra:
- 'force_destroy'
- force_destroy
min_version: beta
custom_code: !ruby/object:Provider::Terraform::CustomCode
pre_delete: templates/terraform/pre_delete/vertex_ai_force_delete.go.erb
virtual_fields:
- !ruby/object:Api::Type::Boolean
name: 'force_destroy'
name: force_destroy
description:
'If set to true, any FeatureViews and Features for this FeatureOnlineStore will also be deleted.'
If set to true, any FeatureViews and Features for this FeatureOnlineStore will also be deleted.
default_value: false
parameters:
- !ruby/object:Api::Type::String
Expand All @@ -103,123 +82,115 @@ parameters:
default_from_api: true
properties:
- !ruby/object:Api::Type::String
name: 'name'
description:
The name of the featureOnlinestore. This value may be up to 60 characters, and
name: name
description: The resource name of the Feature Online Store. This value may be up to 60 characters, and
valid characters are [a-z0-9_]. The first character cannot be a number.
immutable: true
url_param_only: true
pattern: projects/{{project}}/locations/{{region}}/featureOnlineStores/{{name}}
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
- !ruby/object:Api::Type::String
name: 'etag'
description: Used to perform consistent read-modify-write updates.
name: createTime
output: true
ignore_read: true
description: The timestamp of when the feature online store was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- !ruby/object:Api::Type::String
name: 'createTime'
name: updateTime
output: true
description: |
The timestamp of when the featurestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
description: The timestamp of when the feature online store was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- !ruby/object:Api::Type::String
name: 'updateTime'
name: etag
output: true
description: |
The timestamp of when the featurestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
ignore_read: true
description: Used to perform consistent read-modify-write updates.
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
A set of key/value label pairs to assign to this Featurestore.
name: labels
description: The labels with user-defined metadata to organize your feature online stores.
- !ruby/object:Api::Type::String
name: state
output: true
description: The state of the Feature Online Store. See the possible states in [this link](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featureOnlineStores#state).
- !ruby/object:Api::Type::NestedObject
name: 'dedicatedServingEndpoint'
name: bigtable
description: Settings for Cloud Bigtable instance that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore.
properties:
- !ruby/object:Api::Type::NestedObject
name: autoScaling
required: true
description: Autoscaling config applied to Bigtable Instance.
properties:
- !ruby/object:Api::Type::Integer
name: minNodeCount
required: true
description: The minimum number of nodes to scale down to. Must be greater than or equal to 1.
- !ruby/object:Api::Type::Integer
name: maxNodeCount
required: true
description: The maximum number of nodes to scale up to. Must be greater than or equal to minNodeCount, and less than or equal to 10 times of 'minNodeCount'.
- !ruby/object:Api::Type::Integer
name: cpuUtilizationTarget
default_from_api: true
description:
A percentage of the cluster's CPU capacity. Can be from 10% to 80%.
When a cluster's CPU utilization exceeds the target that you have set,
Bigtable immediately adds nodes to the cluster. When CPU utilization is substantially lower than the target, Bigtable removes nodes. If not set will default to 50%.
- !ruby/object:Api::Type::NestedObject
name: optimized
description:
Contains settings for the Optimized store that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore
conflicts:
- embeddingManagement
exactly_one_of:
- bigtable
- optimized
min_version: beta
properties:
[] # Meant to be an empty object with no properties - see here : https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featureOnlineStores#Optimized
# The fields below are necessary to include the "Optimized" transformation in the payload
send_empty_value: true
allow_empty_object: true

- !ruby/object:Api::Type::NestedObject
name: dedicatedServingEndpoint
description: |
The dedicated serving endpoint for this FeatureOnlineStore, which is different from common vertex service endpoint. Only need to set when you choose Optimized storage type or enable EmbeddingManagement. Will use public endpoint by default.
default_from_api: true
min_version: beta
properties:
- !ruby/object:Api::Type::String
name: 'publicEndpointDomainName'
name: publicEndpointDomainName
description: |
populated with the domain name to use for this FeatureOnlineStore
output: true
- !ruby/object:Api::Type::String
name: 'serviceAttachment'
name: serviceAttachment
description: |
name of the service attachment resource. Populated if private service connect is enabled and after FeatureViewSync is created.
output: true
- !ruby/object:Api::Type::NestedObject
name: 'privateServiceConnectConfig'
name: privateServiceConnectConfig
description: |
Private service connect config.
properties:
- !ruby/object:Api::Type::Boolean
name: 'enablePrivateServiceConnect'
name: enablePrivateServiceConnect
required: true
description: |
If set to true, customers will use private service connection to send request. Otherwise, the connection will set to public endpoint.
- !ruby/object:Api::Type::Array
name: 'projectAllowlist'
name: projectAllowlist
description: |
A list of Projects from which the forwarding rule will target the service attachment.
item_type: Api::Type::String
- !ruby/object:Api::Type::NestedObject
name: 'embeddingManagement'
name: embeddingManagement
description: |
The settings for embedding management in FeatureOnlineStore. Embedding management can only be used with BigTable.
conflicts:
- optimized
min_version: beta
properties:
- !ruby/object:Api::Type::Boolean
name: 'enabled'
name: enabled
description: |
Enable embedding management.
immutable: true
- !ruby/object:Api::Type::NestedObject
name: 'bigtable'
description: |
Contains settings for the Cloud Bigtable instance that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore.
exactly_one_of:
- bigtable
- optimized
properties:
- !ruby/object:Api::Type::NestedObject
name: 'autoScaling'
required: true
description: |
Autoscaling config applied to Bigtable Instance.
properties:
- !ruby/object:Api::Type::Integer
name: 'minNodeCount'
required: true
description: |
The minimum number of nodes to scale down to. Must be greater than or equal to 1.
- !ruby/object:Api::Type::Integer
name: 'maxNodeCount'
required: true
description: |
The maximum number of nodes to scale up to. Must be greater than minNodeCount, and less than or equal to 10 times of 'minNodeCount'.
- !ruby/object:Api::Type::Integer
name: 'cpuUtilizationTarget'
description: |
A percentage of the cluster's CPU capacity. Can be from 10% to 80%. When a cluster's CPU utilization exceeds the target that you have set, Bigtable immediately adds nodes to the cluster. When CPU utilization is substantially lower than the target, Bigtable removes nodes. If not set will default to 50%.
default_from_api: true
- !ruby/object:Api::Type::NestedObject
name: 'optimized'
description:
Contains settings for the Optimized store that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore
conflicts:
- embeddingManagement
exactly_one_of:
- bigtable
- optimized
min_version: beta
properties:
[] # Meant to be an empty object with no properties - see here : https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featureOnlineStores#Optimized
# The fields below are necessary to include the "Optimized" transformation in the payload
send_empty_value: true
allow_empty_object: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resource "google_vertex_ai_feature_online_store" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['name'] %>"
labels = {
foo = "bar"
}
region = "us-central1"
bigtable {
auto_scaling {
min_node_count = 1
max_node_count = 3
cpu_utilization_target = 50
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ resource "google_vertex_ai_feature_online_store" "<%= ctx[:primary_resource_id]
labels = {
foo = "bar"
}
region = "us-central1"
region = "us-central1"
bigtable {
auto_scaling {
min_node_count = 1
max_node_count = 2
cpu_utilization_target = 80
}
}
embedding_management {
enabled = true
}
auto_scaling {
min_node_count = 1
max_node_count = 2
cpu_utilization_target = 80
}
}
embedding_management {
enabled = true
}
force_destroy = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ resource "google_vertex_ai_feature_online_store" "<%= ctx[:primary_resource_id]
labels = {
foo = "bar"
}
region = "us-central1"
region = "us-central1"
optimized {}
dedicated_serving_endpoint {
private_service_connect_config {
enable_private_service_connect = true
project_allowlist = [data.google_project.project.number]
enable_private_service_connect = true
project_allowlist = [data.google_project.project.number]
}
}
force_destroy = true
}
}

data "google_project" "project" {
Expand Down
Loading

0 comments on commit 4cb830c

Please sign in to comment.