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 - cloudsearch - add domain-options filter and enable-https action (…
- Loading branch information
Showing
7 changed files
with
370 additions
and
3 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
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,65 @@ | ||
{ | ||
"version": "0", | ||
"id": "xxxxx-84b9-4e68-a930-03a7f8d62b50", | ||
"detail-type": "AWS API Call via CloudTrail", | ||
"source": "aws.rds", | ||
"account": "687174582794", | ||
"time": "2021-05-26T09:51:58Z", | ||
"region": "us-east-1", | ||
"resources": [], | ||
"detail": { | ||
"eventVersion": "1.08", | ||
"userIdentity": { | ||
"type": "AssumedRole", | ||
"principalId": "AROAILJD4VDVFFUUQB4VM:xxxxx-4dea-91bf-70a953d01bda_cred_session", | ||
"arn": "arn:aws:sts::123456789:assumed-role/XXXX1OT8CHKE29AQJ/XXXX-d10e-4dea-91bf-70a953d01bda_cred_session", | ||
"accountId": "123456789", | ||
"accessKeyId": "XXXXXXX", | ||
"sessionContext": { | ||
"sessionIssuer": { | ||
"type": "Role", | ||
"principalId": "XXXXXX", | ||
"arn": "arn:aws:iam::123456789:role/role-xxxx", | ||
"accountId": "123456789", | ||
"userName": "xxxx" | ||
}, | ||
"webIdFederationData": {}, | ||
"attributes": { | ||
"creationDate": "2021-12-01T14:24:34Z", | ||
"mfaAuthenticated": "False" | ||
} | ||
} | ||
}, | ||
"eventTime": "2021-12-01T14:25:42Z", | ||
"eventSource": "cloudsearch.amazonaws.com", | ||
"eventName": "CreateDomain", | ||
"awsRegion": "us-east-1", | ||
"sourceIPAddress": "148.177.96.202", | ||
"userAgent": "console.amazonaws.com", | ||
"requestParameters": { | ||
"domainName": "demo-search" | ||
}, | ||
"responseElements": { | ||
"domainStatus": { | ||
"aRN": "arn:aws:cloudsearch:us-east-1:123456789:domain/demo-search", | ||
"searchInstanceCount": 0, | ||
"docService": {}, | ||
"requiresIndexDocuments": false, | ||
"deleted": false, | ||
"searchService": {}, | ||
"domainId": "123456789/demo-search", | ||
"processing": false, | ||
"created": true, | ||
"searchPartitionCount": 0, | ||
"domainName": "demo-search" | ||
} | ||
}, | ||
"requestID": "d8c5a08a-f0dd-4e81-b41d-ed216546448a", | ||
"eventID": "9f17a0f0-a75d-425e-8d25-7fd72e7885ae", | ||
"readOnly": false, | ||
"eventType": "AwsApiCall", | ||
"managementEvent": true, | ||
"recipientAccountId": "123456789", | ||
"eventCategory": "Management" | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...a/placebo/test_enable_https_cloud_search/cloudsearch.DescribeDomainEndpointOptions_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,47 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"DomainEndpointOptions": { | ||
"Options": { | ||
"EnforceHTTPS": false, | ||
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" | ||
}, | ||
"Status": { | ||
"CreationDate": { | ||
"__class__": "datetime", | ||
"year": 2021, | ||
"month": 12, | ||
"day": 1, | ||
"hour": 14, | ||
"minute": 25, | ||
"second": 42, | ||
"microsecond": 528000 | ||
}, | ||
"UpdateDate": { | ||
"__class__": "datetime", | ||
"year": 2021, | ||
"month": 12, | ||
"day": 1, | ||
"hour": 16, | ||
"minute": 3, | ||
"second": 15, | ||
"microsecond": 677000 | ||
}, | ||
"UpdateVersion": 19, | ||
"State": "Active", | ||
"PendingDeletion": false | ||
} | ||
}, | ||
"ResponseMetadata": { | ||
"RequestId": "b70f91-3067-xxxx-bbb7-6b36318a4faa", | ||
"HTTPStatusCode": 200, | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "b70fa1-xxxxx-4ea3-bbb7-6b36318a4faa", | ||
"content-type": "text/xml", | ||
"content-length": "804", | ||
"date": "Wed, 01 Dec 2021 16:08:40 GMT" | ||
}, | ||
"RetryAttempts": 0 | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...a/placebo/test_enable_https_cloud_search/cloudsearch.DescribeDomainEndpointOptions_2.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,47 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"DomainEndpointOptions": { | ||
"Options": { | ||
"EnforceHTTPS": true, | ||
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" | ||
}, | ||
"Status": { | ||
"CreationDate": { | ||
"__class__": "datetime", | ||
"year": 2022, | ||
"month": 6, | ||
"day": 6, | ||
"hour": 8, | ||
"minute": 6, | ||
"second": 54, | ||
"microsecond": 586000 | ||
}, | ||
"UpdateDate": { | ||
"__class__": "datetime", | ||
"year": 2022, | ||
"month": 6, | ||
"day": 6, | ||
"hour": 8, | ||
"minute": 9, | ||
"second": 14, | ||
"microsecond": 485000 | ||
}, | ||
"UpdateVersion": 102, | ||
"State": "Processing", | ||
"PendingDeletion": false | ||
} | ||
}, | ||
"ResponseMetadata": { | ||
"RequestId": "333f8b57-901e-4cb2-xxxxxx17e9cc479", | ||
"HTTPStatusCode": 200, | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "333f8b57-90xxxxx-f8717e9cc479", | ||
"content-type": "text/xml", | ||
"content-length": "809", | ||
"date": "Mon, 06 Jun 2022 08:09:14 GMT" | ||
}, | ||
"RetryAttempts": 0 | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
tests/data/placebo/test_enable_https_cloud_search/cloudsearch.DescribeDomains_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,40 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"DomainStatusList": [ | ||
{ | ||
"DomainId": "123456789/demo-search", | ||
"DomainName": "demo-search", | ||
"ARN": "arn:aws:cloudsearch:us-east-1:123456789:domain/demo-search", | ||
"Created": true, | ||
"Deleted": false, | ||
"DocService": { | ||
"Endpoint": "doc-demo-search-xxx.us-east-1.cloudsearch.amazonaws.com" | ||
}, | ||
"SearchService": { | ||
"Endpoint": "search-demo-search-xxx.us-east-1.cloudsearch.amazonaws.com" | ||
}, | ||
"RequiresIndexDocuments": false, | ||
"Processing": false, | ||
"SearchInstanceType": "search.small", | ||
"SearchPartitionCount": 1, | ||
"SearchInstanceCount": 1, | ||
"Limits": { | ||
"MaximumReplicationCount": 5, | ||
"MaximumPartitionCount": 10 | ||
} | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"RequestId": "5fcac0-cf65-xxx-839f-0d2237aa70f6", | ||
"HTTPStatusCode": 200, | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "5fcac0-xxxx-4c81-839f-0d2237aa70f6", | ||
"content-type": "text/xml", | ||
"content-length": "1623", | ||
"date": "Wed, 01 Dec 2021 16:08:40 GMT" | ||
}, | ||
"RetryAttempts": 0 | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...ata/placebo/test_enable_https_cloud_search/cloudsearch.UpdateDomainEndpointOptions_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,47 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"DomainEndpointOptions": { | ||
"Options": { | ||
"EnforceHTTPS": true, | ||
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" | ||
}, | ||
"Status": { | ||
"CreationDate": { | ||
"__class__": "datetime", | ||
"year": 2021, | ||
"month": 12, | ||
"day": 1, | ||
"hour": 14, | ||
"minute": 25, | ||
"second": 42, | ||
"microsecond": 528000 | ||
}, | ||
"UpdateDate": { | ||
"__class__": "datetime", | ||
"year": 2021, | ||
"month": 12, | ||
"day": 1, | ||
"hour": 16, | ||
"minute": 3, | ||
"second": 15, | ||
"microsecond": 677000 | ||
}, | ||
"UpdateVersion": 19, | ||
"State": "Active", | ||
"PendingDeletion": false | ||
} | ||
}, | ||
"ResponseMetadata": { | ||
"RequestId": "db8e7493-xxx-44c2-aa69-c970e78a2320", | ||
"HTTPStatusCode": 200, | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "db8e7493-xxxx-44c2-aa69-c970e78a2320", | ||
"content-type": "text/xml", | ||
"content-length": "796", | ||
"date": "Wed, 01 Dec 2021 16:08:40 GMT" | ||
}, | ||
"RetryAttempts": 0 | ||
} | ||
} | ||
} |
Oops, something went wrong.