Lists all app profiles of the specified instance.

<p>Sample code:

<pre>{@code
List<AppProfile> appProfiles = client.listAppProfiles("my-instance");
}</pre>

@see AppProfile
163060
@SuppressWarnings("WeakerAccess")
  public List<AppProfile> listAppProfiles(String instanceId) {
    return ApiExceptions.callAndTranslateApiException(listAppProfilesAsync(instanceId));
  }
701821
@Override
    public Set<AppdynamicsApplication> getApplications(String instanceUrl) {
        Set<AppdynamicsApplication> returnSet = new HashSet<>();
        try {
            String url = joinURL(instanceUrl, APPLICATION_LIST_PATH);
            ResponseEntity<String> responseEntity = makeRestCall(url);
            String returnJSON = responseEntity.getBody();
            JSONParser parser = new JSONParser();

            try {
                JSONArray array = (JSONArray) parser.parse(returnJSON);

                for (Object entry : array) {
                    JSONObject jsonEntry = (JSONObject) entry;

                    String appName = getString(jsonEntry, "name");
                    String appId = String.valueOf(getLong(jsonEntry, "id"));
                    String desc = getString(jsonEntry, "description");
                    if (StringUtils.isEmpty(desc)) {
                        desc = appName;
                    }
                    AppdynamicsApplication app = new AppdynamicsApplication();
                    app.setAppID(appId);
                    app.setAppName(appName);
                    app.setAppDesc(desc);
                    app.setDescription(desc);
                    returnSet.add(app);
                }
            } catch (ParseException e) {
                LOG.error("Parsing applications on instance: " + instanceUrl, e);
            }
        } catch (RestClientException rce) {
            LOG.error("client exception loading applications", rce);
            throw rce;
        } catch (MalformedURLException mfe) {
            LOG.error("malformed url for loading applications", mfe);
        }
        return returnSet;
    }
597670
public Profile findProfile(int profileId) throws Exception {
        Profile profile = null;
        PreparedStatement statement = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "SELECT * FROM " + Constants.DB_TABLE_PROFILE +
                    " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setInt(1, profileId);
            results = statement.executeQuery();
            if (results.next()) {
                profile = this.getProfileFromResultSet(results);
            }
        } catch (Exception e) {
            throw e;
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
        return profile;
    }
567836
public Profile[] getProfilesForServerName(String serverName) throws Exception {
        int profileId = -1;
        ArrayList<Profile> returnProfiles = new ArrayList<Profile>();

        PreparedStatement queryStatement = null;
        ResultSet results = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            queryStatement = sqlConnection.prepareStatement(
                "SELECT " + Constants.GENERIC_PROFILE_ID + " FROM " + Constants.DB_TABLE_SERVERS +
                    " WHERE " + Constants.SERVER_REDIRECT_SRC_URL + " = ? GROUP BY " +
                    Constants.GENERIC_PROFILE_ID
            );
            queryStatement.setString(1, serverName);
            results = queryStatement.executeQuery();

            while (results.next()) {
                profileId = results.getInt(Constants.GENERIC_PROFILE_ID);

                Profile profile = ProfileService.getInstance().findProfile(profileId);

                returnProfiles.add(profile);
            }
        } catch (SQLException e) {
            throw e;
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (queryStatement != null) {
                    queryStatement.close();
                }
            } catch (Exception e) {
            }
        }

        if (returnProfiles.size() == 0) {
            return null;
        }
        return returnProfiles.toArray(new Profile[0]);
    }
36609
public List<Client> findAllClients(int profileId) throws Exception {
        ArrayList<Client> clients = new ArrayList<Client>();

        PreparedStatement query = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            query = sqlConnection.prepareStatement(
                "SELECT * FROM " + Constants.DB_TABLE_CLIENT +
                    " WHERE " + Constants.GENERIC_PROFILE_ID + " = ?"
            );
            query.setInt(1, profileId);
            results = query.executeQuery();
            while (results.next()) {
                clients.add(this.getClientFromResultSet(results));
            }
        } catch (Exception e) {
            throw e;
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (query != null) {
                    query.close();
                }
            } catch (Exception e) {
            }
        }
        return clients;
    }
797990
private AllProfiles loadProfiles(InputStream is) throws IOException {
        ProfilesConfigFileLoaderHelper helper = new ProfilesConfigFileLoaderHelper();
        Map<String, Map<String, String>> allProfileProperties = helper
                .parseProfileProperties(new Scanner(is, StringUtils.UTF8.name()));

        // Convert the loaded property map to credential objects
        Map<String, BasicProfile> profilesByName = new LinkedHashMap<String, BasicProfile>();

        for (Entry<String, Map<String, String>> entry : allProfileProperties.entrySet()) {
            String profileName = entry.getKey();
            Map<String, String> properties = entry.getValue();

            if (profileName.startsWith("profile ")) {
                LOG.warn(
                        "Your profile name includes a 'profile ' prefix. This is considered part of the profile name in the " +
                        "Java SDK, so you will need to include this prefix in your profile name when you reference this " +
                        "profile from your Java code.");
            }

            assertParameterNotEmpty(profileName,
                                    "Unable to load properties from profile: Profile name is empty.");
            profilesByName.put(profileName, new BasicProfile(profileName, properties));
        }

        return new AllProfiles(profilesByName);
    }
