POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Confluent/organizations/myOrganization/access/default/listRoleBindingNameList?api-version=2024-02-13
{
"searchFilters": {
"crn_pattern": "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76",
"namespace": "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql"
}
}
import com.azure.resourcemanager.confluent.models.ListAccessRequestModel;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Access ListRoleBindingNameList.
*/
public final class Main {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/
* Access_RoleBindingNameList.json
*/
/**
* Sample code: Access_RoleBindingNameList.
*
* @param manager Entry point to ConfluentManager.
*/
public static void accessRoleBindingNameList(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.access().listRoleBindingNameListWithResponse("myResourceGroup", "myOrganization",
new ListAccessRequestModel().withSearchFilters(mapOf("crn_pattern",
"crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76", "namespace",
"public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql")),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.confluent import ConfluentManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-confluent
# USAGE
python access_role_binding_name_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConfluentManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.access.list_role_binding_name_list(
resource_group_name="myResourceGroup",
organization_name="myOrganization",
body={
"searchFilters": {
"crn_pattern": "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76",
"namespace": "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql",
}
},
)
print(response)
# x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconfluent_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json
func ExampleAccessClient_ListRoleBindingNameList() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconfluent.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccessClient().ListRoleBindingNameList(ctx, "myResourceGroup", "myOrganization", armconfluent.ListAccessRequestModel{
SearchFilters: map[string]*string{
"crn_pattern": to.Ptr("crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76"),
"namespace": to.Ptr("public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccessRoleBindingNameListSuccessResponse = armconfluent.AccessRoleBindingNameListSuccessResponse{
// Data: []*string{
// to.Ptr("MetricsViewer"),
// to.Ptr("OrganizationAdmin"),
// to.Ptr("Operator"),
// to.Ptr("NetworkAdmin"),
// to.Ptr("ResourceKeyAdmin"),
// to.Ptr("AccountAdmin")},
// Kind: to.Ptr("RoleDisplayNameList"),
// Metadata: &armconfluent.ListMetadata{
// First: to.Ptr("https://api.confluent.cloud/iam/v2/role-bindings"),
// Last: to.Ptr("https://api.confluent.cloud/iam/v2/role-bindings?page_token=bcAOehAY8F16YD84Z1wT"),
// Next: to.Ptr("https://api.confluent.cloud/iam/v2/role-bindings?page_token=UvmDWOB1iwfAIBPj6EYb"),
// Prev: to.Ptr("https://api.confluent.cloud/iam/v2/role-bindings?page_token=YIXRY97wWYmwzrax4dld"),
// TotalSize: to.Ptr[int32](123),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ConfluentManagementClient } = require("@azure/arm-confluent");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Organization role bindings
*
* @summary Organization role bindings
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json
*/
async function accessRoleBindingNameList() {
const subscriptionId =
process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONFLUENT_RESOURCE_GROUP"] || "myResourceGroup";
const organizationName = "myOrganization";
const body = {
searchFilters: {
crnPattern: "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76",
namespace:
"public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql",
},
};
const credential = new DefaultAzureCredential();
const client = new ConfluentManagementClient(credential, subscriptionId);
const result = await client.access.listRoleBindingNameList(
resourceGroupName,
organizationName,
body,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Confluent;
using Azure.ResourceManager.Confluent.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json
// this example is just showing the usage of "Access_ListRoleBindingNameList" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ConfluentOrganizationResource created on azure
// for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "myResourceGroup";
string organizationName = "myOrganization";
ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName);
ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId);
// invoke the operation
AccessListContent content = new AccessListContent()
{
SearchFilters =
{
["crn_pattern"] = "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76",
["namespace"] = "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql",
},
};
AccessRoleBindingNameListResult result = await confluentOrganization.GetAccessRoleBindingNamesAsync(content);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue