Interface IRequest
Represents a request being sent to an Amazon Web Service, including the parameters being sent as part of the request, the endpoint to which the request should be sent, etc.
This class is only intended for internal use inside the AWS client libraries. Callers shouldn't ever interact directly with objects of this class.
public interface IRequest
- Extension Methods
Properties
AWS4SignerResult
If using AWS4 signing protocol, contains the resultant parts of the signature that we may need to make use of if we elect to do a chunked encoding upload.
AWS4SigningResult AWS4SignerResult { get; set; }
Property Value
AWS4aSignerResult
If using SigV4a signing protocol, contains the resultant parts of the signature that we may need to make use of if we elect to do a chunked encoding upload.
AWS4aSigningResult AWS4aSignerResult { get; set; }
Property Value
AlternateEndpoint
Alternate endpoint to use for this request, if any.
RegionEndpoint AlternateEndpoint { get; set; }
Property Value
AuthenticationRegion
The authentication region to use for the request. Set from Config.AuthenticationRegion.
string AuthenticationRegion { get; set; }
Property Value
CanonicalResourcePrefix
Used for Amazon S3 requests where the bucket name is removed from the marshalled resource path into the host header. To comply with AWS2 signature calculation, we need to recover the bucket name and include it in the resource canonicalization, which we do using this field.
string CanonicalResourcePrefix { get; set; }
Property Value
Content
Gets and Sets the content for this request.
byte[] Content { get; set; }
Property Value
- byte[]
ContentStream
Gets and sets the content stream.
Stream ContentStream { get; set; }
Property Value
DeterminedSigningRegion
The region in which the service request was signed.
string DeterminedSigningRegion { get; set; }
Property Value
DisablePayloadSigning
WARNING: Setting DisablePayloadSigning to true disables the SigV4 payload signing data integrity check on this request.
If using SigV4, the DisablePayloadSigning flag controls if the payload should be signed on a request by request basis. By default this flag is null which will use the default client behavior. The default client behavior is to sign the payload. When DisablePayloadSigning is true, the request will be signed with an UNSIGNED-PAYLOAD value. Setting DisablePayloadSigning to true requires that the request is sent over a HTTPS connection.
Under certain circumstances, such as uploading to S3 while using MD5 hashing, it may be desireable to use UNSIGNED-PAYLOAD to decrease signing CPU usage. This flag only applies to Amazon S3 PutObject and UploadPart requests.
MD5Stream, SigV4 payload signing, and HTTPS each provide some data integrity verification. If DisableMD5Stream is true and DisablePayloadSigning is true, then the possibility of data corruption is completely dependant on HTTPS being the only remaining source of data integrity verification.
bool? DisablePayloadSigning { get; set; }
Property Value
- bool?
Endpoint
Gets and Sets the endpoint for this request.
Uri Endpoint { get; set; }
Property Value
- Uri
Headers
Returns a dictionary of the headers included in this request.
IDictionary<string, string> Headers { get; }
Property Value
HostPrefix
Host prefix value to prepend to the endpoint for this request, if any.
string HostPrefix { get; set; }
Property Value
HttpMethod
Gets and sets the type of http request to make, whether it should be POST,GET or DELETE
string HttpMethod { get; set; }
Property Value
MarshallerVersion
Gets and Sets the version number for the marshaller used to create this request. The version number is used to support backward compatible changes that would otherwise be breaking changes when a newer core is used with an older service assembly.
int MarshallerVersion { get; set; }
Property Value
OriginalRequest
Returns the original, user facing request object which this internal request object is representing.
AmazonWebServiceRequest OriginalRequest { get; }
Property Value
OriginalStreamPosition
Gets and sets the original stream position. If ContentStream is null or does not support seek, this propery should be equal to -1.
long OriginalStreamPosition { get; set; }
Property Value
OverrideSigningServiceName
If the request needs to be signed with a different service name than the client config AuthenticationServiceName, set it here to override the result of DetermineService in AWS4Signer
string OverrideSigningServiceName { get; set; }
Property Value
ParameterCollection
Collection of parameters included in this request.
ParameterCollection ParameterCollection { get; }
Property Value
Parameters
Returns a dictionary of the parameters included in this request.
IDictionary<string, string> Parameters { get; }
Property Value
PathResources
Returns the path resources that should be used within the resource path. This is used for services where path keys can contain '/' characters, making string-splitting of a resource path potentially hazardous.
IDictionary<string, string> PathResources { get; }
Property Value
RequestName
The name of the request
string RequestName { get; }
Property Value
ResourcePath
Gets and Sets the resource path added on to the endpoint.
string ResourcePath { get; set; }
Property Value
SelectedChecksum
The checksum algorithm that was selected to validate this request's integrity
CoreChecksumAlgorithm SelectedChecksum { get; set; }
Property Value
ServiceName
The name of the service to which this request is being sent.
string ServiceName { get; }
Property Value
SetContentFromParameters
Flag that signals that Content was and should be set from the Parameters collection.
bool SetContentFromParameters { get; set; }
Property Value
SignatureVersion
Specifies which signature version shall be used for the current request.
SignatureVersion SignatureVersion { get; set; }
Property Value
SubResources
Returns the subresources that should be appended to the resource path. This is used primarily for Amazon S3, where object keys can contain '?' characters, making string-splitting of a resource path potentially hazardous.
IDictionary<string, string> SubResources { get; }
Property Value
Suppress404Exceptions
Gets and sets the Suppress404Exceptions property. If true then 404s return back from AWS will not cause an exception and an empty response object will be returned.
bool Suppress404Exceptions { get; set; }
Property Value
TrailingHeaders
Returns a dictionary of the trailing headers included after this request's content.
IDictionary<string, string> TrailingHeaders { get; }
Property Value
UseChunkEncoding
Determine whether to use a chunked encoding upload for the request (applies to Amazon S3 PutObject and UploadPart requests only). If DisablePayloadSigning is true, UseChunkEncoding will be automatically set to false.
bool UseChunkEncoding { get; set; }
Property Value
UseDoubleEncoding
Determine whether to use double encoding for request's signer.
bool UseDoubleEncoding { get; set; }
Property Value
UseQueryString
Gets and sets a flag that indicates whether the request is sent as a query string instead of the request body.
bool UseQueryString { get; set; }
Property Value
UseSigV4
This flag specifies if SigV4 is required for the current request.
[Obsolete("UseSigV4 is deprecated. Use SignatureVersion directly instead.")]
bool UseSigV4 { get; set; }
Property Value
Methods
AddPathResource(string, string)
Adds a new entry to the PathResources collection for the request
void AddPathResource(string key, string value)
Parameters
key
stringThe name of the pathresource with potential greedy syntax: {key+}
value
stringValue of the entry
AddSubResource(string)
Adds a new null entry to the SubResources collection for the request
void AddSubResource(string subResource)
Parameters
subResource
stringThe name of the subresource
AddSubResource(string, string)
Adds a new entry to the SubResources collection for the request
void AddSubResource(string subResource, string value)
Parameters
ComputeContentStreamHash()
Computes the SHA 256 hash of the content stream. If the stream is not seekable, it searches the parent stream hierarchy to find a seekable stream prior to computation. Once computed, the hash is cached for future use.
string ComputeContentStreamHash()
Returns
GetHeaderValue(string)
Gets the header value from the request.
string GetHeaderValue(string headerName)
Parameters
headerName
string
Returns
HasRequestBody()
Returns true if the request has a body, else false.
bool HasRequestBody()
Returns
- bool
Returns true if the request has a body, else false.
IsRequestStreamRewindable()
Checks if the request stream can be rewinded.
bool IsRequestStreamRewindable()
Returns
- bool
Returns true if the request stream can be rewinded , else false.
MayContainRequestBody()
Returns true if the request can contain a request body, else false.
bool MayContainRequestBody()
Returns
- bool
Returns true if the currect request can contain a request body, else false.