provides
This is the provides side of the interface layer, for use only by the AWS
integrator charm itself.
The flags that are set by the provides side of this interface are:
* **`endpoint.{endpoint_name}.requested`** This flag is set when there is
a new or updated request by a remote unit for AWS integration features.
The AWS integration charm should then iterate over each request, perform
whatever actions are necessary to satisfy those requests, and then mark
them as complete.
AWSIntegrationProvides
```python
AWSIntegrationProvides(self, endpoint_name, relation_ids=None)
```
Example usage:
```python
from charms.reactive import when, endpoint_from_flag
from charms import layer
@when('endpoint.aws.requested')
def handle_requests():
aws = endpoint_from_flag('endpoint.aws.requested')
for request in aws.requests:
if request.instance_tags:
tag_instance(
request.instance_id,
request.region,
request.instance_tags)
if request.requested_load_balancer_management:
layer.aws.enable_load_balancer_management(
request.application_name,
request.instance_id,
request.region,
)
# ...
request.mark_completed()
```
application_names
Set of names of all applications that are still joined.
requests
A list of the new or updated `IntegrationRequests` that
have been made.
unit_instances
Mapping of unit names to instance IDs and regions for all joined units.
IntegrationRequest
```python
IntegrationRequest(self, unit)
```
A request for integration from a single remote unit.
application_name
The name of the application making the request.
changed
Whether this request has changed since the last time it was
marked completed.
hash
SHA hash of the data for this request.
instance_id
The instance ID reported for this request.
Mapping of tag names to values (or `None`) to apply to this instance's
machine-specific security group (firewall).
Mapping of tag names to values (or `None`) to apply to this instance's
subnet.
Mapping of tag names to values (or `None`) to apply to this instance.
object_storage_access_patterns
List of patterns to which to restrict object storage access.
object_storage_management_patterns
List of patterns to which to restrict object storage management.
region
The region reported for this request.
requested_block_storage_management
Flag indicating whether block storage management was requested.
requested_dns_management
Flag indicating whether DNS management was requested.
requested_instance_inspection
Flag indicating whether the ability to inspect instances was requested.
requested_load_balancer_management
Flag indicating whether load balancer management was requested.
requested_network_management
Flag indicating whether the ability to manage networking (firewalls,
subnets, etc) was requested.
requested_object_storage_access
Flag indicating whether object storage access was requested.
requested_object_storage_management
Flag indicating whether object storage management was requested.
unit_name
The name of the unit making the request.
mark_completed
```python
IntegrationRequest.mark_completed(self)
```
Mark this request as having been completed.
clear
```python
IntegrationRequest.clear(self)
```
Clear this request's cached data.