desc stringlengths 3 26.7k | decl stringlengths 11 7.89k | bodies stringlengths 8 553k |
|---|---|---|
'Expire a HIT that is no longer needed.
The effect is identical to the HIT expiring on its own. The
HIT no longer appears on the Mechanical Turk web site, and no
new Workers are allowed to accept the HIT. Workers who have
accepted the HIT prior to expiration are allowed to complete
it or return it, or allow the assignm... | def expire_hit(self, hit_id):
| params = {'HITId': hit_id}
return self._process_request('ForceExpireHIT', params)
|
'Increase the maximum number of assignments, or extend the
expiration date, of an existing HIT.
NOTE: If a HIT has a status of Reviewable and the HIT is
extended to make it Available, the HIT will not be returned by
GetReviewableHITs, and its submitted assignments will not be
returned by GetAssignmentsForHIT, until the... | def extend_hit(self, hit_id, assignments_increment=None, expiration_increment=None):
| if (((assignments_increment is None) and (expiration_increment is None)) or ((assignments_increment is not None) and (expiration_increment is not None))):
raise ValueError('Must specify either assignments_increment or expiration_increment, but not both')
params = {'HITId': hit_id... |
'Return information about the Mechanical Turk Service
operations and response group NOTE - this is basically useless
as it just returns the URL of the documentation
help_type: either \'Operation\' or \'ResponseGroup\''
| def get_help(self, about, help_type='Operation'):
| params = {'About': about, 'HelpType': help_type}
return self._process_request('Help', params)
|
'Issues a payment of money from your account to a Worker. To
be eligible for a bonus, the Worker must have submitted
results for one of your HITs, and have had those results
approved or rejected. This payment happens separately from the
reward you pay to the Worker when you approve the Worker\'s
assignment. The Bonus... | def grant_bonus(self, worker_id, assignment_id, bonus_price, reason):
| params = bonus_price.get_as_params('BonusAmount', 1)
params['WorkerId'] = worker_id
params['AssignmentId'] = assignment_id
params['Reason'] = reason
return self._process_request('GrantBonus', params)
|
'Block a worker from working on my tasks.'
| def block_worker(self, worker_id, reason):
| params = {'WorkerId': worker_id, 'Reason': reason}
return self._process_request('BlockWorker', params)
|
'Unblock a worker from working on my tasks.'
| def unblock_worker(self, worker_id, reason):
| params = {'WorkerId': worker_id, 'Reason': reason}
return self._process_request('UnblockWorker', params)
|
'Send a text message to workers.'
| def notify_workers(self, worker_ids, subject, message_text):
| params = {'Subject': subject, 'MessageText': message_text}
self.build_list_params(params, worker_ids, 'WorkerId')
return self._process_request('NotifyWorkers', params)
|
'Create a new Qualification Type.
name: This will be visible to workers and must be unique for a
given requester.
description: description shown to workers. Max 2000 characters.
status: \'Active\' or \'Inactive\'
keywords: list of keyword strings or comma separated string.
Max length of 1000 characters when concatenat... | def create_qualification_type(self, name, description, status, keywords=None, retry_delay=None, test=None, answer_key=None, answer_key_xml=None, test_duration=None, auto_granted=False, auto_granted_value=1):
| params = {'Name': name, 'Description': description, 'QualificationTypeStatus': status}
if (retry_delay is not None):
params['RetryDelayInSeconds'] = retry_delay
if (test is not None):
assert isinstance(test, QuestionForm)
assert (test_duration is not None)
params['Test'] = te... |
'TODO: Document.'
| def dispose_qualification_type(self, qualification_type_id):
| params = {'QualificationTypeId': qualification_type_id}
return self._process_request('DisposeQualificationType', params)
|
'TODO: Document.'
| def search_qualification_types(self, query=None, sort_by='Name', sort_direction='Ascending', page_size=10, page_number=1, must_be_requestable=True, must_be_owned_by_caller=True):
| params = {'Query': query, 'SortProperty': sort_by, 'SortDirection': sort_direction, 'PageSize': page_size, 'PageNumber': page_number, 'MustBeRequestable': must_be_requestable, 'MustBeOwnedByCaller': must_be_owned_by_caller}
return self._process_request('SearchQualificationTypes', params, [('QualificationType', ... |
'TODO: Document.'
| def get_qualification_requests(self, qualification_type_id, sort_by='Expiration', sort_direction='Ascending', page_size=10, page_number=1):
| params = {'QualificationTypeId': qualification_type_id, 'SortProperty': sort_by, 'SortDirection': sort_direction, 'PageSize': page_size, 'PageNumber': page_number}
return self._process_request('GetQualificationRequests', params, [('QualificationRequest', QualificationRequest)])
|
'TODO: Document.'
| def grant_qualification(self, qualification_request_id, integer_value=1):
| params = {'QualificationRequestId': qualification_request_id, 'IntegerValue': integer_value}
return self._process_request('GrantQualification', params)
|
'TODO: Document.'
| def revoke_qualification(self, subject_id, qualification_type_id, reason=None):
| params = {'SubjectId': subject_id, 'QualificationTypeId': qualification_type_id, 'Reason': reason}
return self._process_request('RevokeQualification', params)
|
'TODO: Document.'
| def get_qualification_score(self, qualification_type_id, worker_id):
| params = {'QualificationTypeId': qualification_type_id, 'SubjectId': worker_id}
return self._process_request('GetQualificationScore', params, [('Qualification', Qualification)])
|
'TODO: Document.'
| def update_qualification_score(self, qualification_type_id, worker_id, value):
| params = {'QualificationTypeId': qualification_type_id, 'SubjectId': worker_id, 'IntegerValue': value}
return self._process_request('UpdateQualificationScore', params)
|
'Helper to process the xml response from AWS'
| def _process_request(self, request_type, params, marker_elems=None):
| params['Operation'] = request_type
response = self.make_request(None, params, verb='POST')
return self._process_response(response, marker_elems)
|
'Helper to process the xml response from AWS'
| def _process_response(self, response, marker_elems=None):
| body = response.read()
if (self.debug == 2):
print body
if ('<Errors>' not in body.decode('utf-8')):
rs = ResultSet(marker_elems)
h = handler.XmlHandler(rs, self)
xml.sax.parseString(body, h)
return rs
else:
raise MTurkRequestError(response.status, respons... |
'Returns a comma+space-separated string of keywords from either
a list or a string'
| @staticmethod
def get_keywords_as_string(keywords):
| if isinstance(keywords, list):
keywords = ', '.join(keywords)
if isinstance(keywords, str):
final_keywords = keywords
elif isinstance(keywords, unicode):
final_keywords = keywords.encode('utf-8')
elif (keywords is None):
final_keywords = ''
else:
raise Type... |
'Returns a Price data structure from either a float or a Price'
| @staticmethod
def get_price_as_price(reward):
| if isinstance(reward, Price):
final_price = reward
else:
final_price = Price(reward)
return final_price
|
'Has this HIT expired yet?'
| def _has_expired(self):
| expired = False
if hasattr(self, 'Expiration'):
now = datetime.datetime.utcnow()
expiration = datetime.datetime.strptime(self.Expiration, '%Y-%m-%dT%H:%M:%SZ')
expired = (now >= expiration)
else:
raise ValueError('ERROR: Request for expired property, but no ... |
'Constructor; expects parameter d to be a dict of string parameters from a REST transport notification message'
| def __init__(self, d):
| self.signature = d['Signature']
self.timestamp = d['Timestamp']
self.version = d['Version']
assert (d['method'] == NotificationMessage.OPERATION_NAME), ("Method should be '%s'" % NotificationMessage.OPERATION_NAME)
self.events = []
events_dict = {}
if ('Event' in d):
events_... |
'Verifies the authenticity of a notification message.
TODO: This is doing a form of authentication and
this functionality should really be merged
with the pluggable authentication mechanism
at some point.'
| def verify(self, secret_key):
| verification_input = NotificationMessage.SERVICE_NAME
verification_input += NotificationMessage.OPERATION_NAME
verification_input += self.timestamp
h = hmac.new(key=secret_key, digestmod=sha)
h.update(verification_input)
signature_calc = base64.b64encode(h.digest())
return (self.signature ==... |
'Retrieve information about your VPCs. You can filter results to
return information only about those VPCs that match your search
parameters. Otherwise, all VPCs associated with your account
are returned.
:type vpc_ids: list
:param vpc_ids: A list of strings with the desired VPC ID\'s
:type filters: list of tuples or ... | def get_all_vpcs(self, vpc_ids=None, filters=None, dry_run=False):
| params = {}
if vpc_ids:
self.build_list_params(params, vpc_ids, 'VpcId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeVpcs', params, [('item', VPC)])
|
'Create a new Virtual Private Cloud.
:type cidr_block: str
:param cidr_block: A valid CIDR block
:type instance_tenancy: str
:param instance_tenancy: The supported tenancy options for instances
launched into the VPC. Valid values are \'default\' and \'dedicated\'.
:type dry_run: bool
:param dry_run: Set to True if the ... | def create_vpc(self, cidr_block, instance_tenancy=None, dry_run=False):
| params = {'CidrBlock': cidr_block}
if instance_tenancy:
params['InstanceTenancy'] = instance_tenancy
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateVpc', params, VPC)
|
'Delete a Virtual Private Cloud.
:type vpc_id: str
:param vpc_id: The ID of the vpc to be deleted.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_vpc(self, vpc_id, dry_run=False):
| params = {'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteVpc', params)
|
'Modifies the specified attribute of the specified VPC.
You can only modify one attribute at a time.
:type vpc_id: str
:param vpc_id: The ID of the vpc to be deleted.
:type enable_dns_support: bool
:param enable_dns_support: Specifies whether the DNS server
provided by Amazon is enabled for the VPC.
:type enable_dns_ho... | def modify_vpc_attribute(self, vpc_id, enable_dns_support=None, enable_dns_hostnames=None, dry_run=False):
| params = {'VpcId': vpc_id}
if (enable_dns_support is not None):
if enable_dns_support:
params['EnableDnsSupport.Value'] = 'true'
else:
params['EnableDnsSupport.Value'] = 'false'
if (enable_dns_hostnames is not None):
if enable_dns_hostnames:
params... |
'Retrieve information about your routing tables. You can filter results
to return information only about those route tables that match your
search parameters. Otherwise, all route tables associated with your
account are returned.
:type route_table_ids: list
:param route_table_ids: A list of strings with the desired rou... | def get_all_route_tables(self, route_table_ids=None, filters=None, dry_run=False):
| params = {}
if route_table_ids:
self.build_list_params(params, route_table_ids, 'RouteTableId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeRouteTables', params, [('item', RouteTable)])
|
'Associates a route table with a specific subnet.
:type route_table_id: str
:param route_table_id: The ID of the route table to associate.
:type subnet_id: str
:param subnet_id: The ID of the subnet to associate with.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: str
... | def associate_route_table(self, route_table_id, subnet_id, dry_run=False):
| params = {'RouteTableId': route_table_id, 'SubnetId': subnet_id}
if dry_run:
params['DryRun'] = 'true'
result = self.get_object('AssociateRouteTable', params, ResultSet)
return result.associationId
|
'Removes an association from a route table. This will cause all subnets
that would\'ve used this association to now use the main routing
association instead.
:type association_id: str
:param association_id: The ID of the association to disassociate.
:type dry_run: bool
:param dry_run: Set to True if the operation shoul... | def disassociate_route_table(self, association_id, dry_run=False):
| params = {'AssociationId': association_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DisassociateRouteTable', params)
|
'Creates a new route table.
:type vpc_id: str
:param vpc_id: The VPC ID to associate this route table with.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: The newly created route table
:return: A :class:`boto.vpc.routetable.RouteTable` object'
| def create_route_table(self, vpc_id, dry_run=False):
| params = {'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateRouteTable', params, RouteTable)
|
'Delete a route table.
:type route_table_id: str
:param route_table_id: The ID of the route table to delete.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_route_table(self, route_table_id, dry_run=False):
| params = {'RouteTableId': route_table_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteRouteTable', params)
|
'Helper function for replace_route_table_association and
replace_route_table_association_with_assoc. Should not be used directly.
:type association_id: str
:param association_id: The ID of the existing association to replace.
:type route_table_id: str
:param route_table_id: The route table to ID to be used in the
assoc... | def _replace_route_table_association(self, association_id, route_table_id, dry_run=False):
| params = {'AssociationId': association_id, 'RouteTableId': route_table_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_object('ReplaceRouteTableAssociation', params, ResultSet)
|
'Replaces a route association with a new route table. This can be
used to replace the \'main\' route table by using the main route
table association instead of the more common subnet type
association.
NOTE: It may be better to use replace_route_table_association_with_assoc
instead of this function; this function does ... | def replace_route_table_assocation(self, association_id, route_table_id, dry_run=False):
| return self._replace_route_table_association(association_id, route_table_id, dry_run=dry_run).status
|
'Replaces a route association with a new route table. This can be
used to replace the \'main\' route table by using the main route
table association instead of the more common subnet type
association. Returns the new association ID.
:type association_id: str
:param association_id: The ID of the existing association to... | def replace_route_table_association_with_assoc(self, association_id, route_table_id, dry_run=False):
| return self._replace_route_table_association(association_id, route_table_id, dry_run=dry_run).newAssociationId
|
'Creates a new route in the route table within a VPC. The route\'s target
can be either a gateway attached to the VPC or a NAT instance in the
VPC.
:type route_table_id: str
:param route_table_id: The ID of the route table for the route.
:type destination_cidr_block: str
:param destination_cidr_block: The CIDR address ... | def create_route(self, route_table_id, destination_cidr_block, gateway_id=None, instance_id=None, interface_id=None, vpc_peering_connection_id=None, dry_run=False):
| params = {'RouteTableId': route_table_id, 'DestinationCidrBlock': destination_cidr_block}
if (gateway_id is not None):
params['GatewayId'] = gateway_id
elif (instance_id is not None):
params['InstanceId'] = instance_id
elif (interface_id is not None):
params['NetworkInterfaceId']... |
'Replaces an existing route within a route table in a VPC.
:type route_table_id: str
:param route_table_id: The ID of the route table for the route.
:type destination_cidr_block: str
:param destination_cidr_block: The CIDR address block used for the
destination match.
:type gateway_id: str
:param gateway_id: The ID of ... | def replace_route(self, route_table_id, destination_cidr_block, gateway_id=None, instance_id=None, interface_id=None, vpc_peering_connection_id=None, dry_run=False):
| params = {'RouteTableId': route_table_id, 'DestinationCidrBlock': destination_cidr_block}
if (gateway_id is not None):
params['GatewayId'] = gateway_id
elif (instance_id is not None):
params['InstanceId'] = instance_id
elif (interface_id is not None):
params['NetworkInterfaceId']... |
'Deletes a route from a route table within a VPC.
:type route_table_id: str
:param route_table_id: The ID of the route table with the route.
:type destination_cidr_block: str
:param destination_cidr_block: The CIDR address block used for
destination match.
:type dry_run: bool
:param dry_run: Set to True if the operatio... | def delete_route(self, route_table_id, destination_cidr_block, dry_run=False):
| params = {'RouteTableId': route_table_id, 'DestinationCidrBlock': destination_cidr_block}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteRoute', params)
|
'Retrieve information about your network acls. You can filter results
to return information only about those network acls that match your
search parameters. Otherwise, all network acls associated with your
account are returned.
:type network_acl_ids: list
:param network_acl_ids: A list of strings with the desired netwo... | def get_all_network_acls(self, network_acl_ids=None, filters=None):
| params = {}
if network_acl_ids:
self.build_list_params(params, network_acl_ids, 'NetworkAclId')
if filters:
self.build_filter_params(params, filters)
return self.get_list('DescribeNetworkAcls', params, [('item', NetworkAcl)])
|
'Associates a network acl with a specific subnet.
:type network_acl_id: str
:param network_acl_id: The ID of the network ACL to associate.
:type subnet_id: str
:param subnet_id: The ID of the subnet to associate with.
:rtype: str
:return: The ID of the association created'
| def associate_network_acl(self, network_acl_id, subnet_id):
| acl = self.get_all_network_acls(filters=[('association.subnet-id', subnet_id)])[0]
association = [association for association in acl.associations if (association.subnet_id == subnet_id)][0]
params = {'AssociationId': association.id, 'NetworkAclId': network_acl_id}
result = self.get_object('ReplaceNetwor... |
'Figures out what the default ACL is for the VPC, and associates
current network ACL with the default.
:type subnet_id: str
:param subnet_id: The ID of the subnet to which the ACL belongs.
:type vpc_id: str
:param vpc_id: The ID of the VPC to which the ACL/subnet belongs. Queries EC2 if omitted.
:rtype: str
:return: Th... | def disassociate_network_acl(self, subnet_id, vpc_id=None):
| if (not vpc_id):
vpc_id = self.get_all_subnets([subnet_id])[0].vpc_id
acls = self.get_all_network_acls(filters=[('vpc-id', vpc_id), ('default', 'true')])
default_acl_id = acls[0].id
return self.associate_network_acl(default_acl_id, subnet_id)
|
'Creates a new network ACL.
:type vpc_id: str
:param vpc_id: The VPC ID to associate this network ACL with.
:rtype: The newly created network ACL
:return: A :class:`boto.vpc.networkacl.NetworkAcl` object'
| def create_network_acl(self, vpc_id):
| params = {'VpcId': vpc_id}
return self.get_object('CreateNetworkAcl', params, NetworkAcl)
|
'Delete a network ACL
:type network_acl_id: str
:param network_acl_id: The ID of the network_acl to delete.
:rtype: bool
:return: True if successful'
| def delete_network_acl(self, network_acl_id):
| params = {'NetworkAclId': network_acl_id}
return self.get_status('DeleteNetworkAcl', params)
|
'Creates a new network ACL entry in a network ACL within a VPC.
:type network_acl_id: str
:param network_acl_id: The ID of the network ACL for this network ACL entry.
:type rule_number: int
:param rule_number: The rule number to assign to the entry (for example, 100).
:type protocol: int
:param protocol: Valid values: ... | def create_network_acl_entry(self, network_acl_id, rule_number, protocol, rule_action, cidr_block, egress=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None):
| params = {'NetworkAclId': network_acl_id, 'RuleNumber': rule_number, 'Protocol': protocol, 'RuleAction': rule_action, 'CidrBlock': cidr_block}
if (egress is not None):
if isinstance(egress, bool):
egress = str(egress).lower()
params['Egress'] = egress
if (icmp_code is not None):
... |
'Creates a new network ACL entry in a network ACL within a VPC.
:type network_acl_id: str
:param network_acl_id: The ID of the network ACL for the id you want to replace
:type rule_number: int
:param rule_number: The rule number that you want to replace(for example, 100).
:type protocol: int
:param protocol: Valid valu... | def replace_network_acl_entry(self, network_acl_id, rule_number, protocol, rule_action, cidr_block, egress=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None):
| params = {'NetworkAclId': network_acl_id, 'RuleNumber': rule_number, 'Protocol': protocol, 'RuleAction': rule_action, 'CidrBlock': cidr_block}
if (egress is not None):
if isinstance(egress, bool):
egress = str(egress).lower()
params['Egress'] = egress
if (icmp_code is not None):
... |
'Deletes a network ACL entry from a network ACL within a VPC.
:type network_acl_id: str
:param network_acl_id: The ID of the network ACL with the network ACL entry.
:type rule_number: int
:param rule_number: The rule number for the entry to delete.
:type egress: bool
:param egress: Specifies whether the rule to delete ... | def delete_network_acl_entry(self, network_acl_id, rule_number, egress=None):
| params = {'NetworkAclId': network_acl_id, 'RuleNumber': rule_number}
if (egress is not None):
if isinstance(egress, bool):
egress = str(egress).lower()
params['Egress'] = egress
return self.get_status('DeleteNetworkAclEntry', params)
|
'Get a list of internet gateways. You can filter results to return information
about only those gateways that you\'re interested in.
:type internet_gateway_ids: list
:param internet_gateway_ids: A list of strings with the desired gateway IDs.
:type filters: list of tuples or dict
:param filters: A list of tuples or dic... | def get_all_internet_gateways(self, internet_gateway_ids=None, filters=None, dry_run=False):
| params = {}
if internet_gateway_ids:
self.build_list_params(params, internet_gateway_ids, 'InternetGatewayId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeInternetGateways', params, [('item', Intern... |
'Creates an internet gateway for VPC.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: Newly created internet gateway.
:return: `boto.vpc.internetgateway.InternetGateway`'
| def create_internet_gateway(self, dry_run=False):
| params = {}
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateInternetGateway', params, InternetGateway)
|
'Deletes an internet gateway from the VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: Bool
:return: True if successful'
| def delete_internet_gateway(self, internet_gateway_id, dry_run=False):
| params = {'InternetGatewayId': internet_gateway_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteInternetGateway', params)
|
'Attach an internet gateway to a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to attach.
:type vpc_id: str
:param vpc_id: The ID of the VPC to attach to.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: Bool
:ret... | def attach_internet_gateway(self, internet_gateway_id, vpc_id, dry_run=False):
| params = {'InternetGatewayId': internet_gateway_id, 'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('AttachInternetGateway', params)
|
'Detach an internet gateway from a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to detach.
:type vpc_id: str
:param vpc_id: The ID of the VPC to attach to.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: Bool
:r... | def detach_internet_gateway(self, internet_gateway_id, vpc_id, dry_run=False):
| params = {'InternetGatewayId': internet_gateway_id, 'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DetachInternetGateway', params)
|
'Retrieve information about your CustomerGateways. You can filter
results to return information only about those CustomerGateways that
match your search parameters. Otherwise, all CustomerGateways
associated with your account are returned.
:type customer_gateway_ids: list
:param customer_gateway_ids: A list of string... | def get_all_customer_gateways(self, customer_gateway_ids=None, filters=None, dry_run=False):
| params = {}
if customer_gateway_ids:
self.build_list_params(params, customer_gateway_ids, 'CustomerGatewayId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeCustomerGateways', params, [('item', Custom... |
'Create a new Customer Gateway
:type type: str
:param type: Type of VPN Connection. Only valid value currently is \'ipsec.1\'
:type ip_address: str
:param ip_address: Internet-routable IP address for customer\'s gateway.
Must be a static address.
:type bgp_asn: int
:param bgp_asn: Customer gateway\'s Border Gateway Pr... | def create_customer_gateway(self, type, ip_address, bgp_asn, dry_run=False):
| params = {'Type': type, 'IpAddress': ip_address, 'BgpAsn': bgp_asn}
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateCustomerGateway', params, CustomerGateway)
|
'Delete a Customer Gateway.
:type customer_gateway_id: str
:param customer_gateway_id: The ID of the customer_gateway to be deleted.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_customer_gateway(self, customer_gateway_id, dry_run=False):
| params = {'CustomerGatewayId': customer_gateway_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteCustomerGateway', params)
|
'Retrieve information about your VpnGateways. You can filter results to
return information only about those VpnGateways that match your search
parameters. Otherwise, all VpnGateways associated with your account
are returned.
:type vpn_gateway_ids: list
:param vpn_gateway_ids: A list of strings with the desired VpnGat... | def get_all_vpn_gateways(self, vpn_gateway_ids=None, filters=None, dry_run=False):
| params = {}
if vpn_gateway_ids:
self.build_list_params(params, vpn_gateway_ids, 'VpnGatewayId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeVpnGateways', params, [('item', VpnGateway)])
|
'Create a new Vpn Gateway
:type type: str
:param type: Type of VPN Connection. Only valid value currently is \'ipsec.1\'
:type availability_zone: str
:param availability_zone: The Availability Zone where you want the VPN gateway.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.... | def create_vpn_gateway(self, type, availability_zone=None, dry_run=False):
| params = {'Type': type}
if availability_zone:
params['AvailabilityZone'] = availability_zone
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateVpnGateway', params, VpnGateway)
|
'Delete a Vpn Gateway.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the vpn_gateway to be deleted.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_vpn_gateway(self, vpn_gateway_id, dry_run=False):
| params = {'VpnGatewayId': vpn_gateway_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteVpnGateway', params)
|
'Attaches a VPN gateway to a VPC.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the vpn_gateway to attach
:type vpc_id: str
:param vpc_id: The ID of the VPC you want to attach the gateway to.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: An attachment
:re... | def attach_vpn_gateway(self, vpn_gateway_id, vpc_id, dry_run=False):
| params = {'VpnGatewayId': vpn_gateway_id, 'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_object('AttachVpnGateway', params, Attachment)
|
'Detaches a VPN gateway from a VPC.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the vpn_gateway to detach
:type vpc_id: str
:param vpc_id: The ID of the VPC you want to detach the gateway from.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return:... | def detach_vpn_gateway(self, vpn_gateway_id, vpc_id, dry_run=False):
| params = {'VpnGatewayId': vpn_gateway_id, 'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DetachVpnGateway', params)
|
'Retrieve information about your Subnets. You can filter results to
return information only about those Subnets that match your search
parameters. Otherwise, all Subnets associated with your account
are returned.
:type subnet_ids: list
:param subnet_ids: A list of strings with the desired Subnet ID\'s
:type filters: ... | def get_all_subnets(self, subnet_ids=None, filters=None, dry_run=False):
| params = {}
if subnet_ids:
self.build_list_params(params, subnet_ids, 'SubnetId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeSubnets', params, [('item', Subnet)])
|
'Create a new Subnet
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to cover.
:type availability_zone: str
:param availability_zone: The AZ you want the subnet in
:type dry_run: bool
:param dry_run: Set ... | def create_subnet(self, vpc_id, cidr_block, availability_zone=None, dry_run=False):
| params = {'VpcId': vpc_id, 'CidrBlock': cidr_block}
if availability_zone:
params['AvailabilityZone'] = availability_zone
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateSubnet', params, Subnet)
|
'Delete a subnet.
:type subnet_id: str
:param subnet_id: The ID of the subnet to be deleted.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_subnet(self, subnet_id, dry_run=False):
| params = {'SubnetId': subnet_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteSubnet', params)
|
'Retrieve information about your DhcpOptions.
:type dhcp_options_ids: list
:param dhcp_options_ids: A list of strings with the desired DhcpOption ID\'s
:type filters: list of tuples or dict
:param filters: A list of tuples or dict containing filters. Each tuple
or dict item consists of a filter key and a filter value.... | def get_all_dhcp_options(self, dhcp_options_ids=None, filters=None, dry_run=False):
| params = {}
if dhcp_options_ids:
self.build_list_params(params, dhcp_options_ids, 'DhcpOptionsId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeDhcpOptions', params, [('item', DhcpOptions)])
|
'Create a new DhcpOption
This corresponds to
http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateDhcpOptions.html
:type domain_name: str
:param domain_name: A domain name of your choice (for example,
example.com)
:type domain_name_servers: list of strings
:param domain_name_servers: Th... | def create_dhcp_options(self, domain_name=None, domain_name_servers=None, ntp_servers=None, netbios_name_servers=None, netbios_node_type=None, dry_run=False):
| key_counter = 1
params = {}
def insert_option(params, name, value):
params[('DhcpConfiguration.%d.Key' % (key_counter,))] = name
if isinstance(value, (list, tuple)):
for (idx, value) in enumerate(value, 1):
key_name = ('DhcpConfiguration.%d.Value.%d' % (key_counte... |
'Delete a DHCP Options
:type dhcp_options_id: str
:param dhcp_options_id: The ID of the DHCP Options to be deleted.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_dhcp_options(self, dhcp_options_id, dry_run=False):
| params = {'DhcpOptionsId': dhcp_options_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteDhcpOptions', params)
|
'Associate a set of Dhcp Options with a VPC.
:type dhcp_options_id: str
:param dhcp_options_id: The ID of the Dhcp Options
:type vpc_id: str
:param vpc_id: The ID of the VPC.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def associate_dhcp_options(self, dhcp_options_id, vpc_id, dry_run=False):
| params = {'DhcpOptionsId': dhcp_options_id, 'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('AssociateDhcpOptions', params)
|
'Retrieve information about your VPN_CONNECTIONs. You can filter results to
return information only about those VPN_CONNECTIONs that match your search
parameters. Otherwise, all VPN_CONNECTIONs associated with your account
are returned.
:type vpn_connection_ids: list
:param vpn_connection_ids: A list of strings with ... | def get_all_vpn_connections(self, vpn_connection_ids=None, filters=None, dry_run=False):
| params = {}
if vpn_connection_ids:
self.build_list_params(params, vpn_connection_ids, 'VpnConnectionId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeVpnConnections', params, [('item', VpnConnection)... |
'Create a new VPN Connection.
:type type: str
:param type: The type of VPN Connection. Currently only \'ipsec.1\'
is supported
:type customer_gateway_id: str
:param customer_gateway_id: The ID of the customer gateway.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the VPN gateway.
:type static_routes_only:... | def create_vpn_connection(self, type, customer_gateway_id, vpn_gateway_id, static_routes_only=None, dry_run=False):
| params = {'Type': type, 'CustomerGatewayId': customer_gateway_id, 'VpnGatewayId': vpn_gateway_id}
if (static_routes_only is not None):
if isinstance(static_routes_only, bool):
static_routes_only = str(static_routes_only).lower()
params['Options.StaticRoutesOnly'] = static_routes_only... |
'Delete a VPN Connection.
:type vpn_connection_id: str
:param vpn_connection_id: The ID of the vpn_connection to be deleted.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def delete_vpn_connection(self, vpn_connection_id, dry_run=False):
| params = {'VpnConnectionId': vpn_connection_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteVpnConnection', params)
|
'Disables a virtual private gateway (VGW) from propagating routes to the
routing tables of an Amazon VPC.
:type route_table_id: str
:param route_table_id: The ID of the routing table.
:type gateway_id: str
:param gateway_id: The ID of the virtual private gateway.
:type dry_run: bool
:param dry_run: Set to True if the o... | def disable_vgw_route_propagation(self, route_table_id, gateway_id, dry_run=False):
| params = {'RouteTableId': route_table_id, 'GatewayId': gateway_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DisableVgwRoutePropagation', params)
|
'Enables a virtual private gateway (VGW) to propagate routes to the
routing tables of an Amazon VPC.
:type route_table_id: str
:param route_table_id: The ID of the routing table.
:type gateway_id: str
:param gateway_id: The ID of the virtual private gateway.
:type dry_run: bool
:param dry_run: Set to True if the operat... | def enable_vgw_route_propagation(self, route_table_id, gateway_id, dry_run=False):
| params = {'RouteTableId': route_table_id, 'GatewayId': gateway_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('EnableVgwRoutePropagation', params)
|
'Creates a new static route associated with a VPN connection between an
existing virtual private gateway and a VPN customer gateway. The static
route allows traffic to be routed from the virtual private gateway to
the VPN customer gateway.
:type destination_cidr_block: str
:param destination_cidr_block: The CIDR block ... | def create_vpn_connection_route(self, destination_cidr_block, vpn_connection_id, dry_run=False):
| params = {'DestinationCidrBlock': destination_cidr_block, 'VpnConnectionId': vpn_connection_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('CreateVpnConnectionRoute', params)
|
'Deletes a static route associated with a VPN connection between an
existing virtual private gateway and a VPN customer gateway. The static
route allows traffic to be routed from the virtual private gateway to
the VPN customer gateway.
:type destination_cidr_block: str
:param destination_cidr_block: The CIDR block asso... | def delete_vpn_connection_route(self, destination_cidr_block, vpn_connection_id, dry_run=False):
| params = {'DestinationCidrBlock': destination_cidr_block, 'VpnConnectionId': vpn_connection_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteVpnConnectionRoute', params)
|
'Retrieve information about your VPC peering connections. You
can filter results to return information only about those VPC
peering connections that match your search parameters.
Otherwise, all VPC peering connections associated with your
account are returned.
:type vpc_peering_connection_ids: list
:param vpc_peering_c... | def get_all_vpc_peering_connections(self, vpc_peering_connection_ids=None, filters=None, dry_run=False):
| params = {}
if vpc_peering_connection_ids:
self.build_list_params(params, vpc_peering_connection_ids, 'VpcPeeringConnectionId')
if filters:
self.build_filter_params(params, dict(filters))
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeVpcPeeringConnection... |
'Create a new VPN Peering connection.
:type vpc_id: str
:param vpc_id: The ID of the requester VPC.
:type peer_vpc_id: str
:param vpc_peer_id: The ID of the VPC with which you are creating the peering connection.
:type peer_owner_id: str
:param peer_owner_id: The AWS account ID of the owner of the peer VPC.
:rtype: The... | def create_vpc_peering_connection(self, vpc_id, peer_vpc_id, peer_owner_id=None, dry_run=False):
| params = {'VpcId': vpc_id, 'PeerVpcId': peer_vpc_id}
if (peer_owner_id is not None):
params['PeerOwnerId'] = peer_owner_id
if dry_run:
params['DryRun'] = 'true'
return self.get_object('CreateVpcPeeringConnection', params, VpcPeeringConnection)
|
'Deletes a VPC peering connection. Either the owner of the requester
VPC or the owner of the peer VPC can delete the VPC peering connection
if it\'s in the active state. The owner of the requester VPC can delete
a VPC peering connection in the pending-acceptance state.
:type vpc_peering_connection_id: str
:param vpc_pe... | def delete_vpc_peering_connection(self, vpc_peering_connection_id, dry_run=False):
| params = {'VpcPeeringConnectionId': vpc_peering_connection_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DeleteVpcPeeringConnection', params)
|
'Rejects a VPC peering connection request. The VPC peering connection
must be in the pending-acceptance state.
:type vpc_peering_connection_id: str
:param vpc_peering_connection_id: The ID of the VPC peering connection.
:rtype: bool
:return: True if successful'
| def reject_vpc_peering_connection(self, vpc_peering_connection_id, dry_run=False):
| params = {'VpcPeeringConnectionId': vpc_peering_connection_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('RejectVpcPeeringConnection', params)
|
'Acceptss a VPC peering connection request. The VPC peering connection
must be in the pending-acceptance state.
:type vpc_peering_connection_id: str
:param vpc_peering_connection_id: The ID of the VPC peering connection.
:rtype: Accepted VpcPeeringConnection
:return: A :class:`boto.vpc.vpc_peering_connection.VpcPeering... | def accept_vpc_peering_connection(self, vpc_peering_connection_id, dry_run=False):
| params = {'VpcPeeringConnectionId': vpc_peering_connection_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_object('AcceptVpcPeeringConnection', params, VpcPeeringConnection)
|
'Describes the ClassicLink status of one or more VPCs.
:type vpc_ids: list
:param vpc_ids: A list of strings with the desired VPC ID\'s
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:type filters: list of tuples or dict
:param filters: A list of tuples or dict containing filt... | def get_all_classic_link_vpcs(self, vpc_ids=None, filters=None, dry_run=False):
| params = {}
if vpc_ids:
self.build_list_params(params, vpc_ids, 'VpcId')
if filters:
self.build_filter_params(params, filters)
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeVpcClassicLink', params, [('item', VPC)], verb='POST')
|
'Links an EC2-Classic instance to a ClassicLink-enabled VPC through one
or more of the VPC\'s security groups. You cannot link an EC2-Classic
instance to more than one VPC at a time. You can only link an instance
that\'s in the running state. An instance is automatically unlinked from
a VPC when it\'s stopped. You can... | def attach_classic_link_vpc(self, vpc_id, instance_id, groups, dry_run=False):
| params = {'VpcId': vpc_id, 'InstanceId': instance_id}
if dry_run:
params['DryRun'] = 'true'
l = []
for group in groups:
if hasattr(group, 'id'):
l.append(group.id)
else:
l.append(group)
self.build_list_params(params, l, 'SecurityGroupId')
return se... |
'Unlinks a linked EC2-Classic instance from a VPC. After the instance
has been unlinked, the VPC security groups are no longer associated
with it. An instance is automatically unlinked from a VPC when
it\'s stopped.
:type vpc_id: str
:param vpc_id: The ID of the instance to unlink from the VPC.
:type intance_id: str
:p... | def detach_classic_link_vpc(self, vpc_id, instance_id, dry_run=False):
| params = {'VpcId': vpc_id, 'InstanceId': instance_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DetachClassicLinkVpc', params)
|
'Disables ClassicLink for a VPC. You cannot disable ClassicLink for a
VPC that has EC2-Classic instances linked to it.
:type vpc_id: str
:param vpc_id: The ID of the VPC.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def disable_vpc_classic_link(self, vpc_id, dry_run=False):
| params = {'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('DisableVpcClassicLink', params)
|
'Enables a VPC for ClassicLink. You can then link EC2-Classic instances
to your ClassicLink-enabled VPC to allow communication over private IP
addresses. You cannot enable your VPC for ClassicLink if any of your
VPC\'s route tables have existing routes for address ranges within the
10.0.0.0/8 IP address range, excludin... | def enable_vpc_classic_link(self, vpc_id, dry_run=False):
| params = {'VpcId': vpc_id}
if dry_run:
params['DryRun'] = 'true'
return self.get_status('EnableVpcClassicLink', params)
|
'Represents a VPC.
:ivar id: The unique ID of the VPC.
:ivar dhcp_options_id: The ID of the set of DHCP options you\'ve associated with the VPC
(or default if the default options are associated with the VPC).
:ivar state: The current state of the VPC.
:ivar cidr_block: The CIDR block for the VPC.
:ivar is_default: Indi... | def __init__(self, connection=None):
| super(VPC, self).__init__(connection)
self.id = None
self.dhcp_options_id = None
self.state = None
self.cidr_block = None
self.is_default = None
self.instance_tenancy = None
self.classic_link_enabled = None
|
'Updates instance\'s classic_link_enabled attribute
:rtype: bool
:return: self.classic_link_enabled after update has occurred.'
| def update_classic_link_enabled(self, validate=False, dry_run=False):
| self._get_status_then_update_vpc(self.connection.get_all_classic_link_vpcs, validate=validate, dry_run=dry_run)
return self.classic_link_enabled
|
'Disables ClassicLink for a VPC. You cannot disable ClassicLink for a
VPC that has EC2-Classic instances linked to it.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: bool
:return: True if successful'
| def disable_classic_link(self, dry_run=False):
| return self.connection.disable_vpc_classic_link(self.id, dry_run=dry_run)
|
'Enables a VPC for ClassicLink. You can then link EC2-Classic instances
to your ClassicLink-enabled VPC to allow communication over private IP
addresses. You cannot enable your VPC for ClassicLink if any of your
VPC\'s route tables have existing routes for address ranges within the
10.0.0.0/8 IP address range, excludin... | def enable_classic_link(self, dry_run=False):
| return self.connection.enable_vpc_classic_link(self.id, dry_run=dry_run)
|
'Links an EC2-Classic instance to a ClassicLink-enabled VPC through one
or more of the VPC\'s security groups. You cannot link an EC2-Classic
instance to more than one VPC at a time. You can only link an instance
that\'s in the running state. An instance is automatically unlinked from
a VPC when it\'s stopped. You can... | def attach_classic_instance(self, instance_id, groups, dry_run=False):
| return self.connection.attach_classic_link_vpc(vpc_id=self.id, instance_id=instance_id, groups=groups, dry_run=dry_run)
|
'Unlinks a linked EC2-Classic instance from a VPC. After the instance
has been unlinked, the VPC security groups are no longer associated
with it. An instance is automatically unlinked from a VPC when
it\'s stopped.
:type intance_id: str
:param instance_is: The ID of the VPC to which the instance is linked.
:type dry_r... | def detach_classic_instance(self, instance_id, dry_run=False):
| return self.connection.detach_classic_link_vpc(vpc_id=self.id, instance_id=instance_id, dry_run=dry_run)
|
'Information on peer Vpc.
:ivar id: The unique ID of peer Vpc.
:ivar owner_id: Owner of peer Vpc.
:ivar cidr_block: CIDR Block of peer Vpc.'
| def __init__(self):
| self.vpc_id = None
self.owner_id = None
self.cidr_block = None
|
'Represents a VPC peering connection.
:ivar id: The unique ID of the VPC peering connection.
:ivar accepter_vpc_info: Information on peer Vpc.
:ivar requester_vpc_info: Information on requester Vpc.
:ivar expiration_time: The expiration date and time for the VPC peering connection.
:ivar status_code: The status of the ... | def __init__(self, connection=None):
| super(VpcPeeringConnection, self).__init__(connection)
self.id = None
self.accepter_vpc_info = VpcInfo()
self.requester_vpc_info = VpcInfo()
self.expiration_time = None
self._status = VpcPeeringConnectionStatus()
|
'Returns true if the requested capability is supported by this plugin'
| @classmethod
def is_capable(cls, requested_capability):
| for c in requested_capability:
if (c not in cls.capability):
return False
return True
|
'Returns the AWS object associated with a given option.
The heuristics used are a bit lame. If the option name contains
the word \'bucket\' it is assumed to be an S3 bucket, if the name
contains the word \'queue\' it is assumed to be an SQS queue and
if it contains the word \'domain\' it is assumed to be a SimpleDB
do... | def get_obj(self, name):
| val = self.get(name)
if (not val):
return None
if (name.find('queue') >= 0):
obj = boto.lookup('sqs', val)
if obj:
obj.set_message_class(ServiceMessage)
elif (name.find('bucket') >= 0):
obj = boto.lookup('s3', val)
elif (name.find('domain') >= 0):
... |
'Checks if the specified CNAME is available.
:type cname_prefix: string
:param cname_prefix: The prefix used when this CNAME is
reserved.'
| def check_dns_availability(self, cname_prefix):
| params = {'CNAMEPrefix': cname_prefix}
return self._get_response('CheckDNSAvailability', params)
|
'Creates an application that has one configuration template
named default and no application versions.
:type application_name: string
:param application_name: The name of the application.
Constraint: This name must be unique within your account. If the
specified name already exists, the action returns an
InvalidParamet... | def create_application(self, application_name, description=None):
| params = {'ApplicationName': application_name}
if description:
params['Description'] = description
return self._get_response('CreateApplication', params)
|
'Creates an application version for the specified application.
:type application_name: string
:param application_name: The name of the application. If no
application is found with this name, and AutoCreateApplication is
false, returns an InvalidParameterValue error.
:type version_label: string
:param version_label: A l... | def create_application_version(self, application_name, version_label, description=None, s3_bucket=None, s3_key=None, auto_create_application=None):
| params = {'ApplicationName': application_name, 'VersionLabel': version_label}
if description:
params['Description'] = description
if (s3_bucket and s3_key):
params['SourceBundle.S3Bucket'] = s3_bucket
params['SourceBundle.S3Key'] = s3_key
if auto_create_application:
param... |
'Creates a configuration template.
Templates are associated with a specific application and are used to
deploy different versions of the application with the same
configuration settings.
:type application_name: string
:param application_name: The name of the application to associate with
this configuration template. If... | def create_configuration_template(self, application_name, template_name, solution_stack_name=None, source_configuration_application_name=None, source_configuration_template_name=None, environment_id=None, description=None, option_settings=None):
| params = {'ApplicationName': application_name, 'TemplateName': template_name}
if solution_stack_name:
params['SolutionStackName'] = solution_stack_name
if source_configuration_application_name:
params['SourceConfiguration.ApplicationName'] = source_configuration_application_name
if sourc... |
'Launches an environment for the application using a configuration.
:type application_name: string
:param application_name: The name of the application that contains the
version to be deployed. If no application is found with this name,
CreateEnvironment returns an InvalidParameterValue error.
:type environment_name: ... | def create_environment(self, application_name, environment_name, version_label=None, template_name=None, solution_stack_name=None, cname_prefix=None, description=None, option_settings=None, options_to_remove=None, tier_name=None, tier_type=None, tier_version='1.0'):
| params = {'ApplicationName': application_name, 'EnvironmentName': environment_name}
if version_label:
params['VersionLabel'] = version_label
if template_name:
params['TemplateName'] = template_name
if solution_stack_name:
params['SolutionStackName'] = solution_stack_name
if c... |
'Creates the Amazon S3 storage location for the account. This
location is used to store user log files.
:raises: TooManyBucketsException,
S3SubscriptionRequiredException,
InsufficientPrivilegesException'
| def create_storage_location(self):
| return self._get_response('CreateStorageLocation', params={})
|
'Deletes the specified application along with all associated
versions and configurations. The application versions will not
be deleted from your Amazon S3 bucket.
:type application_name: string
:param application_name: The name of the application to delete.
:type terminate_env_by_force: boolean
:param terminate_env_by_... | def delete_application(self, application_name, terminate_env_by_force=None):
| params = {'ApplicationName': application_name}
if terminate_env_by_force:
params['TerminateEnvByForce'] = self._encode_bool(terminate_env_by_force)
return self._get_response('DeleteApplication', params)
|
'Deletes the specified version from the specified application.
:type application_name: string
:param application_name: The name of the application to delete
releases from.
:type version_label: string
:param version_label: The label of the version to delete.
:type delete_source_bundle: boolean
:param delete_source_bundl... | def delete_application_version(self, application_name, version_label, delete_source_bundle=None):
| params = {'ApplicationName': application_name, 'VersionLabel': version_label}
if delete_source_bundle:
params['DeleteSourceBundle'] = self._encode_bool(delete_source_bundle)
return self._get_response('DeleteApplicationVersion', params)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.