func (c *Client) GetCloudAccounts(ctx context.Context) ([]*CloudAccount, error) {
	clouds := make([]*CloudAccount, 0)

	err := c.Do(ctx, "GET", "cloudaccounts", nil, &clouds)
	if err != nil {
		return nil, NewError(err.Error())
	}
	for _, account := range clouds {
		if account.Provider == "Azure" {
			account.AccountID = account.SubscriptionID
		}
	}

	if len(clouds) == 0 {
		return nil, NewError(content.ErrorNoCloudAccountsFound)
	}

	return clouds, nil
}
// GetCloudAccounts method for cloud command
GetCloudAccounts method for cloud command
// GetCloudAccounts method for cloud command
func (c *Client) GetCloudAccounts(ctx context.Context) ([]*CloudAccount, error) {
	clouds := make([]*CloudAccount, 0)
	err := c.Do(ctx, "GET", "cloudaccounts", nil, &clouds)
	if err != nil {
		return nil, NewError(err.Error())
	}
	for _, account := range clouds {
		if account.Provider == "Azure" {
			account.AccountID = account.SubscriptionID
		}
	}
	if len(clouds) == 0 {
		return nil, NewError(content.ErrorNoCloudAccountsFound)
	}
	return clouds, nil
}
func ( c * Client ) GetCloudAccounts ( ctx context . Context ) ( [ ] * CloudAccount , error ) { clouds := make ( [ ] * CloudAccount , 0 ) err := c . Do ( ctx , " " , " " , nil , & clouds ) if err != nil { return nil , NewError ( err . Error ( ) ) } for _ , account := range clouds { if account . Provider == " " { account . AccountID = account . SubscriptionID } } if len ( clouds ) == 0 { return nil , NewError ( content . ErrorNoCloudAccountsFound ) } return clouds , nil }
GetCloudAccounts method for cloud command
GetCloudAccounts method for cloud command