MetadataPolicyOperations Class

MetadataPolicyOperations 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.object
MetadataPolicyOperations

Constructor

MetadataPolicyOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

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.

get(policy_id: str, **kwargs: Any) -> Any

Parameters

policy_id
str
Required

Id of an existing policy that needs to be fetched.

Returns

JSON object

Return type

<xref:Any>

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(**kwargs: Any) -> Iterable[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

ItemPaged[<xref:Any>]

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.

update(policy_id: str, body: Any = None, **kwargs: Any) -> Any

Parameters

policy_id
str
Required

Unique policy id.

body
<xref:Any>
Required

Policy to be updated.

Returns

JSON object

Return type

<xref:Any>

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.
   }