Skip to content

Commit

Permalink
Automatically generated by magic modules for service: vertex_ai and r…
Browse files Browse the repository at this point in the history
…esource: Featurestores__entityType.

This commit includes the following changes:
- Singular Resource
- Plural Resource
- Documentation updates
- Terraform configuration
- Integration tests

Signed-off-by: Samir Anand <[email protected]>
  • Loading branch information
samiranand1990 committed Sep 18, 2023
1 parent 5e1a34c commit c5dc67b
Show file tree
Hide file tree
Showing 14 changed files with 621 additions and 19 deletions.
2 changes: 2 additions & 0 deletions build/inspec/test/integration/build/gcp-mm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@ resource "google_healthcare_dataset" "default" {
time_zone = "UTC"
}


resource "google_service_directory_namespace" "example" {
provider = google-beta
namespace_id = "example-namespace-${local.name_suffix}"
Expand Down Expand Up @@ -1411,3 +1412,4 @@ resource "google_service_directory_endpoint" "example" {
address = "1.2.3.4"
port = 5353
}

52 changes: 33 additions & 19 deletions build/inspec/test/integration/configuration/mm-attributes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -546,49 +546,63 @@ dlp:
location: "europe-west2"
type: "Infotype"

endpoint:
training_pipeline:
name : "value_name"
job_id: "job_id"
region : "value_region"
parent : "value_parent"
update_time : "value_updatetime"
model_deployment_monitoring_job : "value_modeldeploymentmonitoringjob"
description : "value_description"
network : "value_network"
display_name : "value_displayname"
etag : "value_etag"


nas_job:
name : "value_name"
region : "value_region"
parent : "value_parent"
end_time : "value_endtime"
state : "value_state"
create_time : "value_createtime"
display_name : "value_displayname"
start_time : "value_starttime"
update_time : "value_updatetime"

batch_prediction_job:
name : "value_name"
region : "value_region"
parent : "value_parent"
create_time : "value_createtime"
model_version_id : "1"
model_version_id : "value_modelversionid"
end_time : "value_endtime"
start_time : "value_starttime"
update_time : "value_updatetime"
state : "value_state"
model : "value_model"
display_name : "value_displayname"
service_account : "value_serviceaccount"

custom_job:
name : "value_name"
job_id: "job_id"
region : "value_region"
parent : "value_parent"
job_id: "job_id"

training_pipeline:

region_security_policy:
securitypolicy : "value_securitypolicy"

endpoint:
name : "value_name"
job_id: "job_id"
region : "value_region"
parent : "value_parent"
update_time : "value_updatetime"
model_deployment_monitoring_job : "value_modeldeploymentmonitoringjob"
description : "value_description"
network : "value_network"
display_name : "value_displayname"
etag : "value_etag"
create_time : "value_createtime"

nas_job:
featurestores_entity_type:
name : "value_name"
region : "value_region"
parent : "value_parent"
end_time : "value_endtime"
state : "value_state"
description : "value_description"
create_time : "value_createtime"
display_name : "value_displayname"
start_time : "value_starttime"
update_time : "value_updatetime"
etag : "value_etag"
update_time : "value_updatetime"
81 changes: 81 additions & 0 deletions docs/resources/google_vertex_ai_featurestores_entity_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: About the google_vertex_ai_featurestores_entity_type resource
platform: gcp
---

## Syntax
A `google_vertex_ai_featurestores_entity_type` is used to test a Google FeaturestoresEntityType resource

## Examples
```
describe google_vertex_ai_featurestores_entity_type(name: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/#{featurestores_entity_type['featurestore']}/entityTypes/#{featurestores_entity_type['name']}", region: ' value_region') do
it { should exist }
its('description') { should cmp 'value_description' }
its('name') { should cmp 'value_name' }
its('create_time') { should cmp 'value_createtime' }
its('etag') { should cmp 'value_etag' }
its('update_time') { should cmp 'value_updatetime' }
end
describe google_vertex_ai_featurestores_entity_type(name: "does_not_exit", region: ' value_region') do
it { should_not exist }
end
```

## Properties
Properties that can be accessed from the `google_vertex_ai_featurestores_entity_type` resource:


* `labels`: Optional. The labels with user-defined metadata to organize your EntityTypes. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one EntityType (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.

* `additional_properties`:

* `description`: Optional. Description of the EntityType.

* `name`: Immutable. Name of the EntityType. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` The last part entity_type is assigned by the client. The entity_type can be up to 64 characters long and can consist only of ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 starting with a letter. The value will be unique given a featurestore.

* `create_time`: Output only. Timestamp when this EntityType was created.

* `monitoring_config`: Configuration of how features in Featurestore are monitored.

* `import_features_analysis`: Configuration of the Featurestore's ImportFeature Analysis Based Monitoring. This type of analysis generates statistics for values of each Feature imported by every ImportFeatureValues operation.

* `anomaly_detection_baseline`: The baseline used to do anomaly detection for the statistics generated by import features analysis.
Possible values:
* BASELINE_UNSPECIFIED
* LATEST_STATS
* MOST_RECENT_SNAPSHOT_STATS
* PREVIOUS_IMPORT_FEATURES_STATS

* `state`: Whether to enable / disable / inherite default hebavior for import features analysis.
Possible values:
* STATE_UNSPECIFIED
* DEFAULT
* ENABLED
* DISABLED

* `numerical_threshold_config`: The config for Featurestore Monitoring threshold.

* `value`: Specify a threshold value that can trigger the alert. 1. For categorical feature, the distribution distance is calculated by L-inifinity norm. 2. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature.

* `categorical_threshold_config`: The config for Featurestore Monitoring threshold.

* `value`: Specify a threshold value that can trigger the alert. 1. For categorical feature, the distribution distance is calculated by L-inifinity norm. 2. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature.

* `snapshot_analysis`: Configuration of the Featurestore's Snapshot Analysis Based Monitoring. This type of analysis generates statistics for each Feature based on a snapshot of the latest feature value of each entities every monitoring_interval.

* `monitoring_interval_days`: Configuration of the snapshot analysis based monitoring pipeline running interval. The value indicates number of days.

* `staleness_days`: Customized export features time window for snapshot analysis. Unit is one day. Default value is 3 weeks. Minimum value is 1 day. Maximum value is 4000 days.

* `disabled`: The monitoring schedule for snapshot analysis. For EntityType-level config: unset / disabled = true indicates disabled by default for Features under it; otherwise by default enable snapshot analysis monitoring with monitoring_interval for Features under it. Feature-level config: disabled = true indicates disabled regardless of the EntityType-level config; unset monitoring_interval indicates going with EntityType-level config; otherwise run snapshot analysis monitoring with monitoring_interval regardless of the EntityType-level config. Explicitly Disable the snapshot analysis based monitoring.

* `etag`: Optional. Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.

* `update_time`: Output only. Timestamp when this EntityType was most recently updated.

* `offline_storage_ttl_days`: Optional. Config for data retention policy in offline storage. TTL in days for feature values that will be stored in offline storage. The Feature Store offline storage periodically removes obsolete feature values older than `offline_storage_ttl_days` since the feature generation time. If unset (or explicitly set to 0), default to 4000 days TTL.


## GCP Permissions
33 changes: 33 additions & 0 deletions docs/resources/google_vertex_ai_featurestores_entity_types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: About the google_vertex_ai_featurestores_entity_types resource
platform: gcp
---

## Syntax
A `google_vertex_ai_featurestores_entity_types` is used to test a Google FeaturestoresEntityType resource

## Examples
```
describe google_vertex_ai_featurestores_entity_types(parent: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/#{featurestores_entity_type['featurestore']}", region: ' value_region') do
it { should exist }
end
```

## Properties
Properties that can be accessed from the `google_vertex_ai_featurestores_entity_types` resource:

See [google_vertex_ai_featurestores_entity_type.md](google_vertex_ai_featurestores_entity_type.md) for more detailed information
* `labels`: an array of `google_vertex_ai_featurestores_entity_type` labels
* `descriptions`: an array of `google_vertex_ai_featurestores_entity_type` description
* `names`: an array of `google_vertex_ai_featurestores_entity_type` name
* `create_times`: an array of `google_vertex_ai_featurestores_entity_type` create_time
* `monitoring_configs`: an array of `google_vertex_ai_featurestores_entity_type` monitoring_config
* `etags`: an array of `google_vertex_ai_featurestores_entity_type` etag
* `update_times`: an array of `google_vertex_ai_featurestores_entity_type` update_time
* `offline_storage_ttl_days`: an array of `google_vertex_ai_featurestores_entity_type` offline_storage_ttl_days

## Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with `where` as a block or a method.

## GCP Permissions
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module VertexAI
module Property
class FeaturestoresEntityTypeLabels
attr_reader :additional_properties

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@additional_properties = args['additionalProperties']
end

def to_s
"#{@parent_identifier} FeaturestoresEntityTypeLabels"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config'
require 'google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis'
require 'google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config'
require 'google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis'
module GoogleInSpec
module VertexAI
module Property
class FeaturestoresEntityTypeMonitoringConfig
attr_reader :import_features_analysis

attr_reader :numerical_threshold_config

attr_reader :categorical_threshold_config

attr_reader :snapshot_analysis

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@import_features_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis.new(args['importFeaturesAnalysis'], to_s)
@numerical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig.new(args['numericalThresholdConfig'], to_s)
@categorical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig.new(args['categoricalThresholdConfig'], to_s)
@snapshot_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis.new(args['snapshotAnalysis'], to_s)
end

def to_s
"#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module VertexAI
module Property
class FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig
attr_reader :value

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@value = args['value']
end

def to_s
"#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module VertexAI
module Property
class FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis
attr_reader :anomaly_detection_baseline

attr_reader :state

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@anomaly_detection_baseline = args['anomalyDetectionBaseline']
@state = args['state']
end

def to_s
"#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis"
end
end
end
end
end
Loading

0 comments on commit c5dc67b

Please sign in to comment.