Page History
...
To subscribe to a collection's granules, you need to make sure you can update and read itthe collection. Use the following command to make sure you have permissions.
...
If you do not have permission use the following to create one if one does not exist, but only if you are the provider. Otherwise you will have to ask the provider to give you permission.
Creating permissions for first time
...
If a permission does exist, but it needs to be updated then use the following command, assuming you are the provider. Otherwise the provider will be to be contacted to provide permissions.
Updating permissions for existing ACL
...
Code Block |
---|
curl --location 'https://localhost:8080/ingest/subscriptions/jyna_ingest_subscription_3' \
--header 'Content-Type: application/vnd.nasa.cmr.umm+json' \
--header 'Authorization: ••••••' \
--data-raw '{
"Name": "Ingest-Subscription-Test",
"Type": "granule",
"SubscriberId": "mysubscriberid",
"EmailAddress": "myemail",
"CollectionConceptId": "C3261906797-JM_PROV1",
"EndPoint": "arn:aws:sqs:<region>:<account-id>:<my-queue-name>",
"Mode": ["New","Update"],
"Method":"ingest",
"MetadataSpecification": {
"URL": "https://cdn.earthdata.nasa.gov/umm/subscription/v1.1.1",
"Name": "UMM-Sub",
"Version": "1.1.1"
}
}
|
...
Once the message has been processed, it should be deleted to keep your queue clean.
While rare, it is possible for a message to show up twice because of AWS SQS at-least-once delivery. Be sure to design your applications to be idempotent (the software should not be adversely affected when processing the same message more than once).
Resources
- AWS Documentation using the Console
https://docs.aws.amazon.com/sns/latest/dg/sns-send-message-to-sqs-cross-account.html - AWS has great documentation and code examples in many different languages.
https://github.com/awsdocs/aws-doc-sdk-examples - UMM-Sub schema can be found:
https://git.earthdata.nasa.gov/projects/EMFD/repos/unified-metadata-model/browse/subscription/v1.1.1/umm-sub-json-schema.json
https://cdn.earthdata.nasa.gov/umm/subscription/v1.1.1/umm-sub-json-schema.json - CMR API documention:
https://cmr.earthdata.nasa.gov/ingest/site/docs/ingest/api.html#subscription