Comments (6)
Hi @jbcintra
Thanks for bringing this up. We will ask the Load Balancer team if they have an alternative API to do this otherwise we can raise an issue with them.
from oci-dotnet-sdk.
Hi @github-anurag , I've got code working for it, loading ListLoadBalancers, then enumerating them and their Listener properties, just it stood out as a possible gap whilst working through the child elements.
from oci-dotnet-sdk.
@jbcintra
You can perhaps first use GetLoadBalancer with the Load Balancer OCID and then use the response object to get the Listener by its name from the dictionary of its Listeners. An example would be:-
using System;
using System.Threading.Tasks;
using Oci.LoadbalancerService;
using Oci.LoadbalancerService.Models;
using Oci.Common;
using Oci.Common.Auth;
namespace Oci.Sdk.DotNet.Example.Loadbalancer
{
public class GetLoadBalancerExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var getLoadBalancerRequest = new Oci.LoadbalancerService.Requests.GetLoadBalancerRequest
{
LoadBalancerId = "ocid1.test.oc1..<unique_ID>EXAMPLE-loadBalancerId-Value",
};
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
var provider = new ConfigFileAuthenticationDetailsProvider("DEFAULT");
try
{
// Create a service client and send the request.
using (var client = new LoadBalancerClient(provider, new ClientConfiguration()))
{
var response = await client.GetLoadBalancer(getLoadBalancerRequest);
// Retrieve value from the response.
Listener listener = response.LoadBalancer.Listeners["listener_name"];
}
}
catch (Exception e)
{
Console.WriteLine($"GetLoadBalancer Failed with {e.Message}");
throw e;
}
}
}
}
from oci-dotnet-sdk.
Hi @github-anurag , I'm doing exactly that, but it stood out as a gap having I've implemented the following...
ListLoadBalancers(string compartmentId)
ListCertificates(string loadBalancerId)
ListBackendSets(string loadBalancerId)
ListBackends(string loadBalancerId, string backendSetName)
ListHostnames(string loadBalancerId)
ListListenerRules(string loadBalancerId, string listenerName) <-- nothing to load listeners here, other than from LB properties
ListListeners(string loadBalancerId)
ListLoadBalancerHealths(string compartmentId)
ListPathRouteSets(string loadBalancerId)
ListPolicies(string compartmentId)
ListProtocols(string compartmentId)
ListRoutingPolicies(string loadBalancerId)
ListRuleSets(string loadBalancerId)
ListShapes()
ListSSLCipherSuites(string loadBalancerId)
from oci-dotnet-sdk.
Hi @jbcintra , I wanted to provide an update on this ticket. Load Balancer eng does not have plans or a roadmap for creating a list Listeners method for now. Their suggestion is to follow the current method you are using i.e to query the listener objects with getLoadBalancer method. I will keep the ticket open though.
from oci-dotnet-sdk.
Hi @KartikShrikantHegde , thanks for that. It just stood out when working through all the APIs to audit. Happy for it to be closed.
from oci-dotnet-sdk.
Related Issues (20)
- Unable to get the secret value with secret OCID HOT 1
- DataSafe-models-LifecycleState invalid enum value HOT 13
- support for Oracle Container Cloud Service HOT 5
- Getting Bucket Size HOT 8
- GetNetworkFirewallPolicy - not everything in output HOT 13
- LogAnalytics - ListLabelPriorities - conversion failure HOT 3
- LogAnalytics - ListScheduledTasks - Enum parameter issue HOT 5
- AppDependencyManagement - 2 invalid API definitions in SDK HOT 5
- Datasafe - ListAlertPolicies HOT 13
- OrganizationsClient -> ListOrganizations (rootId), stuck when listing All HOT 7
- No version bump for DLLs
- How to get the Url of a storage object? HOT 1
- IdentityDomains List functions refer to var baseUri which does not exist HOT 2
- Missing OkeWorkloadIdentityAuthenticationDetailsProvider HOT 3
- OVCP ListEsxiHostsRequest fails with invalid params
- List & Get CrossConnects and CrossConnectGroups failing
- Identity Domains, where are Applications? HOT 1
- Calling GetSecretBundleByName from behind a proxy HOT 3
- PrivateKeySupplier missing support for AsymmetricKeyParameter HOT 1
- Nonseekable stream can not be uploaded to Object storage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oci-dotnet-sdk.