Spec-Zone.ru › Chef 16

Ресурс google_project_alert_policy_condition

[править на GitHub]

Используйте ресурс аудита InSpec google_project_alert_policy_condition для проверки свойств условия оповещения политики проекта GCP.

Синтаксис

Блок ресурса google_project_alert_policy_condition объявляет тесты для одного условия оповещения политики проекта GCP по имени и фильтру.

describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do
  it { should exist }
end

Примеры

В следующих примерах показано, как использовать этот ресурс аудита InSpec.

Проверка, что условие оповещения политики проекта GCP имеет определенное значение порога

describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do
  its('condition_threshold_value'){ should eq 0.001 }
end

Проверка, что условие оповещения политики проекта GCP имеет определенный период выравнивания агрегирования

describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do
  its('aggregation_alignment_period'){ should eq '60s' }
end

Свойства

  • condition_threshold_value, aggregation_alignment_period, aggregation_per_series_aligner, aggregation_cross_series_reducer

Разрешения GCP

Убедитесь, что для проекта включен API Stackdriver Logging по адресу Stackdriver Logging API.

© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_project_alert_policy_condition/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API