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.
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
Properties
View Source
BodyValue
Declaration
public object BodyValue { get; }
Property Value
View Source
ConsumesList
Declaration
public List<string> ConsumesList { get; }
Property Value
View Source
HasBody
Declaration
public bool HasBody { get; }
Property Value
View Source
Method
Declaration
public string Method { get; }
Property Value
View Source
PathParams
Declaration
public Dictionary<string, string> PathParams { get; }
Property Value
View Source
ProducesList
Declaration
public List<string> ProducesList { get; }
Property Value
View Source
QueryParams
Declaration
public Dictionary<string, List<string>> QueryParams { get; }
Property Value
View Source
ResourcePath
Declaration
public string ResourcePath { get; }
Property Value
Methods
View Source
Body(object)
Declaration
public ApiRequest Body(object body)
Parameters
| Type |
Name |
Description |
| object |
body |
|
Returns
View Source
Consumes(string)
Declaration
public ApiRequest Consumes(string mediaType)
Parameters
| Type |
Name |
Description |
| string |
mediaType |
|
Returns
View Source
PathParam(string, object)
Bind a {name} path segment. Null values are ignored.
Declaration
public ApiRequest PathParam(string name, object value)
Parameters
Returns
View Source
Produces(string)
Declaration
public ApiRequest Produces(string mediaType)
Parameters
| Type |
Name |
Description |
| string |
mediaType |
|
Returns
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
Returns