| Total Complexity | 1 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| 1 | from azure.mgmt.resource.resources import ( |
||
| 9 | class CreateResourceAction(AzureBaseResourceManagerAction): |
||
| 10 | def run(self, subscription_id, group_name, resource_name, |
||
| 11 | resource_provider_namespace, resource_type, parent_resource_path, |
||
| 12 | api_version, location): |
||
| 13 | credentials = self.credentials |
||
| 14 | |||
| 15 | resource_client = ResourceManagementClient( |
||
| 16 | ResourceManagementClientConfiguration( |
||
| 17 | credentials, |
||
| 18 | subscription_id)) |
||
| 19 | |||
| 20 | result = resource_client.resources.create_or_update( |
||
| 21 | group_name, |
||
| 22 | resource_provider_namespace=resource_provider_namespace, |
||
| 23 | parent_resource_path=parent_resource_path, |
||
| 24 | resource_type=resource_type, |
||
| 25 | resource_name=resource_name, |
||
| 26 | api_version=api_version, |
||
| 27 | resource=GenericResource( |
||
| 28 | location=location, |
||
| 29 | properties={}, |
||
| 30 | ), |
||
| 31 | ) |
||
| 32 | return result |
||
| 33 |