Download the PHP package aws/aws-sdk-php-resources without Composer

On this page you can find all versions of the php package aws/aws-sdk-php-resources. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aws-sdk-php-resources

AWS Resource APIs for PHP

@awsforphp on Twitter Build Status Apache 2 License

An extension to the AWS SDK for PHP for interacting with AWS services using resource-oriented objects.

Introduction

The core AWS SDK for PHP is composed of service client objects that have methods corresponding 1-to-1 with operations in the service's API (e.g., Ec2Client::runInstances() method maps to the EC2 service's RunInstances operation).

This project builds build upon the SDK to add new types of objects that allow you to interact with the AWS service APIs in a more resource-oriented way. This allows you to use a more expressive syntax when working with AWS services, because you are acting on objects that understand their relationships with other resources and that encapsulate their identifying information.

Installation

You must install the AWS Resource APIs using Composer by requiring the aws/aws-sdk-php-resources package (composer require aws/aws-sdk-php-resources) in your project.

Note: The Resource APIs use Version 3 of the AWS SDK for PHP.

Types of Objects

The Resource APIs introduce 4 new objects, all within the Aws\Resource namespace.

1. Aws

The Aws object acts as the starting point into the resource APIs.

The $config, as provided in the preceding example, is an array of configuration options that is the same as what you would provide when instantiating the Aws\Sdk object in the core SDK. This includes things like 'region', 'version', your credentials, etc.

You can overwrite the global config options for a service by specifying new values when you get the service's resource.

The AWS Resource APIs currently supports 7 services (cloudformation, ec2, glacier, iam, s3, sns, sqs).

2. Resource

Resource objects each represent a single, identifiable AWS resource (e.g., an Amazon S3 bucket or an Amazon SQS queue). They contain information about how to identify the resource and load its data, the actions that can be performed on it, and the other resources to which it is related.

You can access a related resource by calling the related resource's name as a method and passing in its identity.

Accessing resources this way is evaluated lazily, meaning that the previous example does not actually make any API calls.

Once you access the data of a resource, an API call will be triggered to "load" the resource and fetch its data. To retrieve a resource object's data, you can access it like an array.

You can also use the getIdentity() and getData() methods to extract the resource's data.

Performing Actions

You can perform actions on a resource by calling verb-like methods on the object.

Because the resource's identity is encapsulated within the resource object, you never have to specify it again once the object is created. This way, actions like $object->delete() do not need to require arguments.

3. Collection

Some resources have a "has many" type relationship with other resources. For example, an S3 bucket has many objects. When you access a pluralized property or method on a resource, you will get back a Collection of resources. Collections are iterable, but have an unknown length, because the underlying API operation used to retrieve the resource data may require multiple calls. They leverage the core SDK's Paginators feature to be able to handle iterating through pages of resource data on your behalf.

Collections, like resources, are lazily evaluated, so they don't actually trigger any API calls until you start iterating through the resources.

4. Batch

Batches are similar to collections, but are finite in length. Batches are returned as the result of performing an action, where multiple resources are returned. For example, an SQS "Queue" resource has an action named "ReceiveMessages" that results in returning a batch of up to 10 "Message" resources.

Using Resources

We are currently working on providing API documentation for the AWS Resource APIs. Even without docs, you can programmatically determine what methods are available on a resource object by calling the respondsTo() method.

You can use that same respondsTo() method to check if a particular method is available. The getMeta() method may also help you discover more about how your resource object works as well.

TODO

There is still a lot of work to do on the AWS Resources API for PHP. Here are some things we have on the list to work on soon.

  1. Support for batch actions on Batch and Collection objects (e.g., $messages->delete();)
  2. Support for more AWS services
  3. API documentation for the AWS Resource APIs

Check out the AWS Resource APIs and let us now what questions, feedback, or ideas you have in the issue tracker. Thanks!


All versions of aws-sdk-php-resources with dependencies

PHP Build Version
Package Version
Requires aws/aws-sdk-php Version ~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aws/aws-sdk-php-resources contains the following files

Loading the files please wait ....