Skip to content

Commit 7d9034c

Browse files
authored
Add examples to Az.Cdn (Azure#16835)
1 parent d5accfa commit 7d9034c

21 files changed

+310
-2
lines changed

src/Cdn/Cdn/help/Disable-AzCdnCustomDomain.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ The **Disable-AzCdnCustomDomain** cmdlet disables the secured HTTPS delivery of
3333
### Example 1
3434
```powershell
3535
Disable-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName
36-
true
3736
```
3837

3938
Disable https delivery of the custom domain.

src/Cdn/Cdn/help/Enable-AzCdnCustomDomain.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ The **Enable-AzCdnCustomDomain** cmdlet enables the secured HTTPS delivery of a
3333
### Example 1
3434
```powershell
3535
Enable-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName
36-
true
3736
```
3837

3938
Enable https delivery of the custom domain.

src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@ The **Get-AzCdnCustomDomain** cmdlet gets an Azure Content Delivery Network (CDN
3030

3131
## EXAMPLES
3232

33+
### Example 1
34+
```powershell
35+
Get-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint
36+
```
37+
38+
```Output
39+
HostName : cdn.example.com
40+
ValidationData :
41+
ResourceState : Active
42+
CustomHttpsProvisioningState : Disabled
43+
CustomHttpsProvisioningSubstate : None
44+
ResourceGroupName : myresourcegroup
45+
ProfileName : mycdnprofile
46+
EndpointName : myendpoint
47+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers
48+
/Microsoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/customdomains/cdn-example-com
49+
Name : cdn-example-com
50+
Type : Microsoft.Cdn/profiles/endpoints/customdomains
51+
ProvisioningState : Succeeded
52+
```
53+
3354
## PARAMETERS
3455

3556
### -CdnEndpoint

src/Cdn/Cdn/help/Get-AzCdnEndpoint.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,38 @@ The **Get-AzCdnEndpoint** cmdlet gets an Azure Content Delivery Network (CDN) en
3030

3131
## EXAMPLES
3232

33+
### Example 1: Get all endpoints in the CDN profile
34+
```powershell
35+
Get-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile
36+
```
37+
38+
```Output
39+
HostName : myendpoint.azureedge.net
40+
OriginHostHeader :
41+
OriginPath :
42+
ContentTypesToCompress : {}
43+
IsCompressionEnabled : False
44+
IsHttpAllowed : True
45+
IsHttpsAllowed : True
46+
QueryStringCachingBehavior : IgnoreQueryString
47+
Origins : {mystorage}
48+
OptimizationType :
49+
ProbePath :
50+
GeoFilters : {}
51+
DeliveryPolicy :
52+
ResourceState : Running
53+
DefaultOriginGroup :
54+
ResourceGroupName : myresourcegroup
55+
ProfileName : mycdnprofile
56+
Location : WestUs
57+
Tags : {}
58+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Micr
59+
osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint
60+
Name : myendpoint
61+
Type : Microsoft.Cdn/profiles/endpoints
62+
ProvisioningState : Succeeded
63+
```
64+
3365
## PARAMETERS
3466

3567
### -CdnProfile

src/Cdn/Cdn/help/Get-AzCdnEndpointNameAvailability.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ The **Get-AzCdnEndpointNameAvailability** cmdlet gets availability status of the
2323

2424
## EXAMPLES
2525

26+
### Example 1
27+
```powershell
28+
Get-AzCdnEndpointNameAvailability -EndpointName myendpoint
29+
```
30+
31+
```Output
32+
NameAvailable Reason Message
33+
------------- ------ -------
34+
True
35+
```
36+
2637
## PARAMETERS
2738

2839
### -DefaultProfile

src/Cdn/Cdn/help/Get-AzCdnOrigin.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,32 @@ The **Get-AzCdnOrigin** cmdlet gets an Azure Content Delivery Network (CDN) orig
3636

3737
## EXAMPLES
3838

39+
### Example 1
40+
```powershell
41+
Get-AzCdnOrigin -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint
42+
```
43+
44+
```Output
45+
HostName : mystorage.blob.core.windows.net
46+
HttpPort :
47+
HttpsPort :
48+
OriginHostHeader :
49+
Priority :
50+
PrivateLinkApprovalMessage :
51+
PrivateLinkLocation :
52+
PrivateLinkResourceId :
53+
Weight :
54+
ResourceState : Active
55+
ResourceGroupName : myresourcegroup
56+
ProfileName : mycdnprofile
57+
EndpointName : myendpoint
58+
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myresourcegroup/providers/Micr
59+
osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/origins/mystorage
60+
Name : mystorage
61+
Type : Microsoft.Cdn/profiles/endpoints/origins
62+
ProvisioningState : Succeeded
63+
```
64+
3965
## PARAMETERS
4066

4167
### -CdnEndpoint

src/Cdn/Cdn/help/Get-AzCdnProfile.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,24 @@ The **Get-AzCdnProfile** cmdlet gets an Azure Content Delivery Network (CDN) pro
2323

2424
## EXAMPLES
2525

26+
### Example 1: Get all CDN profiles in the resource group
27+
```powershell
28+
Get-AzCdnProfile -ResourceGroupName myresourcegroup
29+
```
30+
31+
```Output
32+
Sku : Microsoft.Azure.Commands.Cdn.Models.Profile.PSSku
33+
ResourceState : Active
34+
ResourceGroupName : myresourcegroup
35+
Location : WestUs
36+
Tags : {}
37+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Microsoft.Cdn
38+
/profiles/mycdnprofile
39+
Name : mycdnprofile
40+
Type : Microsoft.Cdn/profiles
41+
ProvisioningState : Succeeded
42+
```
43+
2644
## PARAMETERS
2745

2846
### -DefaultProfile

src/Cdn/Cdn/help/Get-AzCdnProfileSsoUrl.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ This URL lets users connect to a supplementary portal and use additional feature
3030

3131
## EXAMPLES
3232

33+
### Example 1
34+
```powershell
35+
Get-AzCdnProfileSsoUrl -ResourceGroupName myresourcegroup -ProfileName mycdnprofile
36+
```
37+
38+
```Output
39+
SsoUriValue
40+
-----------
41+
https://cdn.windowsazure.com/account/loginexternal/?token=IUQ9oj9b0H%2bZTL8gSnaBFbe9hfGEoy%2fBMtkbUQmWOAU%3d&timesta...
42+
```
43+
3344
## PARAMETERS
3445

3546
### -CdnProfile

src/Cdn/Cdn/help/New-AzCdnCustomDomain.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ The **New-AzCdnCustomDomain** cmdlet creates a custom domain for the Azure Conte
3131

3232
## EXAMPLES
3333

34+
### Example 1
35+
```powershell
36+
New-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -CustomDomainName cdn-example-com -HostName cdn.example.com
37+
```
38+
39+
```Output
40+
HostName : cdn.example.com
41+
ValidationData :
42+
ResourceState : Active
43+
CustomHttpsProvisioningState : Disabled
44+
CustomHttpsProvisioningSubstate : None
45+
ResourceGroupName : myresourcegroup
46+
ProfileName : mycdnprofile
47+
EndpointName : myendpoint
48+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers
49+
/Microsoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/customdomains/cdn-example-com
50+
Name : cdn-example-com
51+
Type : Microsoft.Cdn/profiles/endpoints/customdomains
52+
ProvisioningState : Succeeded
53+
```
54+
3455
## PARAMETERS
3556

3657
### -CdnEndpoint

src/Cdn/Cdn/help/New-AzCdnEndpoint.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,40 @@ The **New-AzCdnEndpoint** cmdlet creates an Azure Content Delivery Network (CDN)
5050

5151
## EXAMPLES
5252

53+
### Example 1
54+
```powershell
55+
New-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -Location westus -EndpointName myendpoint `
56+
-OriginName mystorage -OriginHostName mystorage.blob.core.windows.net `
57+
-OriginHostHeader mystorage.blob.core.windows.net -IsHttpAllowed $false
58+
```
59+
60+
```Output
61+
HostName : myendpoint.azureedge.net
62+
OriginHostHeader : mystorage.blob.core.windows.net
63+
OriginPath :
64+
ContentTypesToCompress : {}
65+
IsCompressionEnabled : False
66+
IsHttpAllowed : False
67+
IsHttpsAllowed : True
68+
QueryStringCachingBehavior : IgnoreQueryString
69+
Origins : {mystorage}
70+
OptimizationType :
71+
ProbePath :
72+
GeoFilters : {}
73+
DeliveryPolicy :
74+
ResourceState : Running
75+
DefaultOriginGroup :
76+
ResourceGroupName : myresourcegroup
77+
ProfileName : mycdnprofile
78+
Location : WestUs
79+
Tags : {}
80+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Micr
81+
osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint
82+
Name : myendpoint
83+
Type : Microsoft.Cdn/profiles/endpoints
84+
ProvisioningState : Succeeded
85+
```
86+
5387
## PARAMETERS
5488

5589
### -CdnProfile

src/Cdn/Cdn/help/Publish-AzCdnEndpointContent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ The **Publish-AzCdnEndpointContent** cmdlet loads content from an origin server
3030

3131
## EXAMPLES
3232

33+
### Example 1: Pre-load some assets
34+
```powershell
35+
Publish-AzCdnEndpointContent -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -LoadContent "/images/kitten.png","/video/rickroll.mp4"
36+
```
37+
3338
## PARAMETERS
3439

3540
### -CdnEndpoint

src/Cdn/Cdn/help/Remove-AzCdnCustomDomain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ The **Remove-AzCdnCustomDomain** cmdlet removes the custom domain from an Azure
3131

3232
## EXAMPLES
3333

34+
### Example 1
35+
```powershell
36+
Remove-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -CustomDomainName cdn-example-com
37+
```
38+
3439
## PARAMETERS
3540

3641
### -CdnCustomDomain

src/Cdn/Cdn/help/Remove-AzCdnEndpoint.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ The **Remove-AzCdnEndpoint** cmdlet removes an Azure Content Delivery Network (C
3030

3131
## EXAMPLES
3232

33+
### Example 1
34+
```powershell
35+
Remove-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -Force
36+
```
37+
3338
## PARAMETERS
3439

3540
### -CdnEndpoint

src/Cdn/Cdn/help/Remove-AzCdnProfile.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ The **Remove-AzCdnProfile** cmdlet removes a Azure Content Delivery Network (CDN
3030

3131
## EXAMPLES
3232

33+
### Example 1
34+
```powershell
35+
Remove-AzCdnProfile -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -Force
36+
```
37+
3338
## PARAMETERS
3439

3540
### -CdnProfile

src/Cdn/Cdn/help/Set-AzCdnEndpoint.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,42 @@ The **Set-AzCdnEndpoint** cmdlet updates an Azure Content Delivery Network (CDN)
2323

2424
## EXAMPLES
2525

26+
### Example 1: Set allowed protocols to HTTPS only
27+
```powershell
28+
$endpointObject = Get-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint
29+
$endpointObject.IsHttpAllowed = $false
30+
Set-AzCdnEndpoint -CdnEndpoint $endpointObject
31+
```
32+
33+
```Output
34+
HostName : myendpoint.azureedge.net
35+
OriginHostHeader :
36+
OriginPath :
37+
ContentTypesToCompress : {}
38+
IsCompressionEnabled : False
39+
IsHttpAllowed : False
40+
IsHttpsAllowed : True
41+
QueryStringCachingBehavior : IgnoreQueryString
42+
Origins : {mystorage}
43+
OptimizationType :
44+
ProbePath :
45+
GeoFilters : {}
46+
DeliveryPolicy :
47+
ResourceState : Running
48+
DefaultOriginGroup :
49+
ResourceGroupName : myresourcegroup
50+
ProfileName : mycdnprofile
51+
Location : WestUs
52+
Tags : {}
53+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Micr
54+
osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint
55+
Name : myendpoint
56+
Type : Microsoft.Cdn/profiles/endpoints
57+
ProvisioningState : Succeeded
58+
```
59+
60+
Properties that are allowed to change are: `ContentTypesToCompress`, `IsCompressionEnabled`, `IsHttpAllowed`, `IsHttpsAllowed`, `QueryStringCachingBehavior`, `GeoFilters` and `Tags`.
61+
2662
## PARAMETERS
2763

2864
### -CdnEndpoint

src/Cdn/Cdn/help/Set-AzCdnOrigin.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,35 @@ The **Set-AzCdnOrigin** cmdlet updates an Azure Content Delivery Network (CDN) o
4141

4242
## EXAMPLES
4343

44+
### Example 1
45+
```powershell
46+
Set-AzCdnOrigin -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint `
47+
-OriginName mystorage -HostName mystorage2.blob.core.windows.net
48+
```
49+
50+
```Output
51+
HostName : mystorage2.blob.core.windows.net
52+
HttpPort :
53+
HttpsPort :
54+
OriginHostHeader :
55+
Priority :
56+
PrivateLinkApprovalMessage :
57+
PrivateLinkLocation :
58+
PrivateLinkResourceId :
59+
Weight :
60+
ResourceState : Active
61+
ResourceGroupName : myresourcegroup
62+
ProfileName : mycdnprofile
63+
EndpointName : myendpoint
64+
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myresourcegroup/providers/Micr
65+
osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/origins/mystorage
66+
Name : mystorage
67+
Type : Microsoft.Cdn/profiles/endpoints/origins
68+
ProvisioningState : Succeeded
69+
```
70+
71+
This cmdlet will change the hostname of the specified endpoint.
72+
4473
## PARAMETERS
4574

4675
### -CdnOrigin

src/Cdn/Cdn/help/Set-AzCdnProfile.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ The **Set-AzCdnProfile** cmdlet updates an Azure Content Delivery Network (CDN)
2323

2424
## EXAMPLES
2525

26+
### Example 1
27+
```powershell
28+
$profileObject = Get-AzCdnProfile -ResourceGroupName myresourcegroup -ProfileName mycdnprofile
29+
$profileObject.Tags = @{"key"="value"}
30+
Set-AzCdnProfile -CdnProfile $profileObject
31+
```
32+
33+
```Output
34+
Sku : Microsoft.Azure.Commands.Cdn.Models.Profile.PSSku
35+
ResourceState : Active
36+
ResourceGroupName : myresourcegroup
37+
Location : WestUs
38+
Tags : {key}
39+
Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Microsoft.Cdn
40+
/profiles/mycdnprofile
41+
Name : mycdnprofile
42+
Type : Microsoft.Cdn/profiles
43+
ProvisioningState : Succeeded
44+
```
45+
2646
## PARAMETERS
2747

2848
### -CdnProfile

0 commit comments

Comments
 (0)