Spec-Zone.ru › Chef 18

Ресурс google_project_alert_policy_condition

[Редактировать на GitHub]

Используйте ресурс проверки InSpec, чтобы проверить свойства одного условия политики уведомлений проекта 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