How to connect to GCP Bucket from AEM Managed Services | Adobe Higher Education
Skip to main content
Level 3
June 6, 2022
解決済み

How to connect to GCP Bucket from AEM Managed Services

  • June 6, 2022
  • 2 の返信
  • 850 ビュー

Hi, 

We have a requirement to connect to GCP and download the binaries into AEM DAM

So, currently, we are planning to read environment variables using the below API. 

Has anyone worked on this implementation? 

Our first hurdle is how to set and read Environment variables in AEM Managed services.
Any leads/advise would be appreciated.

import com.google.api.gax.paging.Page;
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;


StorageOptions.Builder b = StorageOptions.newBuilder().setProjectId("mygcp-aem-intg-lwr");
Storage storage = b.build().getService();

Page<Bucket> buckets = storage.list();
for (Bucket bucket : buckets.iterateAll()) {

}


Thanks, 

Mrudul

@p_v_nair 

このトピックへの返信は締め切られました。
ベストアンサー SantoshSai

Hi @mrudulmo ,

I believe there is nothing do from AEM side, this question seems to be more related to Google Cloud Storage API - you may try looking into API docs here https://cloud.google.com/java/docs/reference/google-cloud-storage/latest/com.google.cloud.storage.Bucket

Hope that helps!

Regards,
Santosh

2 の返信

SantoshSai
Community Advisor
Community Advisor
June 7, 2022

Hi @mrudulmo ,

I believe there is nothing do from AEM side, this question seems to be more related to Google Cloud Storage API - you may try looking into API docs here https://cloud.google.com/java/docs/reference/google-cloud-storage/latest/com.google.cloud.storage.Bucket

Hope that helps!

Regards,
Santosh

Santosh Sai
Fanindra_Surat
Community Advisor
Community Advisor
June 7, 2022

Hi @mrudulmo - What are the values that you are trying to read from the environment variables? Do they vary per AEM's environment like DEV, QA, Stage and Prod? If yes, any reason why runmodes don't fit into your requirement?

 

Thanks,

Fani