MetadataPolicyOperations Class
MetadataPolicyOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectMetadataPolicyOperations
Constructor
MetadataPolicyOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Methods
| get |
Gets a metadata policy. |
| list_all |
List or Get metadata policies. |
| update |
Updates a metadata policy. |
get
Gets a metadata policy.
async get(policy_id: str, **kwargs: Any) -> Any
Parameters
Returns
JSON object
Return type
Exceptions
Examples
# response body for status code(s): 200
response.json() == {
"id": "str", # Optional. The id of policy.
"name": "str", # Optional. The name of policy.
"properties": {
"attributeRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"id": "str", # Optional. The id for rule.
"kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
"name": "str" # Optional. The name for rule.
}
],
"collection": {
"referenceName": "str", # Optional. The name of reference.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference.
},
"decisionRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit".
"kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
}
],
"description": "str", # Optional. The description of policy.
"parentCollectionName": "str" # Optional. The parent collection of the policy.
},
"version": 0 # Optional. The version of policy.
}
list_all
List or Get metadata policies.
list_all(*, collection_name: Optional[str] = None, **kwargs: Any) -> AsyncIterable[Any]
Parameters
- collection_name
- str
The name of an existing collection for which one policy needs to be fetched.
Returns
An iterator like instance of JSON object
Return type
Exceptions
Examples
# response body for status code(s): 200
response.json() == {
"nextLink": "str", # Optional.
"values": [
{
"id": "str", # Optional. The id of policy.
"name": "str", # Optional. The name of policy.
"properties": {
"attributeRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"id": "str", # Optional. The id for rule.
"kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
"name": "str" # Optional. The name for rule.
}
],
"collection": {
"referenceName": "str", # Optional. The name of reference.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference.
},
"decisionRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit".
"kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
}
],
"description": "str", # Optional. The description of policy.
"parentCollectionName": "str" # Optional. The parent collection of the policy.
},
"version": 0 # Optional. The version of policy.
}
]
}
update
Updates a metadata policy.
async update(policy_id: str, body: Any = None, **kwargs: Any) -> Any
Parameters
- body
- <xref:Any>
Policy to be updated.
Returns
JSON object
Return type
Exceptions
Examples
# JSON input template you can fill out and use as your body input.
body = {
"id": "str", # Optional. The id of policy.
"name": "str", # Optional. The name of policy.
"properties": {
"attributeRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"id": "str", # Optional. The id for rule.
"kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
"name": "str" # Optional. The name for rule.
}
],
"collection": {
"referenceName": "str", # Optional. The name of reference.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference.
},
"decisionRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit".
"kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
}
],
"description": "str", # Optional. The description of policy.
"parentCollectionName": "str" # Optional. The parent collection of the policy.
},
"version": 0 # Optional. The version of policy.
}
# response body for status code(s): 200
response.json() == {
"id": "str", # Optional. The id of policy.
"name": "str", # Optional. The name of policy.
"properties": {
"attributeRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"id": "str", # Optional. The id for rule.
"kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
"name": "str" # Optional. The name for rule.
}
],
"collection": {
"referenceName": "str", # Optional. The name of reference.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference.
},
"decisionRules": [
{
"dnfCondition": [
[
{
"attributeName": "str", # Optional. AttributeName.
"attributeValueExcludedIn": [
"str" # Optional. List of values excluded for attribute.
],
"attributeValueExcludes": "str", # Optional. Value excluded for attribute.
"attributeValueIncludedIn": [
"str" # Optional. List of values for attribute.
],
"attributeValueIncludes": "str" # Optional. Value for attribute.
}
]
],
"effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit".
"kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule".
}
],
"description": "str", # Optional. The description of policy.
"parentCollectionName": "str" # Optional. The parent collection of the policy.
},
"version": 0 # Optional. The version of policy.
}
Feedback
Submit and view feedback for