Skip to content
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
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Communication/EmailService.Autorest/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
16 changes: 16 additions & 0 deletions src/Communication/EmailService.Autorest/.gitignore
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 src/Communication/EmailService.Autorest/Az.EmailService.psd1
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 = ''
}
}
}
83 changes: 83 additions & 0 deletions src/Communication/EmailService.Autorest/README.md
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
use-extension:

"@autorest/powershell": "4.x"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@autorest/powershell": "4.x"


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"'
```
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]"
}
]
}
]
}
]
}
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]"
}
]
}
]
}
]
}
Loading
Loading