Table of Contents

Class RolesRequestBuilder

Namespace
Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles
Assembly
Keycloak.AuthServices.Sdk.Kiota.dll

Builds and executes requests for operations under \admin\realms{realm}\roles

public class RolesRequestBuilder : BaseRequestBuilder
Inheritance
BaseRequestBuilder
RolesRequestBuilder
Inherited Members
BaseRequestBuilder.PathParameters
BaseRequestBuilder.RequestAdapter
BaseRequestBuilder.UrlTemplate

Constructors

RolesRequestBuilder(Dictionary<string, object>, IRequestAdapter)

Instantiates a new RolesRequestBuilder and sets the default values.

public RolesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter)

Parameters

pathParameters Dictionary<string, object>

Path parameters for the request

requestAdapter IRequestAdapter

The request adapter to use to execute the requests.

RolesRequestBuilder(string, IRequestAdapter)

Instantiates a new RolesRequestBuilder and sets the default values.

public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)

Parameters

rawUrl string

The raw URL to use for the request builder.

requestAdapter IRequestAdapter

The request adapter to use to execute the requests.

Properties

this[string]

Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.roles.item collection

public RoleNameItemRequestBuilder this[string position] { get; }

Parameters

position string

role's name (not id!)

Property Value

RoleNameItemRequestBuilder

A RoleNameItemRequestBuilder

Methods

GetAsync(Action<RequestConfiguration<RolesRequestBuilderGetQueryParameters>>?, CancellationToken)

Get all roles for the realm or client

public Task<List<RoleRepresentation>?> GetAsync(Action<RequestConfiguration<RolesRequestBuilder.RolesRequestBuilderGetQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)

Parameters

requestConfiguration Action<RequestConfiguration<RolesRequestBuilder.RolesRequestBuilderGetQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

cancellationToken CancellationToken

Cancellation token to use when cancelling requests

Returns

Task<List<RoleRepresentation>>

A List<RoleRepresentation>

PostAsync(RoleRepresentation, Action<RequestConfiguration<DefaultQueryParameters>>?, CancellationToken)

Create a new role for the realm or client

public Task<Stream?> PostAsync(RoleRepresentation body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)

Parameters

body RoleRepresentation

The request body

requestConfiguration Action<RequestConfiguration<DefaultQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

cancellationToken CancellationToken

Cancellation token to use when cancelling requests

Returns

Task<Stream>

A Stream

ToGetRequestInformation(Action<RequestConfiguration<RolesRequestBuilderGetQueryParameters>>?)

Get all roles for the realm or client

public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<RolesRequestBuilder.RolesRequestBuilderGetQueryParameters>>? requestConfiguration = null)

Parameters

requestConfiguration Action<RequestConfiguration<RolesRequestBuilder.RolesRequestBuilderGetQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

Returns

RequestInformation

A Microsoft.Kiota.Abstractions.RequestInformation

ToPostRequestInformation(RoleRepresentation, Action<RequestConfiguration<DefaultQueryParameters>>?)

Create a new role for the realm or client

public RequestInformation ToPostRequestInformation(RoleRepresentation body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null)

Parameters

body RoleRepresentation

The request body

requestConfiguration Action<RequestConfiguration<DefaultQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

Returns

RequestInformation

A Microsoft.Kiota.Abstractions.RequestInformation

WithUrl(string)

Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.

public RolesRequestBuilder WithUrl(string rawUrl)

Parameters

rawUrl string

The raw URL to use for the request builder.

Returns

RolesRequestBuilder

A RolesRequestBuilder