Skip to content

Add new cmdlets for AzureDataTransfer #27926

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

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9ca89d2
Add readme for AzureDataTransfer
Mar 26, 2025
dec5cc8
add all changes
May 13, 2025
785c4af
regen docs
May 13, 2025
189a985
remove policy param
May 13, 2025
5a1075e
rename pendingConnectionId
May 13, 2025
b5e8e2c
hide params from create flow
May 13, 2025
f13cf34
remove from update as well
May 13, 2025
b14a27b
rename for PendingFlowId
May 13, 2025
6f6a967
hide params from update flow
May 14, 2025
ff70a8d
remove redundant tests
May 14, 2025
64256f1
Add all get tests
May 14, 2025
3d63a8b
add delete tests
May 14, 2025
b75e34d
add enable / disable tests
May 14, 2025
a7f0b5c
add approve/deny tests
May 14, 2025
e72c872
add tests for linking
May 14, 2025
485ed8e
add tests for create cmdlets
May 14, 2025
4eceb26
add update tests
May 14, 2025
34824de
add tests to CTS folder
May 16, 2025
cac9d1d
more changes for private testing
May 16, 2025
98aeb4b
Fix approve/deny tests
May 19, 2025
f431856
Fix more tests
May 19, 2025
4f06d45
fix rest of Get tests
May 19, 2025
28da3d1
fix create tests
May 19, 2025
8f5a8e7
fix remove tests
May 19, 2025
682446c
fix updates
May 19, 2025
04546b8
fix links
May 19, 2025
fe85eef
Add tests for AsJob
May 20, 2025
c45a6c1
add tests to ADT folder
May 20, 2025
26e49d7
nit changes
May 20, 2025
d8de35f
run codegen on new spec
May 22, 2025
f28c1be
remove enable-disable pipelines from scope
May 28, 2025
f001d5b
missed this
May 28, 2025
67c3247
add test script updates
May 29, 2025
823adef
Changes to tests for new pipeline in CORP
May 30, 2025
bc77733
more cleanup
May 30, 2025
996f6d9
fix id
May 30, 2025
d087979
Fix update tests
May 30, 2025
1ec8945
added recordings
May 30, 2025
5fd56f2
rest of changes
May 30, 2025
167c14e
delete private RP code
May 30, 2025
c9faa91
Merge branch 'main' of https://github.com/fzkhan/azure-powershell int…
May 30, 2025
5e8bbe8
Update to newest API version
Jun 10, 2025
c7b634b
use disable-getput flag: not working rn
Jun 10, 2025
e50f55d
Updated examples
Jun 10, 2025
71f5374
ran build
Jun 10, 2025
bdfd69b
skip failing test for now
Jun 10, 2025
5af4341
update test recordings for new API version
Jun 10, 2025
77fee93
separate out scripts
Jun 10, 2025
04ca7bc
better examples
Jun 10, 2025
e3d0ab4
Re-record tests
Jun 11, 2025
1881214
updated cmdlets examples for new API version
Jun 11, 2025
21beba3
remove scripts
Jun 11, 2025
1862471
revert changes to loadEnv.ps1
Jun 11, 2025
74f3ea5
revert changes to Databricks folder
Jun 11, 2025
65fd01e
remove added files from Databricks folder
Jun 11, 2025
0ce7087
add changeLog file as per instructions
Jun 11, 2025
2a4f91d
nit: comments
Jun 11, 2025
f64c945
nit: fix typo in the docs
Jun 11, 2025
d2111b7
nit: minor doc changes
Jun 12, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
16 changes: 16 additions & 0 deletions src/AzureDataTransfer/AzureDataTransfer.Autorest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
bin
obj
.vs
generated
internal
exports
tools
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
/*.csproj
/*.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - AzureDataTransfer")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
226 changes: 226 additions & 0 deletions src/AzureDataTransfer/AzureDataTransfer.Autorest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
<!-- region Generated -->
# Az.DataTransfer
This directory contains the PowerShell module for the DataTransfer service.

---
## 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.DataTransfer`, see [how-to.md](how-to.md).
<!-- endregion -->

### AutoRest Configuration

> see [def](https://aka.ms/autorest)

```yaml
# pin the swagger version by using the commit id instead of branch name
commit: c424d91129a85194f3a0800a6bb5dcd28f8eb6eb
namespace: ADT
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/azuredatatransfer/resource-manager/readme.md
# 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-local-readme.md

try-require:
- $(repo)/specification/azuredatatransfer/resource-manager/readme.powershell.md

# For new RP, the version is 0.1.0
module-version: 0.1.0
# Normally, title is the service name
title: AzureDataTransfer
subject-prefix: DataTransfer

# The next three configurations are exclusive to v3, and in v4, they are activated by default. If you are still using v3, please uncomment them.
# identity-correction-for-post: true
# resourcegroup-append: true
# nested-object-to-string: true

## Flags to use PATCH method for Update-*
disable-getput: true
disable-transform-identity-type: true
flatten-userassignedidentity: false

directive:
# Following are common directives which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required
# Following two directives are v4 specific
- where:
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity.*$
remove: true
# Follow directive is v3 specific. If you are using v3, uncomment following directive and comments out two directives above
#- where:
# variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
# remove: true

# Remove the set-* cmdlet
- where:
verb: Set
remove: true

- remove-operation: AzureDataTransfer_validateSchema
- remove-operation: AzureDataTransfer_listApprovedSchemas
# - remove-operation: Flows_Get
# - remove-operation: Flows_CreateOrUpdate
# - remove-operation: Flows_Delete
# - remove-operation: Flows_Update
# - remove-operation: Flows_Enable
# - remove-operation: Flows_Disable
# - remove-operation: Flows_Link
- remove-operation: Flows_SetPassphrase
- remove-operation: Flows_GeneratePassphrase
- remove-operation: Flows_GetSourceAddresses
- remove-operation: Flows_SetSourceAddresses
- remove-operation: Flows_GetDestinationEndpoints
- remove-operation: Flows_SetDestinationEndpoints
- remove-operation: Flows_GetDestinationEndpointPorts
- remove-operation: Flows_SetDestinationEndpointPorts
- remove-operation: Flows_GetStreamConnectionString
# - remove-operation: Flows_ListByConnection
# - remove-operation: Connections_Get
# - remove-operation: Connections_CreateOrUpdate
# - remove-operation: Connections_Delete
# - remove-operation: Connections_Update
# - remove-operation: Connections_Link
# - remove-operation: ListPendingConnections_List
# - remove-operation: ListPendingFlows_List
# - remove-operation: Connections_ListByResourceGroup
# - remove-operation: Connections_ListBySubscription
# - remove-operation: Pipelines_Get
- remove-operation: Pipelines_CreateOrUpdate
- remove-operation: Pipelines_Delete
- remove-operation: Pipelines_Update
# - remove-operation: Pipelines_ApproveConnection
# - remove-operation: Pipelines_RejectConnection
- remove-operation: ListSchemas_List
# - remove-operation: Pipelines_ListByResourceGroup
# - remove-operation: Pipelines_ListBySubscription
- remove-operation: Operations_List
- remove-operation: ListFlowsByPipeline_List
- remove-operation: Pipelines_ExecuteAction

- where:
parameter-name: Pipeline
set:
parameter-name: PipelineName

- where:
parameter-name: IdentityUserAssignedIdentity
set:
parameter-name: UserAssignedIdentity

# Rename to avoid codegen errors
- from: swagger-document
where: $.definitions.streamSourceAddresses.properties.sourceAddresses
transform: $['x-ms-client-name'] = 'AddressList'
- from: swagger-document
where: $.definitions.flowProperties.properties.connection
transform: $['x-ms-client-name'] = 'FlowPropertiesConnection'

# Rename approve/reject ConnectionId param
- where:
verb: Invoke
subject: ^RejectPipelineConnection$
parameter-name: Id
set:
parameter-name: ConnectionId

- where:
verb: Approve
subject: ^PipelineConnection$
parameter-name: Id
set:
parameter-name: ConnectionId

# Rename approve/reject Connection cmdlets
- where:
verb: Invoke
subject: ^RejectPipelineConnection$
set:
verb: Deny
subject: Connection

- where:
verb: Approve
subject: ^PipelineConnection$
set:
subject: Connection

# Rename Link cmdlets
- where:
verb: Invoke
subject: ^LinkConnection$
parameter-name: Id
set:
parameter-name: PendingConnectionId

- where:
verb: Invoke
subject: ^LinkFlow$
parameter-name: Id
set:
parameter-name: PendingFlowId

- where:
verb: Invoke
subject: ^LinkConnection$
set:
subject: LinkPendingConnection

- where:
verb: Invoke
subject: ^LinkFlow$
set:
subject: LinkPendingFlow

# Hide unneeded params
- where:
verb: New
subject: ^Connection$
parameter-name: Policy
hide: true

- where:
verb: New|Update
subject: ^Flow$
parameter-name: Policy
hide: true

- where:
verb: New|Update
subject: ^Flow$
parameter-name: KeyVaultUri
hide: true

- where:
verb: New|Update
subject: ^Flow$
parameter-name: ^FlowProperty*
hide: true

- where:
verb: Update
subject: ^Flow$
parameter-name: DestinationEndpoint|DestinationEndpointPort|Passphrase|SourceAddressList
hide: true
```
Loading