通过 arm 的 Azure 恢复保管库备份策略不会更改时区

问题描述

我正在尝试自动部署 azure 恢复保险库和一些策略。

但是我似乎无法通过 ARM 更改策略的时区。

我目前尝试将时区值硬编码为“浪漫标准时间”,但它似乎不接受

"name": "defaultbackupPolicies","count": "[length(parameters('recoveryPolicies'))]","input": {
          "backupManagementType": "AzuReiaasVM","instantRpRetentionRangeInDays": "5","timeZone": "Romance Standard Time",

但它仍然认为UTC

解决方法

我认为您需要在资源 import networkx as nx import pandas as pd import matplotlib.pyplot as plt df = pd.DataFrame({"Attribute": [87.5,12.5,43.5],"Source": ["Heisenberg","Beckham","Messi","water"],"Target" : ["Pauli","Maradona","melon"],"Weight" : [66.3,38.1,12,33.6],"Label" : [1,1]}) G = nx.from_pandas_edgelist(df,source='Source',target='Target',edge_attr='Weight') source_attrs = {df.Source[i]: {"Attribute": df.Attribute[i]} for i in range(len(df.Attribute))} target_attrs = {df.Target[i]: {"Attribute": df.Attribute[i]} for i in range(len(df.Attribute))} nx.set_node_attributes(G,source_attrs) nx.set_node_attributes(G,target_attrs) degrees=[100*G.degree[i] for i in G.nodes()] weights = [G[u][v]['Weight']/10 for u,v in G.edges()] colors = [] for node in G.nodes(): if node in source_attrs.keys(): colors.append('yellow') else: colors.append('blue') pos=nx.spring_layout(G) pos_attrs = {} for node,coords in pos.items(): pos_attrs[node] = (coords[0],coords[1] + 0.08) labels = nx.get_node_attributes(G,"Attribute") custom_node_attrs = {} for node,attr in labels.items(): custom_node_attrs[node] = str(node) + str(attr) nx.draw_networkx_labels(G,pos_attrs,labels=custom_node_attrs,font_size=10) nx.draw_networkx_nodes(G,pos,nodelist=G.nodes(),node_size = degrees,node_color=colors) nx.draw_networkx_edges(G,width=weights) plt.show() "timeZone": "Romance Standard Time" 中指定 properties

试试对我有用的示例,Microsoft.RecoveryServices/vaults/backupPolicies 是使用 testpolicy 配置的策略。

Romance Standard Time

在门户中检查结果:

enter image description here