Skip to content

Commit 8a08f36

Browse files
authored
Change ColdPollRate to InactiveMetricsPollRate (#256)
1 parent 5bf142a commit 8a08f36

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

integration/model_aws_cloud_watch_integration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type AwsCloudWatchIntegration struct {
4242
// Array of namespace sync rules. Each element in the array is an object that contains an AWS namespace name and a filter that controls the data that SignalFx collects for the namespace. If you specify this property, SignalFx ignores the values in the AWS CloudWatch Integration Model \"services\" property. If you don't specify either property, SignalFx syncs all data in all AWS namespaces. To learn more, see the topic [Integrating With AWS](https://developers.signalfx.com/integrating/aws_integration_overview.html).
4343
NamespaceSyncRules []*AwsNameSpaceSyncRule `json:"namespaceSyncRules,omitempty"`
4444
PollRate int64 `json:"pollRate,omitempty"`
45-
ColdPollRate int64 `json:"coldPollRate,omitempty"`
45+
InactiveMetricsPollRate int64 `json:"inactiveMetricsPollRate,omitempty"`
4646
// Array of AWS regions that SignalFx should monitor. The API supports the following AWS regions: <br><br> **Regular AWS regions** * ap-northeast-1 * ap-northeast-2 * ap-south-1 * ap-southeast-1 * ap-southeast-2 * ca-central-1 * eu-central-1 * eu-north-1 * eu-west-1 * eu-west-2 * eu-west-3 * sa-east-1 * us-east-1 * us-east-2 * us-west-1 * us-west-2 **GovCloud AWS regions** * us-gov-east-1 * us-gov-west-1 **China AWS regions** * cn-north-1 * cn-northwest-1 If you don't specify the \"regions\" property, or if you specify `\"regions\": []`, the API adds all of the regular AWS regions to your integration. **Note:** You can't mix regions from different sets. For example, you can't specify `\"regions\": [ \"eu-west-1\", \"cn-north-1\"]`.
4747
Regions []string `json:"regions,omitempty"`
4848
// Role ARN that you add to an existing AWS integration object.<br> When you create an AWS integration object and specify \"ExternalId\" a he authentication method, SignalFx responds with an external ID. You provide this ID to AWS, which responds with a role ARN.<br> To finish the connection between SignalFx and AWS, you update the AWS integration object using a PUT request. In this request, you specify the \"roleArn\" property using the value you obtained from AWS. <br> **NOTE:** To ensure security, SignalFx doesn't return this property in response objects.

integration/model_aws_cloud_watch_integration_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ func TestDerivedTypeComparison(t *testing.T) {
3333
assert.True(t, AwsService("") == "", "Golang revolution!")
3434
}
3535

36-
func TestMarshalAwsCloudWatchIntegrationWithColdPollRate(t *testing.T) {
36+
func TestMarshalAwsCloudWatchIntegrationWithInactiveMetricsPollRate(t *testing.T) {
3737
cwIntegration := AwsCloudWatchIntegration{
38-
ColdPollRate: 60000,
38+
InactiveMetricsPollRate: 60000,
3939
}
4040
payload, err := json.Marshal(&cwIntegration)
4141

4242
assert.NoError(t, err, "Unexpected error marshalling integration")
43-
assert.Equal(t, `{"enabled":false,"type":"","coldPollRate":60000,"metricStreamsManagedExternally":false}`, string(payload), "payload does not match")
44-
assert.Equal(t, int64(60000), cwIntegration.ColdPollRate, "ColdPollRate does not match")
43+
assert.Equal(t, `{"enabled":false,"type":"","inactiveMetricsPollRate":60000,"metricStreamsManagedExternally":false}`, string(payload), "payload does not match")
44+
assert.Equal(t, int64(60000), cwIntegration.InactiveMetricsPollRate, "InactiveMetricsPollRate does not match")
4545
}
4646

47-
func TestUnmarshalAwsCloudWatchIntegrationWithColdPollRate(t *testing.T) {
47+
func TestUnmarshalAwsCloudWatchIntegrationWithInactiveMetricsPollRate(t *testing.T) {
4848
expectedValue := int64(60000)
4949

5050
cwIntegration := AwsCloudWatchIntegration{}
51-
err := json.Unmarshal([]byte(`{"coldPollRate":60000}`), &cwIntegration)
51+
err := json.Unmarshal([]byte(`{"inactiveMetricsPollRate":60000}`), &cwIntegration)
5252

5353
assert.NoError(t, err, "Unexpected error unmarshalling integration")
54-
assert.Equal(t, expectedValue, cwIntegration.ColdPollRate, "ColdPollRate does not match")
54+
assert.Equal(t, expectedValue, cwIntegration.InactiveMetricsPollRate, "InactiveMetricsPollRate does not match")
5555
}

0 commit comments

Comments
 (0)