Group
Extension

Matches 5

VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2.pm ( view source; MetaCPAN )
CacheDNS ':register';
use HTTP::Request::Common;
use VM::EC2::Error;
use Carp 'croak','carp';
use JSON;

our $VERSION = '1.28';
our $AUTOLOAD;
our @CARP_NOT = qw(VM::EC2::Image    VM::EC2::Volume
    
ndpoint?" . join '&', @param;

    my $response = $self->ua->request($request);

    return JSON::decode_json($response->content);
}

=head2 $url = $ec2->login_url(-credentials => $credentials, -issue
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/Security/Policy.pm ( view source; MetaCPAN )
 JSON string that can be passed to
VM::EC2->get_federation_token(), or other AWS libraries.

=head1 STRING OVERLOADING

When used in a string context, this object will interpolate into the
policy JSON
text. In addition,
please see DISCLAIMER.txt for disclaimers of warranty.

=cut

use strict;

use JSON;
use VM::EC2;

use Carp 'croak';
use overload
    '""'     => 'as_string',
    fallback => 1;

su
cal $self->{statements};
        $self->deny('*');
        return $self->as_string;
    }

    my $json = JSON->new();
    $json->canonical(1);

    return $json->encode({Statement => \@list});
}

1;
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/REST/security_token.pm ( view source; MetaCPAN )
         Same thing, faster to type.

 -policy           A VM::EC2::Security::Policy object, or a JSON string
                     complying with the IAM policy syntax.

The duration must be no shorte
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/Security/Credentials.pm ( view source; MetaCPAN )
oken from its JSON representation (e.g. as returned
 # from instance metadata of an instance that is assigned an IAM role
 my $token = VM::EC2::Security::Credentials->new_from_json($json);

 # open a 
ew_from_json {
    my $class = shift;
    my ($data,$endpoint) = @_;
    eval "require JSON; 1" or die "no JSON module installed: $@"
	unless JSON->can('decode');
    my $hash = JSON::from_json($data)
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/Instance/Metadata.pm ( view source; MetaCPAN )
AWSEC2/latest/UserGuide/UsingIAM.html.

Note that these routines require installation of the perl JSON module, and will
cause a fatal error if this module cannot be loaded.

 iam_info               --
{/^\d+=(.+)/ && $1} @keys;
}

sub iam_info {
    my $self = shift;
    $self->_load_json;
    return JSON::from_json($self->fetch('iam/info'));
}

sub iam_role {
    my $self = shift;
    return $self
_from_json');
    return VM::EC2::Security::Credentials->new_from_json($data,$self->endpoint);
}

sub _load_json {
    return if JSON->can('decode');
    eval "require JSON; 1" or croak "no JSON modul

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.