-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerShell Support for Email Services Control Plane CRUD operations #24230
Merged
msJinLei
merged 7 commits into
Azure:generation
from
v-vprasannak:generation-EmailServiceCRUDOperations
Feb 28, 2024
+19,488
−0
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b63a32c
Powershell Support for Email Services Control Plane CRUD operations -…
v-vprasannak 8005f65
Powershell Support for Email Services Control Plane CRUD operations -…
v-vprasannak 3674a15
Removed .gitignore
v-vprasannak 90f0b1d
Updated test recordings
v-vprasannak 1a9e75c
readme.md file root-module-name changes
v-vprasannak e9177f8
Updated examples
v-vprasannak 26a7662
Remove use autorest.powershell 4.x
msJinLei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
bin | ||
obj | ||
.vs | ||
generated | ||
internal | ||
exports | ||
tools | ||
custom/*.psm1 | ||
custom/autogen-model-cmdlets | ||
test/*-TestResults.xml | ||
/*.ps1 | ||
/*.ps1xml | ||
/*.psm1 | ||
/*.snk | ||
/*.csproj | ||
/*.nuspec |
23 changes: 23 additions & 0 deletions
23
src/Communication/EmailService.Autorest/Az.EmailService.psd1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@{ | ||
GUID = '21bdebd2-08fb-474b-9b85-a6b7415bd1f2' | ||
RootModule = './Az.EmailService.psm1' | ||
ModuleVersion = '0.1.0' | ||
CompatiblePSEditions = 'Core', 'Desktop' | ||
Author = 'Microsoft Corporation' | ||
CompanyName = 'Microsoft Corporation' | ||
Copyright = 'Microsoft Corporation. All rights reserved.' | ||
Description = 'Microsoft Azure PowerShell: EmailService cmdlets' | ||
PowerShellVersion = '5.1' | ||
DotNetFrameworkVersion = '4.7.2' | ||
RequiredAssemblies = './bin/Az.EmailService.private.dll' | ||
FormatsToProcess = './Az.EmailService.format.ps1xml' | ||
FunctionsToExport = 'Get-AzEmailService', 'Get-AzEmailServiceDomain', 'Get-AzEmailServiceSenderUsername', 'Invoke-AzEmailServiceInitiateDomainVerification', 'New-AzEmailService', 'New-AzEmailServiceDomain', 'New-AzEmailServiceSenderUsername', 'Remove-AzEmailService', 'Remove-AzEmailServiceDomain', 'Remove-AzEmailServiceSenderUsername', 'Stop-AzEmailServiceDomainVerification', 'Update-AzEmailService', 'Update-AzEmailServiceDomain', 'Update-AzEmailServiceSenderUsername' | ||
PrivateData = @{ | ||
PSData = @{ | ||
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'EmailService' | ||
LicenseUri = 'https://aka.ms/azps-license' | ||
ProjectUri = 'https://github.com/Azure/azure-powershell' | ||
ReleaseNotes = '' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,83 @@ | ||||
<!-- region Generated --> | ||||
# Az.EmailService | ||||
This directory contains the PowerShell module for the EmailService service. | ||||
|
||||
--- | ||||
## Status | ||||
[![Az.EmailService](https://img.shields.io/powershellgallery/v/Az.EmailService.svg?style=flat-square&label=Az.EmailService "Az.EmailService")](https://www.powershellgallery.com/packages/Az.EmailService/) | ||||
|
||||
## Info | ||||
- Modifiable: yes | ||||
- Generated: all | ||||
- Committed: yes | ||||
- Packaged: yes | ||||
|
||||
--- | ||||
## Detail | ||||
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. | ||||
|
||||
## Module Requirements | ||||
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater | ||||
|
||||
## Authentication | ||||
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. | ||||
|
||||
## Development | ||||
For information on how to develop for `Az.EmailService`, see [how-to.md](how-to.md). | ||||
<!-- endregion --> | ||||
|
||||
### AutoRest Configuration | ||||
> see https://aka.ms/autorest | ||||
|
||||
``` yaml | ||||
commit: 663ea6835c33bca216b63f777227db6a459a06b3 | ||||
require: | ||||
# readme.azure.noprofile.md is the common configuration file | ||||
- $(this-folder)/../../readme.azure.noprofile.md | ||||
input-file: | ||||
# You need to specify your swagger files here. | ||||
- $(repo)/specification/communication/resource-manager/Microsoft.Communication/preview/2023-06-01-preview/EmailServices.json | ||||
- $(repo)/specification/communication/resource-manager/Microsoft.Communication/preview/2023-06-01-preview/Domains.json | ||||
- $(repo)/specification/communication/resource-manager/Microsoft.Communication/preview/2023-06-01-preview/SenderUsernames.json | ||||
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally | ||||
# - (this-folder)/relative-path-to-your-swagger | ||||
|
||||
# For new RP, the version is 0.1.0 | ||||
module-version: 0.1.0 | ||||
# Normally, title is the service name | ||||
title: EmailService | ||||
subject-prefix: $(service-name) | ||||
|
||||
# If there are post APIs for some kinds of actions in the RP, you may need to | ||||
# uncomment following line to support viaIdentity for these post APIs | ||||
# identity-correction-for-post: true | ||||
|
||||
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option | ||||
use-extension: | ||||
"@autorest/powershell": "4.x" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
|
||||
directive: | ||||
# Following is two common directive which are normally required in all the RPs | ||||
# 1. Remove the unexpanded parameter set | ||||
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well | ||||
- where: | ||||
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ | ||||
remove: true | ||||
# Remove the set-* cmdlet | ||||
- where: | ||||
verb: Set | ||||
remove: true | ||||
# Remove the GetEmailServiceVerifiedExchangeOnlineDomain cmdlet | ||||
- where: | ||||
verb: Get | ||||
subject: EmailServiceVerifiedExchangeOnlineDomain | ||||
remove: true | ||||
# set the location default value to global | ||||
- where: | ||||
parameter-name: Location | ||||
set: | ||||
default: | ||||
name: Location default | ||||
description: Sets the Location default value to Global. | ||||
script: '"global"' | ||||
``` |
105 changes: 105 additions & 0 deletions
105
...ailService.Autorest/UX/Microsoft.Communication/emailServices-domains-senderUsernames.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"resourceType": "emailServices/domains/senderUsernames", | ||
"apiVersion": "2023-06-01-preview", | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.emailservice" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "Get-AzEmailServiceSenderUsername", | ||
"description": "Get a valid sender username for a domains resource.", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/senderUsernames/{senderUsername}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.emailservice/get-azemailservicesenderusername" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-DomainName <String>", | ||
"-EmailServiceName <String>", | ||
"-ResourceGroupName <String>", | ||
"-SenderUsername <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Get a valid sender username for a domains resource.", | ||
"parameters": [ | ||
{ | ||
"name": "-DomainName", | ||
"value": "[Path.domainName]" | ||
}, | ||
{ | ||
"name": "-EmailServiceName", | ||
"value": "[Path.emailServiceName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SenderUsername", | ||
"value": "[Path.senderUsername]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Remove-AzEmailServiceSenderUsername", | ||
"description": "Operation to delete a SenderUsernames resource.", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/senderUsernames/{senderUsername}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.emailservice/remove-azemailservicesenderusername" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-DomainName <String>", | ||
"-EmailServiceName <String>", | ||
"-ResourceGroupName <String>", | ||
"-SenderUsername <String>", | ||
"[-SubscriptionId <String>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Operation to delete a SenderUsernames resource.", | ||
"parameters": [ | ||
{ | ||
"name": "-DomainName", | ||
"value": "[Path.domainName]" | ||
}, | ||
{ | ||
"name": "-EmailServiceName", | ||
"value": "[Path.emailServiceName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SenderUsername", | ||
"value": "[Path.senderUsername]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
95 changes: 95 additions & 0 deletions
95
...Communication/EmailService.Autorest/UX/Microsoft.Communication/emailServices-domains.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"resourceType": "emailServices/domains", | ||
"apiVersion": "2023-06-01-preview", | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.emailservice" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "Get-AzEmailServiceDomain", | ||
"description": "Get the Domains resource and its properties.", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.emailservice/get-azemailservicedomain" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-EmailServiceName <String>", | ||
"-Name <String>", | ||
"-ResourceGroupName <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Get the Domains resource and its properties.", | ||
"parameters": [ | ||
{ | ||
"name": "-EmailServiceName", | ||
"value": "[Path.emailServiceName]" | ||
}, | ||
{ | ||
"name": "-Name", | ||
"value": "[Path.domainName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Remove-AzEmailServiceDomain", | ||
"description": "Operation to delete a Domains resource.", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.emailservice/remove-azemailservicedomain" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-EmailServiceName <String>", | ||
"-Name <String>", | ||
"-ResourceGroupName <String>", | ||
"[-SubscriptionId <String>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Operation to delete a Domains resource.", | ||
"parameters": [ | ||
{ | ||
"name": "-EmailServiceName", | ||
"value": "[Path.emailServiceName]" | ||
}, | ||
{ | ||
"name": "-Name", | ||
"value": "[Path.domainName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.