// GetAllAWSServiceDiscoveryHttpNamespaceResources retrieves all AWSServiceDiscoveryHttpNamespace items from an AWS CloudFormation template
176846
func (t *Template) GetAllAWSServiceDiscoveryHttpNamespaceResources() map[string]*resources.AWSServiceDiscoveryHttpNamespace {
	results := map[string]*resources.AWSServiceDiscoveryHttpNamespace{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSServiceDiscoveryHttpNamespace:
			results[name] = resource
		}
	}
	return results
}
1326959
func GetServiceURLs(api libmachine.API, namespace string, t *template.Template) (URLs, error) {
	host, err := cluster.CheckIfHostExistsAndLoad(api, config.GetMachineName())
	if err != nil {
		return nil, err
	}

	ip, err := host.Driver.GetIP()
	if err != nil {
		return nil, err
	}

	client, err := K8s.GetCoreClient()
	if err != nil {
		return nil, err
	}

	serviceInterface := client.Services(namespace)

	svcs, err := serviceInterface.List(metav1.ListOptions{})
	if err != nil {
		return nil, err
	}

	var serviceURLs []URL
	for _, svc := range svcs.Items {
		urls, err := printURLsForService(client, ip, svc.Name, svc.Namespace, t)
		if err != nil {
			return nil, err
		}
		serviceURLs = append(serviceURLs, URL{Namespace: svc.Namespace, Name: svc.Name, URLs: urls})
	}

	return serviceURLs, nil
}
864399
func (t *Template) GetAllAWSConfigDeliveryChannelResources() map[string]*resources.AWSConfigDeliveryChannel {
	results := map[string]*resources.AWSConfigDeliveryChannel{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSConfigDeliveryChannel:
			results[name] = resource
		}
	}
	return results
}
1330481
func (t *Template) GetAllAWSCognitoUserPoolGroupResources() map[string]*resources.AWSCognitoUserPoolGroup {
	results := map[string]*resources.AWSCognitoUserPoolGroup{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSCognitoUserPoolGroup:
			results[name] = resource
		}
	}
	return results
}
613162
func (t *Template) GetAllAWSWorkSpacesWorkspaceResources() map[string]*resources.AWSWorkSpacesWorkspace {
	results := map[string]*resources.AWSWorkSpacesWorkspace{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSWorkSpacesWorkspace:
			results[name] = resource
		}
	}
	return results
}
719766
func (t *Template) GetAllAWSServerlessApplicationResources() map[string]*resources.AWSServerlessApplication {
	results := map[string]*resources.AWSServerlessApplication{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSServerlessApplication:
			results[name] = resource
		}
	}
	return results
}
1281651
func (t *Template) GetAllAWSCloud9EnvironmentEC2Resources() map[string]*resources.AWSCloud9EnvironmentEC2 {
	results := map[string]*resources.AWSCloud9EnvironmentEC2{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSCloud9EnvironmentEC2:
			results[name] = resource
		}
	}
	return results
}
333324
func (t *Template) GetAllAWSEMRStepResources() map[string]*resources.AWSEMRStep {
	results := map[string]*resources.AWSEMRStep{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSEMRStep:
			results[name] = resource
		}
	}
	return results
}
97709
func (t *Template) GetAllAWSServiceCatalogTagOptionAssociationResources() map[string]*resources.AWSServiceCatalogTagOptionAssociation {
	results := map[string]*resources.AWSServiceCatalogTagOptionAssociation{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSServiceCatalogTagOptionAssociation:
			results[name] = resource
		}
	}
	return results
}
1043634
func (k *kubernetesClient) GetNamespace(name string) (*core.Namespace, error) {
	ns, err := k.getNamespaceByName(name)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if err := checkNamespaceOwnedByJuju(ns, k.annotations); err != nil {
		return nil, errors.NotFoundf("namespace %q", name)
	}
	return ns, nil
}
940758
func (t *Template) GetAWSServiceDiscoveryHttpNamespaceWithName(name string) (*resources.AWSServiceDiscoveryHttpNamespace, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSServiceDiscoveryHttpNamespace:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryHttpNamespace not found", name)
}
735137
func (t *Template) GetAllAWSWAFWebACLResources() map[string]*resources.AWSWAFWebACL {
	results := map[string]*resources.AWSWAFWebACL{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSWAFWebACL:
			results[name] = resource
		}
	}
	return results
}
1266022
func (t *Template) GetAllAWSEC2NetworkInterfacePermissionResources() map[string]*resources.AWSEC2NetworkInterfacePermission {
	results := map[string]*resources.AWSEC2NetworkInterfacePermission{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSEC2NetworkInterfacePermission:
			results[name] = resource
		}
	}
	return results
}
202121
func (t *Template) GetAllAWSGreengrassSubscriptionDefinitionResources() map[string]*resources.AWSGreengrassSubscriptionDefinition {
	results := map[string]*resources.AWSGreengrassSubscriptionDefinition{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSGreengrassSubscriptionDefinition:
			results[name] = resource
		}
	}
	return results
}
1340156
func (t *Template) GetAllAWSSSMMaintenanceWindowResources() map[string]*resources.AWSSSMMaintenanceWindow {
	results := map[string]*resources.AWSSSMMaintenanceWindow{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSSSMMaintenanceWindow:
			results[name] = resource
		}
	}
	return results
}
655333
func (t *Template) GetAllAWSECSTaskDefinitionResources() map[string]*resources.AWSECSTaskDefinition {
	results := map[string]*resources.AWSECSTaskDefinition{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSECSTaskDefinition:
			results[name] = resource
		}
	}
	return results
}
984001
func (t *Template) GetAllAWSCognitoUserPoolResources() map[string]*resources.AWSCognitoUserPool {
	results := map[string]*resources.AWSCognitoUserPool{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSCognitoUserPool:
			results[name] = resource
		}
	}
	return results
}