734613
public java.util.List<InstanceInformation> getInstanceInformationList() {
        if (instanceInformationList == null) {
            instanceInformationList = new com.amazonaws.internal.SdkInternalList<InstanceInformation>();
        }
        return instanceInformationList;
    }
339114
public java.util.List<IamInstanceProfileAssociation> getIamInstanceProfileAssociations() {
        if (iamInstanceProfileAssociations == null) {
            iamInstanceProfileAssociations = new com.amazonaws.internal.SdkInternalList<IamInstanceProfileAssociation>();
        }
        return iamInstanceProfileAssociations;
    }
254805
public static Instance findInstanceByPath( AbstractApplication application, String instancePath ) {

		Collection<Instance> currentList = new ArrayList<> ();
		if( application != null )
			currentList.addAll( application.getRootInstances());

		List<String> instanceNames = new ArrayList<> ();
		if( instancePath != null )
			instanceNames.addAll( Arrays.asList( instancePath.split( "/" )));

		if( instanceNames.size() > 0
				&& Utils.isEmptyOrWhitespaces( instanceNames.get( 0 )))
			instanceNames.remove( 0 );

		// Every path segment points to an instance
		Instance result = null;
		for( String instanceName : instanceNames ) {

			result = null;
			for( Instance instance : currentList ) {
				if( instanceName.equals( instance.getName())) {
					result = instance;
					break;
				}
			}

			// The segment does not match any instance
			if( result == null )
				break;

			// Otherwise, prepare the next iteration
			currentList = result.getChildren();
		}

		return result;
	}
1091003
public ListInstancesResponse listInstances(ListInstancesRequest request) {
        checkNotNull(request, "request should not be null.");
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, INSTANCE_PREFIX);
        if (request.getMarker() != null) {
            internalRequest.addParameter("marker", request.getMarker());
        }
        if (request.getMaxKeys() > 0) {
            internalRequest.addParameter("maxKeys", String.valueOf(request.getMaxKeys()));
        }
        if (!Strings.isNullOrEmpty(request.getInternalIp())) {
            internalRequest.addParameter("internalIp", request.getInternalIp());
        }
        if (!Strings.isNullOrEmpty(request.getDedicatedHostId())) {
            internalRequest.addParameter("dedicatedHostId", request.getDedicatedHostId());
        }
        if (!Strings.isNullOrEmpty(request.getZoneName())) {
            internalRequest.addParameter("zoneName", request.getZoneName());
        }
        return invokeHttpClient(internalRequest, ListInstancesResponse.class);
    }
142822
public java.util.List<InstanceProfile> getInstanceProfiles() {
        if (instanceProfiles == null) {
            instanceProfiles = new com.amazonaws.internal.SdkInternalList<InstanceProfile>();
        }
        return instanceProfiles;
    }
499726
public void setInstanceProfiles(java.util.Collection<InstanceProfile> instanceProfiles) {
        if (instanceProfiles == null) {
            this.instanceProfiles = null;
            return;
        }

        this.instanceProfiles = new java.util.ArrayList<InstanceProfile>(instanceProfiles);
    }
543352
public static UpdateAppProfileRequest of(
      @Nonnull String instanceId, @Nonnull String appProfileId) {
    return new UpdateAppProfileRequest(
        instanceId,
        appProfileId,
        com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder());
  }
1050873
@Override
	public List<Application> listApplications( String exactName ) {

		if( exactName != null )
			this.logger.fine( "Request: list/find the application named " + exactName + "." );
		else
			this.logger.fine( "Request: list all the applications." );

		List<Application> result = new ArrayList<> ();
		for( ManagedApplication ma : this.manager.applicationMngr().getManagedApplications()) {
			// Equality is on the name, not on the display name
			if( exactName == null || exactName.equals( ma.getName()))
				result.add( ma.getApplication());
		}

		return result;
	}
1054802
@Override
    public Map<ServerGroup, EVCacheServerGroupConfig> discoverInstances(String appName) throws IOException {
        final String propertyName = appName + "-NODES";
        final String nodeListString = EVCacheConfig.getInstance().getDynamicStringProperty(propertyName, "").get();
        if (log.isDebugEnabled()) log.debug("List of Nodes = " + nodeListString);
        if(nodeListString != null && nodeListString.length() > 0) return bootstrapFromSystemProperty(nodeListString);
        
        if(env != null && region != null) return bootstrapFromEureka(appName);
        
        return Collections.<ServerGroup, EVCacheServerGroupConfig> emptyMap();
    }
1195871
public java.util.List<ApplicationDescription> getApplications() {
        if (applications == null) {
            applications = new com.amazonaws.internal.SdkInternalList<ApplicationDescription>();
        }
        return applications;
    }
238729
def list_instance_profiles(path_prefix='/', region=None, key=None,
                           keyid=None, profile=None):
    '''
    
    '''
    p = get_all_instance_profiles(path_prefix, region, key, keyid, profile)
    return [i['instance_profile_name'] for i in p]