Class ProjectsRequestBuilder
Builds and executes requests for operations under \accounts{accountId}\projects
public class ProjectsRequestBuilder : BaseRequestBuilder
- Inheritance
-
BaseRequestBuilderProjectsRequestBuilder
- Inherited Members
-
BaseRequestBuilder.PathParametersBaseRequestBuilder.RequestAdapterBaseRequestBuilder.UrlTemplate
Constructors
ProjectsRequestBuilder(Dictionary<string, object>, IRequestAdapter)
Instantiates a new ProjectsRequestBuilder and sets the default values.
public ProjectsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter)
Parameters
pathParameters
Dictionary<string, object>Path parameters for the request
requestAdapter
IRequestAdapterThe request adapter to use to execute the requests.
ProjectsRequestBuilder(string, IRequestAdapter)
Instantiates a new ProjectsRequestBuilder and sets the default values.
public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)
Parameters
rawUrl
stringThe raw URL to use for the request builder.
requestAdapter
IRequestAdapterThe request adapter to use to execute the requests.
Methods
GetAsProjectsGetResponseAsync(Action<RequestConfiguration<ProjectsRequestBuilderGetQueryParameters>>?, CancellationToken)
Private Use - Returns a list of projects in an account. Can return up to 200 projects per request. Will only return the list of projects that the user has access to. If the user is an account admin then all projects will be returned otherwise only projects that the user participates in will be returned
public Task<ProjectsGetResponse?> GetAsProjectsGetResponseAsync(Action<RequestConfiguration<ProjectsRequestBuilder.ProjectsRequestBuilderGetQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)
Parameters
requestConfiguration
Action<RequestConfiguration<ProjectsRequestBuilder.ProjectsRequestBuilderGetQueryParameters>>Configuration for the request such as headers, query parameters, and middleware options.
cancellationToken
CancellationTokenCancellation token to use when cancelling requests
Returns
Exceptions
- ValidationError
When receiving a 400 status code
- Error
When receiving a 401 status code
- Error
When receiving a 403 status code
- Error
When receiving a 404 status code
- Error
When receiving a 406 status code
- Error
When receiving a 410 status code
- Error
When receiving a 500 status code
- Error
When receiving a 503 status code
GetAsync(Action<RequestConfiguration<ProjectsRequestBuilderGetQueryParameters>>?, CancellationToken)
Private Use - Returns a list of projects in an account. Can return up to 200 projects per request. Will only return the list of projects that the user has access to. If the user is an account admin then all projects will be returned otherwise only projects that the user participates in will be returned
[Obsolete("This method is obsolete. Use GetAsProjectsGetResponseAsync instead.")]
public Task<ProjectsResponse?> GetAsync(Action<RequestConfiguration<ProjectsRequestBuilder.ProjectsRequestBuilderGetQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)
Parameters
requestConfiguration
Action<RequestConfiguration<ProjectsRequestBuilder.ProjectsRequestBuilderGetQueryParameters>>Configuration for the request such as headers, query parameters, and middleware options.
cancellationToken
CancellationTokenCancellation token to use when cancelling requests
Returns
Exceptions
- ValidationError
When receiving a 400 status code
- Error
When receiving a 401 status code
- Error
When receiving a 403 status code
- Error
When receiving a 404 status code
- Error
When receiving a 406 status code
- Error
When receiving a 410 status code
- Error
When receiving a 500 status code
- Error
When receiving a 503 status code
PostAsync(Project, Action<RequestConfiguration<DefaultQueryParameters>>?, CancellationToken)
Private Use - Create a project in an account. When creating the project either a list of services to activate or a template can be provided but not both. The adding of services is an asynchronous job and so a jobId will be included in the response. The GET jobs/{jobId} endpoint can be used to check the status of the job.
public Task<Project?> PostAsync(Project body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)
Parameters
body
ProjectThe request body
requestConfiguration
Action<RequestConfiguration<DefaultQueryParameters>>Configuration for the request such as headers, query parameters, and middleware options.
cancellationToken
CancellationTokenCancellation token to use when cancelling requests
Returns
Exceptions
- ValidationError
When receiving a 400 status code
- Error
When receiving a 401 status code
- Error
When receiving a 403 status code
- Error
When receiving a 404 status code
- Error
When receiving a 410 status code
- Error
When receiving a 415 status code
- Error
When receiving a 500 status code
- Error
When receiving a 503 status code
ToGetRequestInformation(Action<RequestConfiguration<ProjectsRequestBuilderGetQueryParameters>>?)
Private Use - Returns a list of projects in an account. Can return up to 200 projects per request. Will only return the list of projects that the user has access to. If the user is an account admin then all projects will be returned otherwise only projects that the user participates in will be returned
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ProjectsRequestBuilder.ProjectsRequestBuilderGetQueryParameters>>? requestConfiguration = null)
Parameters
requestConfiguration
Action<RequestConfiguration<ProjectsRequestBuilder.ProjectsRequestBuilderGetQueryParameters>>Configuration for the request such as headers, query parameters, and middleware options.
Returns
- RequestInformation
A Microsoft.Kiota.Abstractions.RequestInformation
ToPostRequestInformation(Project, Action<RequestConfiguration<DefaultQueryParameters>>?)
Private Use - Create a project in an account. When creating the project either a list of services to activate or a template can be provided but not both. The adding of services is an asynchronous job and so a jobId will be included in the response. The GET jobs/{jobId} endpoint can be used to check the status of the job.
public RequestInformation ToPostRequestInformation(Project body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null)
Parameters
body
ProjectThe 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 ProjectsRequestBuilder WithUrl(string rawUrl)
Parameters
rawUrl
stringThe raw URL to use for the request builder.