desc
stringlengths
3
26.7k
decl
stringlengths
11
7.89k
bodies
stringlengths
8
553k
'Deletes the specified configuration template. :type application_name: string :param application_name: The name of the application to delete the configuration template from. :type template_name: string :param template_name: The name of the configuration template to delete. :raises: OperationInProgressException'
def delete_configuration_template(self, application_name, template_name):
params = {'ApplicationName': application_name, 'TemplateName': template_name} return self._get_response('DeleteConfigurationTemplate', params)
'Deletes the draft configuration associated with the running environment. Updating a running environment with any configuration changes creates a draft configuration set. You can get the draft configuration using DescribeConfigurationSettings while the update is in progress or if the update fails. The DeploymentStatus...
def delete_environment_configuration(self, application_name, environment_name):
params = {'ApplicationName': application_name, 'EnvironmentName': environment_name} return self._get_response('DeleteEnvironmentConfiguration', params)
'Returns descriptions for existing application versions. :type application_name: string :param application_name: If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include ones that are associated with the specified application. :type version_labels: list :param version_labels: If specified...
def describe_application_versions(self, application_name=None, version_labels=None):
params = {} if application_name: params['ApplicationName'] = application_name if version_labels: self.build_list_params(params, version_labels, 'VersionLabels.member') return self._get_response('DescribeApplicationVersions', params)
'Returns the descriptions of existing applications. :type application_names: list :param application_names: If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names.'
def describe_applications(self, application_names=None):
params = {} if application_names: self.build_list_params(params, application_names, 'ApplicationNames.member') return self._get_response('DescribeApplications', params)
'Describes configuration options used in a template or environment. Describes the configuration options that are used in a particular configuration template or environment, or that a specified solution stack defines. The description includes the values the options, their default values, and an indication of the require...
def describe_configuration_options(self, application_name=None, template_name=None, environment_name=None, solution_stack_name=None, options=None):
params = {} if application_name: params['ApplicationName'] = application_name if template_name: params['TemplateName'] = template_name if environment_name: params['EnvironmentName'] = environment_name if solution_stack_name: params['SolutionStackName'] = solution_stac...
'Returns a description of the settings for the specified configuration set, that is, either a configuration template or the configuration set associated with a running environment. When describing the settings for the configuration set associated with a running environment, it is possible to receive two sets of setting...
def describe_configuration_settings(self, application_name, template_name=None, environment_name=None):
params = {'ApplicationName': application_name} if template_name: params['TemplateName'] = template_name if environment_name: params['EnvironmentName'] = environment_name return self._get_response('DescribeConfigurationSettings', params)
'Returns AWS resources for this environment. :type environment_id: string :param environment_id: The ID of the environment to retrieve AWS resource usage data. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter er...
def describe_environment_resources(self, environment_id=None, environment_name=None):
params = {} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name return self._get_response('DescribeEnvironmentResources', params)
'Returns descriptions for existing environments. :type application_name: string :param application_name: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application. :type version_label: string :param version_label: If specified, AWS Elastic Be...
def describe_environments(self, application_name=None, version_label=None, environment_ids=None, environment_names=None, include_deleted=None, included_deleted_back_to=None):
params = {} if application_name: params['ApplicationName'] = application_name if version_label: params['VersionLabel'] = version_label if environment_ids: self.build_list_params(params, environment_ids, 'EnvironmentIds.member') if environment_names: self.build_list_pa...
'Returns event descriptions matching criteria up to the last 6 weeks. :type application_name: string :param application_name: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those associated with this application. :type version_label: string :param version_label: If specified, AW...
def describe_events(self, application_name=None, version_label=None, template_name=None, environment_id=None, environment_name=None, request_id=None, severity=None, start_time=None, end_time=None, max_records=None, next_token=None):
params = {} if application_name: params['ApplicationName'] = application_name if version_label: params['VersionLabel'] = version_label if template_name: params['TemplateName'] = template_name if environment_id: params['EnvironmentId'] = environment_id if environme...
'Returns a list of the available solution stack names.'
def list_available_solution_stacks(self):
return self._get_response('ListAvailableSolutionStacks', params={})
'Deletes and recreates all of the AWS resources (for example: the Auto Scaling group, load balancer, etc.) for a specified environment and forces a restart. :type environment_id: string :param environment_id: The ID of the environment to rebuild. Condition: You must specify either this or an EnvironmentName, or both. ...
def rebuild_environment(self, environment_id=None, environment_name=None):
params = {} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name return self._get_response('RebuildEnvironment', params)
'Initiates a request to compile the specified type of information of the deployed environment. Setting the InfoType to tail compiles the last lines from the application server log files of every Amazon EC2 instance in your environment. Use RetrieveEnvironmentInfo to access the compiled information. :type info_type: st...
def request_environment_info(self, info_type='tail', environment_id=None, environment_name=None):
params = {'InfoType': info_type} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name return self._get_response('RequestEnvironmentInfo', params)
'Causes the environment to restart the application container server running on each Amazon EC2 instance. :type environment_id: string :param environment_id: The ID of the environment to restart the server for. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Ela...
def restart_app_server(self, environment_id=None, environment_name=None):
params = {} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name return self._get_response('RestartAppServer', params)
'Retrieves the compiled information from a RequestEnvironmentInfo request. :type info_type: string :param info_type: The type of information to retrieve. :type environment_id: string :param environment_id: The ID of the data\'s environment. If no such environment is found, returns an InvalidParameterValue error. Condit...
def retrieve_environment_info(self, info_type='tail', environment_id=None, environment_name=None):
params = {'InfoType': info_type} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name return self._get_response('RetrieveEnvironmentInfo', params)
'Swaps the CNAMEs of two environments. :type source_environment_id: string :param source_environment_id: The ID of the source environment. Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the De...
def swap_environment_cnames(self, source_environment_id=None, source_environment_name=None, destination_environment_id=None, destination_environment_name=None):
params = {} if source_environment_id: params['SourceEnvironmentId'] = source_environment_id if source_environment_name: params['SourceEnvironmentName'] = source_environment_name if destination_environment_id: params['DestinationEnvironmentId'] = destination_environment_id if ...
'Terminates the specified environment. :type environment_id: string :param environment_id: The ID of the environment to terminate. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error. :type environment_name: ...
def terminate_environment(self, environment_id=None, environment_name=None, terminate_resources=None):
params = {} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name if terminate_resources: params['TerminateResources'] = self._encode_bool(terminate_resources) return self._get_response('TerminateEnvironm...
'Updates the specified application to have the specified properties. :type application_name: string :param application_name: The name of the application to update. If no such application is found, UpdateApplication returns an InvalidParameterValue error. :type description: string :param description: A new description f...
def update_application(self, application_name, description=None):
params = {'ApplicationName': application_name} if description: params['Description'] = description return self._get_response('UpdateApplication', params)
'Updates the application version to have the properties. :type application_name: string :param application_name: The name of the application associated with this version. If no application is found with this name, UpdateApplication returns an InvalidParameterValue error. :type version_label: string :param version_labe...
def update_application_version(self, application_name, version_label, description=None):
params = {'ApplicationName': application_name, 'VersionLabel': version_label} if description: params['Description'] = description return self._get_response('UpdateApplicationVersion', params)
'Updates the specified configuration template to have the specified properties or configuration option values. :type application_name: string :param application_name: The name of the application associated with the configuration template to update. If no application is found with this name, UpdateConfigurationTemplate ...
def update_configuration_template(self, application_name, template_name, description=None, option_settings=None, options_to_remove=None):
params = {'ApplicationName': application_name, 'TemplateName': template_name} if description: params['Description'] = description if option_settings: self._build_list_params(params, option_settings, 'OptionSettings.member', ('Namespace', 'OptionName', 'Value')) if options_to_remove: ...
'Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment. Attempting to update both the release and configuration is not allowed and AWS Elastic Beansta...
def update_environment(self, environment_id=None, environment_name=None, version_label=None, template_name=None, description=None, option_settings=None, options_to_remove=None, tier_name=None, tier_type=None, tier_version='1.0'):
params = {} if environment_id: params['EnvironmentId'] = environment_id if environment_name: params['EnvironmentName'] = environment_name if version_label: params['VersionLabel'] = version_label if template_name: params['TemplateName'] = template_name if descripti...
'Takes a set of configuration settings and either a configuration template or environment, and determines whether those values are valid. This action returns a list of messages indicating any errors or warnings associated with the selection of option values. :type application_name: string :param application_name: The ...
def validate_configuration_settings(self, application_name, option_settings, template_name=None, environment_name=None):
params = {'ApplicationName': application_name} self._build_list_params(params, option_settings, 'OptionSettings.member', ('Namespace', 'OptionName', 'Value')) if template_name: params['TemplateName'] = template_name if environment_name: params['EnvironmentName'] = environment_name re...
'Creates a high-availability partition group. A high- availability partition group is a group of partitions that spans multiple physical HSMs. :type label: string :param label: The label of the new high-availability partition group.'
def create_hapg(self, label):
params = {'Label': label} return self.make_request(action='CreateHapg', body=json.dumps(params))
'Creates an uninitialized HSM instance. Running this command provisions an HSM appliance and will result in charges to your AWS account for the HSM. :type subnet_id: string :param subnet_id: The identifier of the subnet in your VPC in which to place the HSM. :type ssh_key: string :param ssh_key: The SSH public key to i...
def create_hsm(self, subnet_id, ssh_key, iam_role_arn, subscription_type, eni_ip=None, external_id=None, client_token=None, syslog_ip=None):
params = {'SubnetId': subnet_id, 'SshKey': ssh_key, 'IamRoleArn': iam_role_arn, 'SubscriptionType': subscription_type} if (eni_ip is not None): params['EniIp'] = eni_ip if (external_id is not None): params['ExternalId'] = external_id if (client_token is not None): params['ClientT...
'Creates an HSM client. :type label: string :param label: The label for the client. :type certificate: string :param certificate: The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.'
def create_luna_client(self, certificate, label=None):
params = {'Certificate': certificate} if (label is not None): params['Label'] = label return self.make_request(action='CreateLunaClient', body=json.dumps(params))
'Deletes a high-availability partition group. :type hapg_arn: string :param hapg_arn: The ARN of the high-availability partition group to delete.'
def delete_hapg(self, hapg_arn):
params = {'HapgArn': hapg_arn} return self.make_request(action='DeleteHapg', body=json.dumps(params))
'Deletes an HSM. Once complete, this operation cannot be undone and your key material cannot be recovered. :type hsm_arn: string :param hsm_arn: The ARN of the HSM to delete.'
def delete_hsm(self, hsm_arn):
params = {'HsmArn': hsm_arn} return self.make_request(action='DeleteHsm', body=json.dumps(params))
'Deletes a client. :type client_arn: string :param client_arn: The ARN of the client to delete.'
def delete_luna_client(self, client_arn):
params = {'ClientArn': client_arn} return self.make_request(action='DeleteLunaClient', body=json.dumps(params))
'Retrieves information about a high-availability partition group. :type hapg_arn: string :param hapg_arn: The ARN of the high-availability partition group to describe.'
def describe_hapg(self, hapg_arn):
params = {'HapgArn': hapg_arn} return self.make_request(action='DescribeHapg', body=json.dumps(params))
'Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number. :type hsm_arn: string :param hsm_arn: The ARN of the HSM. Either the HsmArn or the SerialNumber parameter must be specified. :type hsm_serial_number: string :param hsm_serial_number: The serial number of the HSM. Either the H...
def describe_hsm(self, hsm_arn=None, hsm_serial_number=None):
params = {} if (hsm_arn is not None): params['HsmArn'] = hsm_arn if (hsm_serial_number is not None): params['HsmSerialNumber'] = hsm_serial_number return self.make_request(action='DescribeHsm', body=json.dumps(params))
'Retrieves information about an HSM client. :type client_arn: string :param client_arn: The ARN of the client. :type certificate_fingerprint: string :param certificate_fingerprint: The certificate fingerprint.'
def describe_luna_client(self, client_arn=None, certificate_fingerprint=None):
params = {} if (client_arn is not None): params['ClientArn'] = client_arn if (certificate_fingerprint is not None): params['CertificateFingerprint'] = certificate_fingerprint return self.make_request(action='DescribeLunaClient', body=json.dumps(params))
'Gets the configuration files necessary to connect to all high availability partition groups the client is associated with. :type client_arn: string :param client_arn: The ARN of the client. :type client_version: string :param client_version: The client version. :type hapg_list: list :param hapg_list: A list of ARNs th...
def get_config(self, client_arn, client_version, hapg_list):
params = {'ClientArn': client_arn, 'ClientVersion': client_version, 'HapgList': hapg_list} return self.make_request(action='GetConfig', body=json.dumps(params))
'Lists the Availability Zones that have available AWS CloudHSM capacity.'
def list_available_zones(self):
params = {} return self.make_request(action='ListAvailableZones', body=json.dumps(params))
'Lists the high-availability partition groups for the account. This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListHapgs to retrieve the next set of items. :type next_token: st...
def list_hapgs(self, next_token=None):
params = {} if (next_token is not None): params['NextToken'] = next_token return self.make_request(action='ListHapgs', body=json.dumps(params))
'Retrieves the identifiers of all of the HSMs provisioned for the current customer. This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListHsms to retrieve the next set of items. ...
def list_hsms(self, next_token=None):
params = {} if (next_token is not None): params['NextToken'] = next_token return self.make_request(action='ListHsms', body=json.dumps(params))
'Lists all of the clients. This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListLunaClients to retrieve the next set of items. :type next_token: string :param next_token: The Ne...
def list_luna_clients(self, next_token=None):
params = {} if (next_token is not None): params['NextToken'] = next_token return self.make_request(action='ListLunaClients', body=json.dumps(params))
'Modifies an existing high-availability partition group. :type hapg_arn: string :param hapg_arn: The ARN of the high-availability partition group to modify. :type label: string :param label: The new label for the high-availability partition group. :type partition_serial_list: list :param partition_serial_list: The list...
def modify_hapg(self, hapg_arn, label=None, partition_serial_list=None):
params = {'HapgArn': hapg_arn} if (label is not None): params['Label'] = label if (partition_serial_list is not None): params['PartitionSerialList'] = partition_serial_list return self.make_request(action='ModifyHapg', body=json.dumps(params))
'Modifies an HSM. :type hsm_arn: string :param hsm_arn: The ARN of the HSM to modify. :type subnet_id: string :param subnet_id: The new identifier of the subnet that the HSM is in. :type eni_ip: string :param eni_ip: The new IP address for the elastic network interface attached to the HSM. :type iam_role_arn: string :p...
def modify_hsm(self, hsm_arn, subnet_id=None, eni_ip=None, iam_role_arn=None, external_id=None, syslog_ip=None):
params = {'HsmArn': hsm_arn} if (subnet_id is not None): params['SubnetId'] = subnet_id if (eni_ip is not None): params['EniIp'] = eni_ip if (iam_role_arn is not None): params['IamRoleArn'] = iam_role_arn if (external_id is not None): params['ExternalId'] = external_i...
'Modifies the certificate used by the client. This action can potentially start a workflow to install the new certificate on the client\'s HSMs. :type client_arn: string :param client_arn: The ARN of the client. :type certificate: string :param certificate: The new certificate for the client.'
def modify_luna_client(self, client_arn, certificate):
params = {'ClientArn': client_arn, 'Certificate': certificate} return self.make_request(action='ModifyLunaClient', body=json.dumps(params))
'The AuthorizeCacheSecurityGroupIngress operation allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization mechanism. You cannot authorize ingress from an Amazon EC2 security group in one Region to an Ela...
def authorize_cache_security_group_ingress(self, cache_security_group_name, ec2_security_group_name, ec2_security_group_owner_id):
params = {'CacheSecurityGroupName': cache_security_group_name, 'EC2SecurityGroupName': ec2_security_group_name, 'EC2SecurityGroupOwnerId': ec2_security_group_owner_id} return self._make_request(action='AuthorizeCacheSecurityGroupIngress', verb='POST', path='/', params=params)
'The CreateCacheCluster operation creates a new cache cluster. All nodes in the cache cluster run the same protocol-compliant cache engine software - either Memcached or Redis. :type cache_cluster_id: string :param cache_cluster_id: The cache cluster identifier. This parameter is stored as a lowercase string. Constrain...
def create_cache_cluster(self, cache_cluster_id, num_cache_nodes=None, cache_node_type=None, engine=None, replication_group_id=None, engine_version=None, cache_parameter_group_name=None, cache_subnet_group_name=None, cache_security_group_names=None, security_group_ids=None, snapshot_arns=None, preferred_availability_zo...
params = {'CacheClusterId': cache_cluster_id} if (num_cache_nodes is not None): params['NumCacheNodes'] = num_cache_nodes if (cache_node_type is not None): params['CacheNodeType'] = cache_node_type if (engine is not None): params['Engine'] = engine if (replication_group_id is...
'The CreateCacheParameterGroup operation creates a new cache parameter group. A cache parameter group is a collection of parameters that you apply to all of the nodes in a cache cluster. :type cache_parameter_group_name: string :param cache_parameter_group_name: A user-specified name for the cache parameter group. :typ...
def create_cache_parameter_group(self, cache_parameter_group_name, cache_parameter_group_family, description):
params = {'CacheParameterGroupName': cache_parameter_group_name, 'CacheParameterGroupFamily': cache_parameter_group_family, 'Description': description} return self._make_request(action='CreateCacheParameterGroup', verb='POST', path='/', params=params)
'The CreateCacheSecurityGroup operation creates a new cache security group. Use a cache security group to control access to one or more cache clusters. Cache security groups are only used when you are creating a cluster outside of an Amazon Virtual Private Cloud (VPC). If you are creating a cluster inside of a VPC, use...
def create_cache_security_group(self, cache_security_group_name, description):
params = {'CacheSecurityGroupName': cache_security_group_name, 'Description': description} return self._make_request(action='CreateCacheSecurityGroup', verb='POST', path='/', params=params)
'The CreateCacheSubnetGroup operation creates a new cache subnet group. Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (VPC). :type cache_subnet_group_name: string :param cache_subnet_group_name: A name for the cache subnet group. This value is stored as a lowercase string. C...
def create_cache_subnet_group(self, cache_subnet_group_name, cache_subnet_group_description, subnet_ids):
params = {'CacheSubnetGroupName': cache_subnet_group_name, 'CacheSubnetGroupDescription': cache_subnet_group_description} self.build_list_params(params, subnet_ids, 'SubnetIds.member') return self._make_request(action='CreateCacheSubnetGroup', verb='POST', path='/', params=params)
'The CreateReplicationGroup operation creates a replication group. A replication group is a collection of cache clusters, where one of the clusters is a read/write primary and the other clusters are read-only replicas. Writes to the primary are automatically propagated to the replicas. When you create a replication gro...
def create_replication_group(self, replication_group_id, primary_cluster_id, replication_group_description):
params = {'ReplicationGroupId': replication_group_id, 'PrimaryClusterId': primary_cluster_id, 'ReplicationGroupDescription': replication_group_description} return self._make_request(action='CreateReplicationGroup', verb='POST', path='/', params=params)
'The DeleteCacheCluster operation deletes a previously provisioned cache cluster. DeleteCacheCluster deletes all associated cache nodes, node endpoints and the cache cluster itself. When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the cache cluster; you cannot c...
def delete_cache_cluster(self, cache_cluster_id):
params = {'CacheClusterId': cache_cluster_id} return self._make_request(action='DeleteCacheCluster', verb='POST', path='/', params=params)
'The DeleteCacheParameterGroup operation deletes the specified cache parameter group. You cannot delete a cache parameter group if it is associated with any cache clusters. :type cache_parameter_group_name: string :param cache_parameter_group_name: The name of the cache parameter group to delete. The specified cache se...
def delete_cache_parameter_group(self, cache_parameter_group_name):
params = {'CacheParameterGroupName': cache_parameter_group_name} return self._make_request(action='DeleteCacheParameterGroup', verb='POST', path='/', params=params)
'The DeleteCacheSecurityGroup operation deletes a cache security group. You cannot delete a cache security group if it is associated with any cache clusters. :type cache_security_group_name: string :param cache_security_group_name: The name of the cache security group to delete. You cannot delete the default security g...
def delete_cache_security_group(self, cache_security_group_name):
params = {'CacheSecurityGroupName': cache_security_group_name} return self._make_request(action='DeleteCacheSecurityGroup', verb='POST', path='/', params=params)
'The DeleteCacheSubnetGroup operation deletes a cache subnet group. You cannot delete a cache subnet group if it is associated with any cache clusters. :type cache_subnet_group_name: string :param cache_subnet_group_name: The name of the cache subnet group to delete. Constraints: Must contain no more than 255 alphanume...
def delete_cache_subnet_group(self, cache_subnet_group_name):
params = {'CacheSubnetGroupName': cache_subnet_group_name} return self._make_request(action='DeleteCacheSubnetGroup', verb='POST', path='/', params=params)
'The DeleteReplicationGroup operation deletes an existing replication group. DeleteReplicationGroup deletes the primary cache cluster and all of the read replicas in the replication group. When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the entire replication g...
def delete_replication_group(self, replication_group_id):
params = {'ReplicationGroupId': replication_group_id} return self._make_request(action='DeleteReplicationGroup', verb='POST', path='/', params=params)
'The DescribeCacheClusters operation returns information about all provisioned cache clusters if no cache cluster identifier is specified, or about a specific cache cluster if a cache cluster identifier is supplied. By default, abbreviated information about the cache clusters(s) will be returned. You can use the option...
def describe_cache_clusters(self, cache_cluster_id=None, max_records=None, marker=None, show_cache_node_info=None):
params = {} if (cache_cluster_id is not None): params['CacheClusterId'] = cache_cluster_id if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker if (show_cache_node_info is not None): params['ShowCacheNodeI...
'The DescribeCacheEngineVersions operation returns a list of the available cache engines and their versions. :type engine: string :param engine: The cache engine to return. Valid values: `memcached` | `redis` :type engine_version: string :param engine_version: The cache engine version to return. Example: `1.4.14` :type...
def describe_cache_engine_versions(self, engine=None, engine_version=None, cache_parameter_group_family=None, max_records=None, marker=None, default_only=None):
params = {} if (engine is not None): params['Engine'] = engine if (engine_version is not None): params['EngineVersion'] = engine_version if (cache_parameter_group_family is not None): params['CacheParameterGroupFamily'] = cache_parameter_group_family if (max_records is not No...
'The DescribeCacheParameterGroups operation returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list will contain only the descriptions for that group. :type cache_parameter_group_name: string :param cache_parameter_group_name: The name of a specific cache parameter g...
def describe_cache_parameter_groups(self, cache_parameter_group_name=None, max_records=None, marker=None):
params = {} if (cache_parameter_group_name is not None): params['CacheParameterGroupName'] = cache_parameter_group_name if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker return self._make_request(action='Descri...
'The DescribeCacheParameters operation returns the detailed parameter list for a particular cache parameter group. :type cache_parameter_group_name: string :param cache_parameter_group_name: The name of a specific cache parameter group to return details for. :type source: string :param source: The parameter types to re...
def describe_cache_parameters(self, cache_parameter_group_name, source=None, max_records=None, marker=None):
params = {'CacheParameterGroupName': cache_parameter_group_name} if (source is not None): params['Source'] = source if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker return self._make_request(action='DescribeCa...
'The DescribeCacheSecurityGroups operation returns a list of cache security group descriptions. If a cache security group name is specified, the list will contain only the description of that group. :type cache_security_group_name: string :param cache_security_group_name: The name of the cache security group to return ...
def describe_cache_security_groups(self, cache_security_group_name=None, max_records=None, marker=None):
params = {} if (cache_security_group_name is not None): params['CacheSecurityGroupName'] = cache_security_group_name if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker return self._make_request(action='DescribeC...
'The DescribeCacheSubnetGroups operation returns a list of cache subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group. :type cache_subnet_group_name: string :param cache_subnet_group_name: The name of the cache subnet group to return details for. :type...
def describe_cache_subnet_groups(self, cache_subnet_group_name=None, max_records=None, marker=None):
params = {} if (cache_subnet_group_name is not None): params['CacheSubnetGroupName'] = cache_subnet_group_name if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker return self._make_request(action='DescribeCacheSu...
'The DescribeEngineDefaultParameters operation returns the default engine and system parameter information for the specified cache engine. :type cache_parameter_group_family: string :param cache_parameter_group_family: The name of the cache parameter group family. Valid values are: `memcached1.4` | `redis2.6` :type max...
def describe_engine_default_parameters(self, cache_parameter_group_family, max_records=None, marker=None):
params = {'CacheParameterGroupFamily': cache_parameter_group_family} if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker return self._make_request(action='DescribeEngineDefaultParameters', verb='POST', path='/', params=param...
'The DescribeEvents operation returns events related to cache clusters, cache security groups, and cache parameter groups. You can obtain events specific to a particular cache cluster, cache security group, or cache parameter group by providing the name as a parameter. By default, only the events occurring within the l...
def describe_events(self, source_identifier=None, source_type=None, start_time=None, end_time=None, duration=None, max_records=None, marker=None):
params = {} if (source_identifier is not None): params['SourceIdentifier'] = source_identifier if (source_type is not None): params['SourceType'] = source_type if (start_time is not None): params['StartTime'] = start_time if (end_time is not None): params['EndTime'] =...
'The DescribeReplicationGroups operation returns information about a particular replication group. If no identifier is specified, DescribeReplicationGroups returns information about all replication groups. :type replication_group_id: string :param replication_group_id: The identifier for the replication group to be des...
def describe_replication_groups(self, replication_group_id=None, max_records=None, marker=None):
params = {} if (replication_group_id is not None): params['ReplicationGroupId'] = replication_group_id if (max_records is not None): params['MaxRecords'] = max_records if (marker is not None): params['Marker'] = marker return self._make_request(action='DescribeReplicationGrou...
'The DescribeReservedCacheNodes operation returns information about reserved cache nodes for this account, or about a specified reserved cache node. :type reserved_cache_node_id: string :param reserved_cache_node_id: The reserved cache node identifier filter value. Use this parameter to show only the reservation that m...
def describe_reserved_cache_nodes(self, reserved_cache_node_id=None, reserved_cache_nodes_offering_id=None, cache_node_type=None, duration=None, product_description=None, offering_type=None, max_records=None, marker=None):
params = {} if (reserved_cache_node_id is not None): params['ReservedCacheNodeId'] = reserved_cache_node_id if (reserved_cache_nodes_offering_id is not None): params['ReservedCacheNodesOfferingId'] = reserved_cache_nodes_offering_id if (cache_node_type is not None): params['Cache...
'The DescribeReservedCacheNodesOfferings operation lists available reserved cache node offerings. :type reserved_cache_nodes_offering_id: string :param reserved_cache_nodes_offering_id: The offering identifier filter value. Use this parameter to show only the available offering that matches the specified reservation id...
def describe_reserved_cache_nodes_offerings(self, reserved_cache_nodes_offering_id=None, cache_node_type=None, duration=None, product_description=None, offering_type=None, max_records=None, marker=None):
params = {} if (reserved_cache_nodes_offering_id is not None): params['ReservedCacheNodesOfferingId'] = reserved_cache_nodes_offering_id if (cache_node_type is not None): params['CacheNodeType'] = cache_node_type if (duration is not None): params['Duration'] = duration if (pr...
'The ModifyCacheCluster operation modifies the settings for a cache cluster. You can use this operation to change one or more cluster configuration parameters by specifying the parameters and the new values. :type cache_cluster_id: string :param cache_cluster_id: The cache cluster identifier. This value is stored as a ...
def modify_cache_cluster(self, cache_cluster_id, num_cache_nodes=None, cache_node_ids_to_remove=None, cache_security_group_names=None, security_group_ids=None, preferred_maintenance_window=None, notification_topic_arn=None, cache_parameter_group_name=None, notification_topic_status=None, apply_immediately=None, engine_...
params = {'CacheClusterId': cache_cluster_id} if (num_cache_nodes is not None): params['NumCacheNodes'] = num_cache_nodes if (cache_node_ids_to_remove is not None): self.build_list_params(params, cache_node_ids_to_remove, 'CacheNodeIdsToRemove.member') if (cache_security_group_names is n...
'The ModifyCacheParameterGroup operation modifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs. :type cache_parameter_group_name: string :param cache_parameter_group_name: The name of the cache parameter group to mo...
def modify_cache_parameter_group(self, cache_parameter_group_name, parameter_name_values):
params = {'CacheParameterGroupName': cache_parameter_group_name} self.build_complex_list_params(params, parameter_name_values, 'ParameterNameValues.member', ('ParameterName', 'ParameterValue')) return self._make_request(action='ModifyCacheParameterGroup', verb='POST', path='/', params=params)
'The ModifyCacheSubnetGroup operation modifies an existing cache subnet group. :type cache_subnet_group_name: string :param cache_subnet_group_name: The name for the cache subnet group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Example: `m...
def modify_cache_subnet_group(self, cache_subnet_group_name, cache_subnet_group_description=None, subnet_ids=None):
params = {'CacheSubnetGroupName': cache_subnet_group_name} if (cache_subnet_group_description is not None): params['CacheSubnetGroupDescription'] = cache_subnet_group_description if (subnet_ids is not None): self.build_list_params(params, subnet_ids, 'SubnetIds.member') return self._make...
'The ModifyReplicationGroup operation modifies the settings for a replication group. :type replication_group_id: string :param replication_group_id: The identifier of the replication group to modify. :type replication_group_description: string :param replication_group_description: A description for the replication grou...
def modify_replication_group(self, replication_group_id, replication_group_description=None, cache_security_group_names=None, security_group_ids=None, preferred_maintenance_window=None, notification_topic_arn=None, cache_parameter_group_name=None, notification_topic_status=None, apply_immediately=None, engine_version=N...
params = {'ReplicationGroupId': replication_group_id} if (replication_group_description is not None): params['ReplicationGroupDescription'] = replication_group_description if (cache_security_group_names is not None): self.build_list_params(params, cache_security_group_names, 'CacheSecurityGr...
'The PurchaseReservedCacheNodesOffering operation allows you to purchase a reserved cache node offering. :type reserved_cache_nodes_offering_id: string :param reserved_cache_nodes_offering_id: The ID of the reserved cache node offering to purchase. Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 :type reserved_cache_node...
def purchase_reserved_cache_nodes_offering(self, reserved_cache_nodes_offering_id, reserved_cache_node_id=None, cache_node_count=None):
params = {'ReservedCacheNodesOfferingId': reserved_cache_nodes_offering_id} if (reserved_cache_node_id is not None): params['ReservedCacheNodeId'] = reserved_cache_node_id if (cache_node_count is not None): params['CacheNodeCount'] = cache_node_count return self._make_request(action='Pur...
'The RebootCacheCluster operation reboots some, or all, of the cache cluster nodes within a provisioned cache cluster. This API will apply any modified cache parameter groups to the cache cluster. The reboot action takes place as soon as possible, and results in a momentary outage to the cache cluster. During the reboo...
def reboot_cache_cluster(self, cache_cluster_id, cache_node_ids_to_reboot):
params = {'CacheClusterId': cache_cluster_id} self.build_list_params(params, cache_node_ids_to_reboot, 'CacheNodeIdsToReboot.member') return self._make_request(action='RebootCacheCluster', verb='POST', path='/', params=params)
'The ResetCacheParameterGroup operation modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the ResetAllParameters and CacheParameterGroupName parameters. :...
def reset_cache_parameter_group(self, cache_parameter_group_name, parameter_name_values, reset_all_parameters=None):
params = {'CacheParameterGroupName': cache_parameter_group_name} self.build_complex_list_params(params, parameter_name_values, 'ParameterNameValues.member', ('ParameterName', 'ParameterValue')) if (reset_all_parameters is not None): params['ResetAllParameters'] = str(reset_all_parameters).lower() ...
'The RevokeCacheSecurityGroupIngress operation revokes ingress from a cache security group. Use this operation to disallow access from an Amazon EC2 security group that had been previously authorized. :type cache_security_group_name: string :param cache_security_group_name: The name of the cache security group to revok...
def revoke_cache_security_group_ingress(self, cache_security_group_name, ec2_security_group_name, ec2_security_group_owner_id):
params = {'CacheSecurityGroupName': cache_security_group_name, 'EC2SecurityGroupName': ec2_security_group_name, 'EC2SecurityGroupOwnerId': ec2_security_group_owner_id} return self._make_request(action='RevokeCacheSecurityGroupIngress', verb='POST', path='/', params=params)
':param origin: Origin information to associate with the distribution. If your distribution will use an Amazon S3 origin, then this should be an S3Origin object. If your distribution will use a custom origin (non Amazon S3), then this should be a CustomOrigin object. :type origin: :class:`boto.cloudfront.origin.S3Orig...
def __init__(self, connection=None, origin=None, enabled=False, caller_reference='', cnames=None, comment='', trusted_signers=None, default_root_object=None, logging=None):
self.connection = connection self.origin = origin self.enabled = enabled if caller_reference: self.caller_reference = caller_reference else: self.caller_reference = str(uuid.uuid4()) self.cnames = [] if cnames: self.cnames = cnames self.comment = comment self....
'Update the configuration of the Distribution. The only values of the DistributionConfig that can be directly updated are: * CNAMES * Comment * Whether the Distribution is enabled or not Any changes to the ``trusted_signers`` or ``origin`` properties of this distribution\'s current config object will also be included ...
def update(self, enabled=None, cnames=None, comment=None):
new_config = DistributionConfig(self.connection, self.config.origin, self.config.enabled, self.config.caller_reference, self.config.cnames, self.config.comment, self.config.trusted_signers, self.config.default_root_object) if (enabled is not None): new_config.enabled = enabled if (cnames is not None...
'Activate the Distribution. A convenience wrapper around the update method.'
def enable(self):
self.update(enabled=True)
'Deactivate the Distribution. A convenience wrapper around the update method.'
def disable(self):
self.update(enabled=False)
'Delete this CloudFront Distribution. The content associated with the Distribution is not deleted from the underlying Origin bucket in S3.'
def delete(self):
self.connection.delete_distribution(self.id, self.etag)
'Return a list of all content objects in this distribution. :rtype: list of :class:`boto.cloudfront.object.Object` :return: The content objects'
def get_objects(self):
bucket = self._get_bucket() objs = [] for key in bucket: objs.append(key) return objs
'Sets the S3 ACL grants for the given object to the appropriate value based on the type of Distribution. If the Distribution is serving private content the ACL will be set to include the Origin Access Identity associated with the Distribution. If the Distribution is serving public content the content will be set up w...
def set_permissions(self, object, replace=False):
if isinstance(self.config.origin, S3Origin): if self.config.origin.origin_access_identity: id = self.config.origin.origin_access_identity.split('/')[(-1)] oai = self.connection.get_origin_access_identity_info(id) policy = object.get_acl() if replace: ...
'Sets the S3 ACL grants for all objects in the Distribution to the appropriate value based on the type of Distribution. :type replace: bool :param replace: If False, the Origin Access Identity will be appended to the existing ACL for the object. If True, the ACL for the object will be completely replaced with one that ...
def set_permissions_all(self, replace=False):
bucket = self._get_bucket() for key in bucket: self.set_permissions(key, replace)
'Adds a new content object to the Distribution. The content for the object will be copied to a new Key in the S3 Bucket and the permissions will be set appropriately for the type of Distribution. :type name: str or unicode :param name: The name or key of the new object. :type content: file-like object :param content: ...
def add_object(self, name, content, headers=None, replace=True):
if self.config.origin.origin_access_identity: policy = 'private' else: policy = 'public-read' bucket = self._get_bucket() object = bucket.new_key(name) object.set_contents_from_file(content, headers=headers, policy=policy) if self.config.origin.origin_access_identity: sel...
'Creates a signed CloudFront URL that is only valid within the specified parameters. :type url: str :param url: The URL of the protected object. :type keypair_id: str :param keypair_id: The keypair ID of the Amazon KeyPair used to sign theURL. This ID MUST correspond to the private key specified with private_key_file ...
def create_signed_url(self, url, keypair_id, expire_time=None, valid_after_time=None, ip_address=None, policy_url=None, private_key_file=None, private_key_string=None):
params = self._create_signing_params(url=url, keypair_id=keypair_id, expire_time=expire_time, valid_after_time=valid_after_time, ip_address=ip_address, policy_url=policy_url, private_key_file=private_key_file, private_key_string=private_key_string) if ('?' in url): sep = '&' else: sep = '?' ...
'Creates the required URL parameters for a signed URL.'
def _create_signing_params(self, url, keypair_id, expire_time=None, valid_after_time=None, ip_address=None, policy_url=None, private_key_file=None, private_key_string=None):
params = {} if (expire_time and (not valid_after_time) and (not ip_address) and (not policy_url)): policy = self._canned_policy(url, expire_time) params['Expires'] = str(expire_time) else: if (policy_url is None): policy_url = url policy = self._custom_policy(poli...
'Creates a canned policy string.'
@staticmethod def _canned_policy(resource, expires):
policy = ('{"Statement":[{"Resource":"%(resource)s","Condition":{"DateLessThan":{"AWS:EpochTime":%(expires)s}}}]}' % locals()) return policy
'Creates a custom policy string based on the supplied parameters.'
@staticmethod def _custom_policy(resource, expires=None, valid_after=None, ip_address=None):
condition = {} if (not expires): expires = (int(time.time()) + 86400) condition['DateLessThan'] = {'AWS:EpochTime': expires} if valid_after: condition['DateGreaterThan'] = {'AWS:EpochTime': valid_after} if ip_address: if ('/' not in ip_address): ip_address += '/32...
'Signs a string for use with Amazon CloudFront. Requires the rsa library be installed.'
@staticmethod def _sign_string(message, private_key_file=None, private_key_string=None):
try: import rsa except ImportError: raise NotImplementedError('Boto depends on the python rsa library to generate signed URLs for CloudFront') if (private_key_file and private_key_string): raise ValueError('Only specify the private_key_fil...
'Base64 encodes a string using the URL-safe characters specified by Amazon.'
@staticmethod def _url_base64_encode(msg):
msg_base64 = base64.b64encode(msg) msg_base64 = msg_base64.replace('+', '-') msg_base64 = msg_base64.replace('=', '_') msg_base64 = msg_base64.replace('/', '~') return msg_base64
'Update the configuration of the StreamingDistribution. The only values of the StreamingDistributionConfig that can be directly updated are: * CNAMES * Comment * Whether the Distribution is enabled or not Any changes to the ``trusted_signers`` or ``origin`` properties of this distribution\'s current config object will...
def update(self, enabled=None, cnames=None, comment=None):
new_config = StreamingDistributionConfig(self.connection, self.config.origin, self.config.enabled, self.config.caller_reference, self.config.cnames, self.config.comment, self.config.trusted_signers) if (enabled is not None): new_config.enabled = enabled if (cnames is not None): new_config.cn...
'Creates a new invalidation request :see: http://goo.gl/8vECq'
def create_invalidation_request(self, distribution_id, paths, caller_reference=None):
if (not isinstance(paths, InvalidationBatch)): paths = InvalidationBatch(paths) paths.connection = self uri = ('/%s/distribution/%s/invalidation' % (self.Version, distribution_id)) response = self.make_request('POST', uri, {'Content-Type': 'text/xml'}, data=paths.to_xml()) body = response.re...
'Get all invalidation requests for a given CloudFront distribution. This returns an instance of an InvalidationListResultSet that automatically handles all of the result paging, etc. from CF - you just need to keep iterating until there are no more results. :type distribution_id: string :param distribution_id: The id o...
def get_invalidation_requests(self, distribution_id, marker=None, max_items=None):
uri = ('distribution/%s/invalidation' % distribution_id) params = dict() if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items if params: uri += ('?%s=%s' % params.popitem()) for (k, v) in params.items(): uri += ('&%s=%s' % (k, ...
':param dns_name: The DNS name of your Amazon S3 bucket to associate with the distribution. For example: mybucket.s3.amazonaws.com. :type dns_name: str :param origin_access_identity: The CloudFront origin access identity to associate with the distribution. If you want the distribution to serve private content, include ...
def __init__(self, dns_name=None, origin_access_identity=None):
self.dns_name = dns_name self.origin_access_identity = origin_access_identity
':param dns_name: The DNS name of your Amazon S3 bucket to associate with the distribution. For example: mybucket.s3.amazonaws.com. :type dns_name: str :param http_port: The HTTP port the custom origin listens on. :type http_port: int :param https_port: The HTTPS port the custom origin listens on. :type http_port: int ...
def __init__(self, dns_name=None, http_port=80, https_port=443, origin_protocol_policy=None):
self.dns_name = dns_name self.http_port = http_port self.https_port = https_port self.origin_protocol_policy = origin_protocol_policy
'Create a new invalidation request: :paths: An array of paths to invalidate'
def __init__(self, paths=None, connection=None, distribution=None, caller_reference=''):
self.paths = (paths or []) self.distribution = distribution self.caller_reference = caller_reference if (not self.caller_reference): self.caller_reference = str(uuid.uuid4()) if distribution: self.connection = distribution else: self.connection = connection
'Add another path to this invalidation request'
def add(self, path):
return self.paths.append(path)
'Remove a path from this invalidation request'
def remove(self, path):
return self.paths.remove(path)
'Escape a path, make sure it begins with a slash and contains no invalid characters. Retain literal wildcard characters.'
def escape(self, p):
if (not (p[0] == '/')): p = ('/%s' % p) return urllib.parse.quote(p, safe='/*')
'Get this batch as XML'
def to_xml(self):
assert (self.connection is not None) s = '<?xml version="1.0" encoding="UTF-8"?>\n' s += ('<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/%s/">\n' % self.connection.Version) for p in self.paths: s += (' <Path>%s</Path>\n' % self.escape(p)) s += (' ...
'A generator function for listing invalidation requests for a given CloudFront distribution.'
def __iter__(self):
conn = self.connection distribution_id = self.distribution_id result_set = self for inval in result_set._inval_cache: (yield inval) if (not self.auto_paginate): return while result_set.is_truncated: result_set = conn.get_invalidation_requests(distribution_id, marker=resul...
'Returns a Distribution object representing the parent CloudFront distribution of the invalidation request listed in the InvalidationSummary. :rtype: :class:`boto.cloudfront.distribution.Distribution` :returns: A Distribution object representing the parent CloudFront distribution of the invalidation request listed in ...
def get_distribution(self):
return self.connection.get_distribution_info(self.distribution_id)
'Returns an InvalidationBatch object representing the invalidation request referred to in the InvalidationSummary. :rtype: :class:`boto.cloudfront.invalidation.InvalidationBatch` :returns: An InvalidationBatch object representing the invalidation request referred to by the InvalidationSummary'
def get_invalidation_request(self):
return self.connection.invalidation_request_status(self.distribution_id, self.id)
'Describes an Elastic MapReduce cluster :type cluster_id: str :param cluster_id: The cluster id of interest'
def describe_cluster(self, cluster_id):
params = {'ClusterId': cluster_id} return self.get_object('DescribeCluster', params, Cluster)
'This method is deprecated. We recommend you use list_clusters, describe_cluster, list_steps, list_instance_groups and list_bootstrap_actions instead. Describes a single Elastic MapReduce job flow :type jobflow_id: str :param jobflow_id: The job flow id of interest'
def describe_jobflow(self, jobflow_id):
jobflows = self.describe_jobflows(jobflow_ids=[jobflow_id]) if jobflows: return jobflows[0]
'This method is deprecated. We recommend you use list_clusters, describe_cluster, list_steps, list_instance_groups and list_bootstrap_actions instead. Retrieve all the Elastic MapReduce job flows on your account :type states: list :param states: A list of strings with job flow states wanted :type jobflow_ids: list :par...
def describe_jobflows(self, states=None, jobflow_ids=None, created_after=None, created_before=None):
params = {} if states: self.build_list_params(params, states, 'JobFlowStates.member') if jobflow_ids: self.build_list_params(params, jobflow_ids, 'JobFlowIds.member') if created_after: params['CreatedAfter'] = created_after.strftime(boto.utils.ISO8601) if created_before: ...
'Describe an Elastic MapReduce step :type cluster_id: str :param cluster_id: The cluster id of interest :type step_id: str :param step_id: The step id of interest'
def describe_step(self, cluster_id, step_id):
params = {'ClusterId': cluster_id, 'StepId': step_id} return self.get_object('DescribeStep', params, HadoopStep)