Skip to content

Instantly share code, notes, and snippets.

@lamanotrama
Created October 19, 2012 12:07
Show Gist options
  • Save lamanotrama/3917925 to your computer and use it in GitHub Desktop.
Save lamanotrama/3917925 to your computer and use it in GitHub Desktop.
tagとるやつ
sub _build_volume_name {
my $self = shift;
my $name_tag = $self->ec2->describe_tags(
"Filter.Name" => [ "resource-id", "key" ],
"Filter.Value" => [ $self->ebs->volume_id, "Name" ]
) or croak "Target EBS requires 'Name' tag: ". $self->ebs->volume_id;
return $name_tag->[0]->value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment