зеркало из https://github.com/github/docs.git
Fixing a code sample to use an updated API version (#53214)
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
This commit is contained in:
Родитель
d4ca13bf74
Коммит
0a2c247e85
|
@ -35,6 +35,7 @@ export SUBNET_NAME=YOUR_SUBNET_NAME
|
||||||
export NSG_NAME=YOUR_NSG_NAME
|
export NSG_NAME=YOUR_NSG_NAME
|
||||||
export NETWORK_SETTINGS_RESOURCE_NAME=YOUR_NETWORK_SETTINGS_RESOURCE_NAME
|
export NETWORK_SETTINGS_RESOURCE_NAME=YOUR_NETWORK_SETTINGS_RESOURCE_NAME
|
||||||
export DATABASE_ID=YOUR_DATABASE_ID
|
export DATABASE_ID=YOUR_DATABASE_ID
|
||||||
|
export API_VERSION=2024-04-02
|
||||||
|
|
||||||
# These are the default values. You can adjust your address and subnet prefixes.
|
# These are the default values. You can adjust your address and subnet prefixes.
|
||||||
export ADDRESS_PREFIX=10.0.0.0/16
|
export ADDRESS_PREFIX=10.0.0.0/16
|
||||||
|
@ -70,7 +71,7 @@ echo Delegate subnet to GitHub.Network/networkSettings and apply NSG rules
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Create network settings resource $NETWORK_SETTINGS_RESOURCE_NAME
|
echo Create network settings resource $NETWORK_SETTINGS_RESOURCE_NAME
|
||||||
. az resource create --resource-group $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type GitHub.Network/networkSettings --properties "{ \"location\": \"$AZURE_LOCATION\", \"properties\" : { \"subnetId\": \"/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME\", \"businessId\": \"$DATABASE_ID\" }}" --is-full-object --output table --query "{GitHubId:tags.GitHubId, name:name}" --api-version 2024-04-02
|
. az resource create --resource-group $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type GitHub.Network/networkSettings --properties "{ \"location\": \"$AZURE_LOCATION\", \"properties\" : { \"subnetId\": \"/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME\", \"businessId\": \"$DATABASE_ID\" }}" --is-full-object --output table --query "{GitHubId:tags.GitHubId, name:name}" --api-version $API_VERSION
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo To clean up and delete resources run the following command:
|
echo To clean up and delete resources run the following command:
|
||||||
|
|
|
@ -19,7 +19,7 @@ To delete the network settings resource, the network configuration that uses it
|
||||||
|
|
||||||
```bash copy
|
```bash copy
|
||||||
az account set --subscription $SUBSCRIPTION_ID
|
az account set --subscription $SUBSCRIPTION_ID
|
||||||
az resource delete -g $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type 'GitHub.Network/networkSettings' --api-version '2023-11-01-preview'
|
az resource delete -g $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type 'GitHub.Network/networkSettings' --api-version $API_VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Delete the subnet in Azure. For more information, see [Delete a subnet](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet?tabs=azure-portal#delete-a-subnet) on Microsoft Learn.
|
1. Delete the subnet in Azure. For more information, see [Delete a subnet](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet?tabs=azure-portal#delete-a-subnet) on Microsoft Learn.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче