forked from cloud-custodian/cloud-custodian
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws - es - add "has-statement" filter (cloud-custodian#7751)
- Loading branch information
1 parent
34d70c7
commit 67262f3
Showing
5 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
tests/data/placebo/test_elasticsearch_has_statement/es.DescribeElasticsearchDomains_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"ResponseMetadata": {}, | ||
"DomainStatusList": [ | ||
{ | ||
"DomainId": "644160558196/my-test-cluster", | ||
"DomainName": "my-test-cluster", | ||
"ARN": "arn:aws:es:us-east-1:644160558196:domain/my-test-cluster", | ||
"Created": true, | ||
"Deleted": false, | ||
"Processing": true, | ||
"UpgradeProcessing": false, | ||
"ElasticsearchVersion": "OpenSearch_1.3", | ||
"ElasticsearchClusterConfig": { | ||
"InstanceType": "t3.small.elasticsearch", | ||
"InstanceCount": 1, | ||
"DedicatedMasterEnabled": false, | ||
"ZoneAwarenessEnabled": false, | ||
"WarmEnabled": false, | ||
"ColdStorageOptions": { | ||
"Enabled": false | ||
} | ||
}, | ||
"EBSOptions": { | ||
"EBSEnabled": true, | ||
"VolumeType": "gp3", | ||
"VolumeSize": 10, | ||
"Iops": 3000 | ||
}, | ||
"AccessPolicies": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Principal\":{\"AWS\":\"*\"},\"Action\":\"es:*\",\"Resource\":\"arn:aws:es:us-east-1:644160558196:domain/my-test-cluster/*\"}]}", | ||
"SnapshotOptions": {}, | ||
"CognitoOptions": { | ||
"Enabled": false | ||
}, | ||
"EncryptionAtRestOptions": { | ||
"Enabled": true, | ||
"KmsKeyId": "arn:aws:kms:us-east-1:644160558196:key/0215f288-e10e-44fd-b4d3-31e1685af8e6" | ||
}, | ||
"NodeToNodeEncryptionOptions": { | ||
"Enabled": true | ||
}, | ||
"AdvancedOptions": { | ||
"indices.fielddata.cache.size": "20", | ||
"indices.query.bool.max_clause_count": "1024", | ||
"override_main_response_version": "false", | ||
"rest.action.multi.allow_explicit_index": "true" | ||
}, | ||
"ServiceSoftwareOptions": { | ||
"CurrentVersion": "", | ||
"NewVersion": "", | ||
"UpdateAvailable": false, | ||
"Cancellable": false, | ||
"UpdateStatus": "COMPLETED", | ||
"Description": "There is no software update available for this domain.", | ||
"AutomatedUpdateDate": { | ||
"__class__": "datetime", | ||
"year": 1969, | ||
"month": 12, | ||
"day": 31, | ||
"hour": 16, | ||
"minute": 0, | ||
"second": 0, | ||
"microsecond": 0 | ||
}, | ||
"OptionalDeployment": true | ||
}, | ||
"DomainEndpointOptions": { | ||
"EnforceHTTPS": true, | ||
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07", | ||
"CustomEndpointEnabled": false | ||
}, | ||
"AdvancedSecurityOptions": { | ||
"Enabled": true, | ||
"InternalUserDatabaseEnabled": true, | ||
"AnonymousAuthEnabled": false | ||
}, | ||
"AutoTuneOptions": { | ||
"State": "ENABLE_IN_PROGRESS" | ||
} | ||
} | ||
] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/data/placebo/test_elasticsearch_has_statement/es.ListDomainNames_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"ResponseMetadata": {}, | ||
"DomainNames": [ | ||
{ | ||
"DomainName": "my-test-cluster", | ||
"EngineType": "OpenSearch" | ||
} | ||
] | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/data/placebo/test_elasticsearch_has_statement/es.ListTags_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"ResponseMetadata": {}, | ||
"TagList": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters