Skip to content

Cannot get Cloudfront distribution or list #429

@DavidEGx

Description

@DavidEGx

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 :-/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions