你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
PipelineContext Class
A context object carried by the pipeline request and response containers.
This is transport specific and can contain data persisted between pipeline requests (for example reusing an open connection pool or "session"), as well as used by the SDK developer to carry arbitrary data through the pipeline.
Constructor
PipelineContext(transport: TransportType | None, **kwargs: Any)
Parameters
Name | Description |
---|---|
transport
Required
|
The HTTP transport type. |
kwargs
Required
|
Developer-defined keyword arguments. |
Methods
clear |
Context objects cannot be cleared. |
copy | |
fromkeys |
Create a new dictionary with keys from iterable and values set to value. |
get |
Return the value for key if key is in the dictionary, else default. |
items | |
keys | |
pop |
Removes specified key and returns the value. |
popitem |
Remove and return a (key, value) pair as a 2-tuple. Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty. |
setdefault |
Insert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default. |
update |
Context objects cannot be updated. |
values |
clear
copy
fromkeys
Create a new dictionary with keys from iterable and values set to value.
fromkeys(value=None, /)
Positional-Only Parameters
Name | Description |
---|---|
iterable
Required
|
|
value
|
Default value: None
|
Parameters
Name | Description |
---|---|
type
Required
|
|
Exceptions
Type | Description |
---|---|
get
Return the value for key if key is in the dictionary, else default.
get(key, default=None, /)
Positional-Only Parameters
Name | Description |
---|---|
key
Required
|
|
default
|
Default value: None
|
Exceptions
Type | Description |
---|---|
items
keys
pop
popitem
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
popitem()
Exceptions
Type | Description |
---|---|
setdefault
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
setdefault(key, default=None, /)
Positional-Only Parameters
Name | Description |
---|---|
key
Required
|
|
default
|
Default value: None
|
Exceptions
Type | Description |
---|---|
update
Context objects cannot be updated.
update(*args: Any, **kwargs: Any) -> None
Exceptions
Type | Description |
---|---|