Deletes API deployment for a given restApiId and deploymentID

    CLI Example:

    .. code-block:: bash

        salt myminion boto_apigateway.delete_api_deployent restApiId deploymentId
14677
def delete_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        conn.delete_deployment(restApiId=restApiId, deploymentId=deploymentId)
        return {'deleted': True}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}
981622
def delete_service(self, service_name, params=None):
        
        if not self.space.has_service_with_name(service_name):
            logging.warning("Service not found so... succeeded?")
            return True

        guid = self.get_instance_guid(service_name)
        logging.info("Deleting service %s with guid %s" % (service_name, guid))

        # MAINT: this endpoint changes in newer version of api
        return self.api.delete("/v2/service_instances/%s?accepts_incomplete=true" %
            (guid), params=params)
126268
def delete_interface(call=None, kwargs=None):  # pylint: disable=unused-argument
    '''
    
    '''
    if kwargs is None:
        kwargs = {}

    netconn = get_conn(client_type='network')

    if kwargs.get('resource_group') is None:
        kwargs['resource_group'] = config.get_cloud_config_value(
            'resource_group', {}, __opts__, search_global=True
        )

    ips = []
    iface = netconn.network_interfaces.get(
        kwargs['resource_group'],
        kwargs['iface_name'],
    )
    iface_name = iface.name
    for ip_ in iface.ip_configurations:
        ips.append(ip_.name)

    poller = netconn.network_interfaces.delete(
        kwargs['resource_group'],
        kwargs['iface_name'],
    )
    poller.wait()

    for ip_ in ips:
        poller = netconn.public_ip_addresses.delete(kwargs['resource_group'], ip_)
        poller.wait()

    return {iface_name: ips}
1093713
def delete_fwrule(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The delete_fwrule function must be called with -f or --function.'
        )

    if not kwargs or 'name' not in kwargs:
        log.error(
            'A name must be specified when deleting a firewall rule.'
        )
        return False

    name = kwargs['name']
    conn = get_conn()

    __utils__['cloud.fire_event'](
        'event',
        'delete firewall',
        'salt/cloud/firewall/deleting',
        args={
            'name': name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    try:
        result = conn.ex_destroy_firewall(
            conn.ex_get_firewall(name)
        )
    except ResourceNotFoundError as exc:
        log.error(
            'Rule %s was not found. Exception was: %s',
            name, exc, exc_info_on_loglevel=logging.DEBUG
        )
        return False

    __utils__['cloud.fire_event'](
        'event',
        'deleted firewall',
        'salt/cloud/firewall/deleted',
        args={
            'name': name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )
    return result
697486
def delete_command(endpoint_id, rule_id):
    
    client = get_client()

    res = client.delete_endpoint_acl_rule(endpoint_id, rule_id)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
181982
def _resolve_api_id(self):
        '''
        
        '''
        apis = __salt__['boto_apigateway.describe_apis'](name=self.rest_api_name,
                                                         description=_Swagger.AWS_API_DESCRIPTION,
                                                         **self._common_aws_args).get('restapi')
        if apis:
            if len(apis) == 1:
                self.restApiId = apis[0].get('id')
            else:
                raise ValueError('Multiple APIs matching given name {0} and '
                                 'description {1}'.format(self.rest_api_name, self.info_json))
272019
def delete(self, resource_id, **kwargs):
        

        return self.client._delete(self._url(resource_id), **kwargs)
198691
def delete_service(name, namespace='default', **kwargs):
    '''
    
    '''
    cfg = _setup_conn(**kwargs)

    try:
        api_instance = kubernetes.client.CoreV1Api()
        api_response = api_instance.delete_namespaced_service(
            name=name,
            namespace=namespace)

        return api_response.to_dict()
    except (ApiException, HTTPError) as exc:
        if isinstance(exc, ApiException) and exc.status == 404:
            return None
        else:
            log.exception(
                'Exception when calling CoreV1Api->delete_namespaced_service'
            )
            raise CommandExecutionError(exc)
    finally:
        _cleanup(**cfg)
1174082
def delete(self, ids):
        
        url = build_uri_with_ids('api/v3/environment/%s/', ids)
        return super(ApiEnvironment, self).delete(url)
891141
def no_more_deployments_remain(self):
        '''
        
        '''
        no_more_deployments = True
        deployments = __salt__['boto_apigateway.describe_api_deployments'](restApiId=self.restApiId,
                                                                           **self._common_aws_args).get('deployments')
        if deployments:
            for deployment in deployments:
                deploymentId = deployment.get('id')
                stages = __salt__['boto_apigateway.describe_api_stages'](restApiId=self.restApiId,
                                                                         deploymentId=deploymentId,
                                                                         **self._common_aws_args).get('stages')
                if stages:
                    no_more_deployments = False
                    break

        return no_more_deployments
1220602
def delete(self, ids):
        
        url = build_uri_with_ids('api/v4/as/%s/', ids)
        return super(ApiV4As, self).delete(url)
319404
private void removeDeployment(final String deploymentID, Handler<AsyncResult<String>> doneHandler) {
    context.execute(new Action<String>() {
      @Override
      public String perform() {
        Collection<String> clusterDeployments = deployments.get(cluster);
        if (clusterDeployments != null) {
          String deployment = null;
          for (String sdeployment : clusterDeployments) {
            JsonObject info = new JsonObject(sdeployment);
            if (info.getString("id").equals(deploymentID)) {
              deployment = sdeployment;
              break;
            }
          }
          if (deployment != null) {
            deployments.remove(cluster, deployment);
            return new JsonObject(deployment).getString("realID");
          }
        }
        return null;
      }
    }, doneHandler);
  }
519500
def delete_api_method(restApiId, resourcePath, httpMethod, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        resource = describe_api_resource(restApiId, resourcePath, region=region,
                                         key=key, keyid=keyid, profile=profile).get('resource')
        if resource:
            conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
            conn.delete_method(restApiId=restApiId, resourceId=resource['id'], httpMethod=httpMethod)
            return {'deleted': True}
        return {'deleted': False, 'error': 'get API method failed: no such resource'}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}
955992
def delete(self, callback=None, errback=None):
        
        return self._rest.delete(self.id, callback=callback, errback=errback)
1145763
def stop_deployment(awsclient, deployment_id):
    
    log.info('Deployment: %s - stopping active deployment.', deployment_id)
    client_codedeploy = awsclient.get_client('codedeploy')

    response = client_codedeploy.stop_deployment(
        deploymentId=deployment_id,
        autoRollbackEnabled=True
    )
73739
def service_delete(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.delete_service(**kwargs)
292486
def delete_service(self, service_id):
        

        svc = self.client['Network_Application_Delivery_Controller_'
                          'LoadBalancer_Service']

        return svc.deleteObject(id=service_id)