Show / Hide Table of Contents

Class ApiRequest

Mutable carrier populated fluently by a generated *Api method before it hands the request to ApiClient. Holds the HTTP verb, the templated resource path (/api/.../{param}), the categorized parameters, the request body, and the negotiated media types.

Inheritance
object
ApiRequest
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Pulumi.Cloud.Sdk
Assembly: Pulumi.Cloud.Sdk.dll
Syntax
public sealed class ApiRequest

Constructors

View Source

ApiRequest(string, string)

Declaration
public ApiRequest(string method, string resourcePath)
Parameters
Type Name Description
string method
string resourcePath

Properties

View Source

BodyValue

Declaration
public object BodyValue { get; }
Property Value
Type Description
object
View Source

ConsumesList

Declaration
public List<string> ConsumesList { get; }
Property Value
Type Description
List<string>
View Source

HasBody

Declaration
public bool HasBody { get; }
Property Value
Type Description
bool
View Source

Method

Declaration
public string Method { get; }
Property Value
Type Description
string
View Source

PathParams

Declaration
public Dictionary<string, string> PathParams { get; }
Property Value
Type Description
Dictionary<string, string>
View Source

ProducesList

Declaration
public List<string> ProducesList { get; }
Property Value
Type Description
List<string>
View Source

QueryParams

Declaration
public Dictionary<string, List<string>> QueryParams { get; }
Property Value
Type Description
Dictionary<string, List<string>>
View Source

ResourcePath

Declaration
public string ResourcePath { get; }
Property Value
Type Description
string

Methods

View Source

Body(object)

Declaration
public ApiRequest Body(object body)
Parameters
Type Name Description
object body
Returns
Type Description
ApiRequest
View Source

Consumes(string)

Declaration
public ApiRequest Consumes(string mediaType)
Parameters
Type Name Description
string mediaType
Returns
Type Description
ApiRequest
View Source

PathParam(string, object)

Bind a {name} path segment. Null values are ignored.

Declaration
public ApiRequest PathParam(string name, object value)
Parameters
Type Name Description
string name
object value
Returns
Type Description
ApiRequest
View Source

Produces(string)

Declaration
public ApiRequest Produces(string mediaType)
Parameters
Type Name Description
string mediaType
Returns
Type Description
ApiRequest
View Source

QueryParam(string, object)

Append a query parameter. Null values are dropped; collections and arrays are emitted as repeated keys (k=a&k=b); booleans render lowercase, enums via their wire value, and dates as ISO-8601.

Declaration
public ApiRequest QueryParam(string name, object value)
Parameters
Type Name Description
string name
object value
Returns
Type Description
ApiRequest

Version 2026.10.9

  • View Source
Back to top Copyright 2016-2026, Pulumi Corporation.