Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get Cloudfront distribution or list #429

Open
DavidEGx opened this issue Jul 14, 2023 · 0 comments
Open

Cannot get Cloudfront distribution or list #429

DavidEGx opened this issue Jul 14, 2023 · 0 comments

Comments

@DavidEGx
Copy link

I'm trying this code:

use strict;
use warnings;

use Paws;
use Paws::Credential::Explicit;
use Data::Dumper::Concise;

my $cf_service = Paws->service('CloudFront',
  region => 'us-east-1',
  credentials => Paws::Credential::Explicit->new(
    access_key => '***',
    secret_key => '***',
    session_token => '***'
    )
);

my $response = $cf_service->ListDistributions();
say Dumper($response);

And I just get:

bless( {
  _request_id => "921e9f34-e6d9-42d8-b8e7-7b7a07edfc67",
}, 'Paws::CloudFront::ListDistributionsResult' )

There seems to be no data inside. Also tried GetDistribution and the result was the same.

If I dump $response->{content} in Paws/Net/Caller.pm, the data seems to be there:

<?xml version="1.0"?>
<DistributionList xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/">
  <Marker>
</Marker>
<MaxItems>100</MaxItems>
<IsTruncated>false</IsTruncated>
<Quantity>15</Quantity>
<Items>
  <DistributionSummary>
    ...
  </DistributionSummary>

  <DistributionSummary>
    ...
  </DistributionSummary>

  <DistributionSummary>
    ...
  </DistributionSummary>
</Items>
</DistributionList>

I guess Paws doesn't manage to transform that correctly to whatever it uses internally :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant