diff --git a/src/DataTransfer/DataTransfer.Autorest/README.md b/src/DataTransfer/DataTransfer.Autorest/README.md index 98253df60975..2557e0dfcf6c 100644 --- a/src/DataTransfer/DataTransfer.Autorest/README.md +++ b/src/DataTransfer/DataTransfer.Autorest/README.md @@ -117,7 +117,7 @@ directive: # - remove-operation: Pipelines_ListBySubscription - remove-operation: Operations_List - remove-operation: ListFlowsByPipeline_List - - remove-operation: Pipelines_ExecuteAction + # - remove-operation: Pipelines_ExecuteAction - where: parameter-name: Pipeline diff --git a/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferConnection.ps1 b/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferConnection.ps1 new file mode 100644 index 000000000000..69df3b0aded4 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferConnection.ps1 @@ -0,0 +1,125 @@ +<# +.SYNOPSIS + Disables Azure Data Transfer connections. + +.DESCRIPTION + The Disable-AzDataTransferConnection cmdlet disables Azure Data Transfer connections. + This prevents data transfer operations on the connections and disables all flows within them. + +.PARAMETER PipelineName + The name of the pipeline containing the connections. + +.PARAMETER ResourceGroupName + The name of the resource group containing the pipeline. + +.PARAMETER ConnectionId + One or more connection resource IDs to disable. These should be full ARM resource IDs. + +.PARAMETER SubscriptionId + The ID of the target subscription. If not specified, uses the current context subscription. + +.PARAMETER Justification + Business justification for disabling the connections. + +.PARAMETER DefaultProfile + The credentials, account, tenant, and subscription used for communication with Azure. + +.PARAMETER AsJob + Run the command as a job. + +.PARAMETER NoWait + Run the command asynchronously. + +.EXAMPLE + Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" + + Disables a single connection. + +.EXAMPLE + $connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" + ) + Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds + + Disables multiple connections. + +.EXAMPLE + Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionId -Justification "Security incident response" + + Disables a connection with a business justification. + +.EXAMPLE + Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionId -WhatIf + + Shows what would happen if the connection was disabled without actually disabling it. + +.NOTES + This is a wrapper around Invoke-AzDataTransferExecutePipelineAction with ActionType "ForceDisable" and TargetType "Connection". + This action will also disable all flows within the specified connections. +#> +function Disable-AzDataTransferConnection { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')] + param( + [Parameter(Mandatory=$true, HelpMessage="The name of the pipeline containing the connections")] + [ValidateNotNullOrEmpty()] + [string]$PipelineName, + + [Parameter(Mandatory=$true, HelpMessage="The name of the resource group")] + [ValidateNotNullOrEmpty()] + [string]$ResourceGroupName, + + [Parameter(Mandatory=$true, HelpMessage="One or more connection resource IDs to disable")] + [ValidateNotNullOrEmpty()] + [string[]]$ConnectionId, + + [Parameter(HelpMessage="The ID of the target subscription")] + [string]$SubscriptionId, + + [Parameter(HelpMessage="Business justification for disabling the connections")] + [string]$Justification, + + [Parameter(HelpMessage="The credentials, account, tenant, and subscription used for communication with Azure")] + [PSObject]$DefaultProfile, + + [Parameter(HelpMessage="Run the command as a job")] + [switch]$AsJob, + + [Parameter(HelpMessage="Run the command asynchronously")] + [switch]$NoWait + ) + + begin { + Write-Verbose "Disabling $($ConnectionId.Count) connection(s) in pipeline: $PipelineName" + Write-Warning "This action will disable the specified connections and all flows within them." + } + + process { + $connectionList = $ConnectionId -join ", " + if ($PSCmdlet.ShouldProcess($connectionList, "Disable Azure Data Transfer Connection(s)")) { + try { + # Prepare parameters for the underlying command + $invokeParams = @{ + PipelineName = $PipelineName + ResourceGroupName = $ResourceGroupName + ActionType = "ForceDisable" + Target = $ConnectionId + TargetType = "Connection" + } + + # Add optional parameters if provided + if ($SubscriptionId) { $invokeParams.SubscriptionId = $SubscriptionId } + if ($Justification) { $invokeParams.Justification = $Justification } + if ($DefaultProfile) { $invokeParams.DefaultProfile = $DefaultProfile } + if ($AsJob) { $invokeParams.AsJob = $AsJob } + if ($NoWait) { $invokeParams.NoWait = $NoWait } + + # Call the underlying command + Invoke-AzDataTransferExecutePipelineAction @invokeParams + } + catch { + $PSCmdlet.ThrowTerminatingError($_) + } + } + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferFlowType.ps1 b/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferFlowType.ps1 new file mode 100644 index 000000000000..40ee556afdaa --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferFlowType.ps1 @@ -0,0 +1,128 @@ +<# +.SYNOPSIS + Disables Azure Data Transfer flow types. + +.DESCRIPTION + The Disable-AzDataTransferFlowType cmdlet disables flow types within an Azure Data Transfer pipeline. + This prevents new flows of the specified types from being created and disables existing flows of those types. + +.PARAMETER PipelineName + The name of the pipeline containing the flow types. + +.PARAMETER ResourceGroupName + The name of the resource group containing the pipeline. + +.PARAMETER FlowType + One or more flow type names to disable (e.g., "FlowType01", "FlowType02"). + +.PARAMETER SubscriptionId + The ID of the target subscription. If not specified, uses the current context subscription. + +.PARAMETER Justification + Business justification for disabling the flow types. + +.PARAMETER DefaultProfile + The credentials, account, tenant, and subscription used for communication with Azure. + +.PARAMETER AsJob + Run the command as a job. + +.PARAMETER NoWait + Run the command asynchronously. + +.EXAMPLE + Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" + + Disables the "FlowType01" flow type. + +.EXAMPLE + Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") + + Disables both "FlowType01" and "FlowType02" flow types. + +.EXAMPLE + Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" -Justification "Security incident response" + + Disables a flow type with a business justification. + +.EXAMPLE + Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" -WhatIf + + Shows what would happen if the flow type was disabled without actually disabling it. + +.NOTES + This is a wrapper around Invoke-AzDataTransferExecutePipelineAction with ActionType "ForceDisable" and TargetType "FlowType". + This action will disable all flows of the specified types across all connections in the pipeline. +#> +function Disable-AzDataTransferFlowType { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')] + param( + [Parameter(Mandatory=$true, HelpMessage="The name of the pipeline containing the flow types")] + [ValidateNotNullOrEmpty()] + [string]$PipelineName, + + [Parameter(Mandatory=$true, HelpMessage="The name of the resource group")] + [ValidateNotNullOrEmpty()] + [string]$ResourceGroupName, + + [Parameter(Mandatory=$true, HelpMessage="One or more flow type names to disable")] + [ValidateNotNullOrEmpty()] + [string[]]$FlowType, + + [Parameter(HelpMessage="The ID of the target subscription")] + [string]$SubscriptionId, + + [Parameter(HelpMessage="Business justification for disabling the flow types")] + [string]$Justification, + + [Parameter(HelpMessage="The credentials, account, tenant, and subscription used for communication with Azure")] + [PSObject]$DefaultProfile, + + [Parameter(HelpMessage="Run the command as a job")] + [switch]$AsJob, + + [Parameter(HelpMessage="Run the command asynchronously")] + [switch]$NoWait + ) + + begin { + Write-Verbose "Disabling flow type(s): $($FlowType -join ', ') in pipeline: $PipelineName" + Write-Warning "This action will disable all flows of the specified types across all connections in the pipeline." + + # Validate flow type names (basic validation - actual valid values depend on the service) + foreach ($type in $FlowType) { + if ([string]::IsNullOrWhiteSpace($type)) { + throw "Flow type cannot be null or empty" + } + } + } + + process { + $flowTypeList = $FlowType -join ", " + if ($PSCmdlet.ShouldProcess($flowTypeList, "Disable Azure Data Transfer Flow Type(s)")) { + try { + # Prepare parameters for the underlying command + $invokeParams = @{ + PipelineName = $PipelineName + ResourceGroupName = $ResourceGroupName + ActionType = "ForceDisable" + Target = $FlowType + TargetType = "FlowType" + } + + # Add optional parameters if provided + if ($SubscriptionId) { $invokeParams.SubscriptionId = $SubscriptionId } + if ($Justification) { $invokeParams.Justification = $Justification } + if ($DefaultProfile) { $invokeParams.DefaultProfile = $DefaultProfile } + if ($AsJob) { $invokeParams.AsJob = $AsJob } + if ($NoWait) { $invokeParams.NoWait = $NoWait } + + # Call the underlying command + Invoke-AzDataTransferExecutePipelineAction @invokeParams + } + catch { + $PSCmdlet.ThrowTerminatingError($_) + } + } + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferPipeline.ps1 b/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferPipeline.ps1 new file mode 100644 index 000000000000..b24ac1b3f7c8 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/custom/Disable-AzDataTransferPipeline.ps1 @@ -0,0 +1,107 @@ +<# +.SYNOPSIS + Disables an Azure Data Transfer pipeline. + +.DESCRIPTION + The Disable-AzDataTransferPipeline cmdlet disables an Azure Data Transfer pipeline. + This prevents new connections and flows from being created within the pipeline and disables existing resources. + +.PARAMETER PipelineName + The name of the pipeline to disable. + +.PARAMETER ResourceGroupName + The name of the resource group containing the pipeline. + +.PARAMETER SubscriptionId + The ID of the target subscription. If not specified, uses the current context subscription. + +.PARAMETER Justification + Business justification for disabling the pipeline. + +.PARAMETER DefaultProfile + The credentials, account, tenant, and subscription used for communication with Azure. + +.PARAMETER AsJob + Run the command as a job. + +.PARAMETER NoWait + Run the command asynchronously. + +.EXAMPLE + Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" + + Disables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +.EXAMPLE + Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Emergency shutdown for security review" + + Disables the pipeline with a business justification. + +.EXAMPLE + Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -WhatIf + + Shows what would happen if the pipeline was disabled without actually disabling it. + +.NOTES + This is a wrapper around Invoke-AzDataTransferExecutePipelineAction with ActionType "ForceDisable" and TargetType "Pipeline". +#> +function Disable-AzDataTransferPipeline { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')] + param( + [Parameter(Mandatory=$true, HelpMessage="The name of the pipeline to disable")] + [ValidateNotNullOrEmpty()] + [string]$PipelineName, + + [Parameter(Mandatory=$true, HelpMessage="The name of the resource group")] + [ValidateNotNullOrEmpty()] + [string]$ResourceGroupName, + + [Parameter(HelpMessage="The ID of the target subscription")] + [string]$SubscriptionId, + + [Parameter(HelpMessage="Business justification for disabling the pipeline")] + [string]$Justification, + + [Parameter(HelpMessage="The credentials, account, tenant, and subscription used for communication with Azure")] + [PSObject]$DefaultProfile, + + [Parameter(HelpMessage="Run the command as a job")] + [switch]$AsJob, + + [Parameter(HelpMessage="Run the command asynchronously")] + [switch]$NoWait + ) + + begin { + Write-Verbose "Disabling pipeline: $PipelineName" + Write-Warning "This action will disable the entire pipeline and all its connections and flows." + } + + process { + if ($PSCmdlet.ShouldProcess($PipelineName, "Disable Azure Data Transfer Pipeline")) { + try { + # Prepare parameters for the underlying command + $invokeParams = @{ + PipelineName = $PipelineName + ResourceGroupName = $ResourceGroupName + ActionType = "ForceDisable" + Target = @() + TargetType = "Pipeline" + } + + # Add optional parameters if provided + if ($SubscriptionId) { $invokeParams.SubscriptionId = $SubscriptionId } + if ($Justification) { $invokeParams.Justification = $Justification } + if ($DefaultProfile) { $invokeParams.DefaultProfile = $DefaultProfile } + if ($AsJob) { $invokeParams.AsJob = $AsJob } + if ($NoWait) { $invokeParams.NoWait = $NoWait } + + # Call the underlying command + Invoke-AzDataTransferExecutePipelineAction @invokeParams + } + catch { + $PSCmdlet.ThrowTerminatingError($_) + } + } + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferConnection.ps1 b/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferConnection.ps1 new file mode 100644 index 000000000000..c915cf9199d8 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferConnection.ps1 @@ -0,0 +1,118 @@ +<# +.SYNOPSIS + Enables Azure Data Transfer connections. + +.DESCRIPTION + The Enable-AzDataTransferConnection cmdlet enables previously disabled Azure Data Transfer connections. + This allows the connections to resume data transfer operations and allows new flows to be created within them. + +.PARAMETER PipelineName + The name of the pipeline containing the connections. + +.PARAMETER ResourceGroupName + The name of the resource group containing the pipeline. + +.PARAMETER ConnectionId + One or more connection resource IDs to enable. These should be full ARM resource IDs. + +.PARAMETER SubscriptionId + The ID of the target subscription. If not specified, uses the current context subscription. + +.PARAMETER Justification + Business justification for enabling the connections. + +.PARAMETER DefaultProfile + The credentials, account, tenant, and subscription used for communication with Azure. + +.PARAMETER AsJob + Run the command as a job. + +.PARAMETER NoWait + Run the command asynchronously. + +.EXAMPLE + Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" + + Enables a single connection. + +.EXAMPLE + $connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" + ) + Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds + + Enables multiple connections. + +.EXAMPLE + Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionId -Justification "Re-enabling after maintenance window" + + Enables a connection with a business justification. + +.NOTES + This is a wrapper around Invoke-AzDataTransferExecutePipelineAction with ActionType "AllowUpdates" and TargetType "Connection". +#> +function Enable-AzDataTransferConnection { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory=$true, HelpMessage="The name of the pipeline containing the connections")] + [ValidateNotNullOrEmpty()] + [string]$PipelineName, + + [Parameter(Mandatory=$true, HelpMessage="The name of the resource group")] + [ValidateNotNullOrEmpty()] + [string]$ResourceGroupName, + + [Parameter(Mandatory=$true, HelpMessage="One or more connection resource IDs to enable")] + [ValidateNotNullOrEmpty()] + [string[]]$ConnectionId, + + [Parameter(HelpMessage="The ID of the target subscription")] + [string]$SubscriptionId, + + [Parameter(HelpMessage="Business justification for enabling the connections")] + [string]$Justification, + + [Parameter(HelpMessage="The credentials, account, tenant, and subscription used for communication with Azure")] + [PSObject]$DefaultProfile, + + [Parameter(HelpMessage="Run the command as a job")] + [switch]$AsJob, + + [Parameter(HelpMessage="Run the command asynchronously")] + [switch]$NoWait + ) + + begin { + Write-Verbose "Enabling $($ConnectionId.Count) connection(s) in pipeline: $PipelineName" + } + + process { + $connectionList = $ConnectionId -join ", " + if ($PSCmdlet.ShouldProcess($connectionList, "Enable Azure Data Transfer Connection(s)")) { + try { + # Prepare parameters for the underlying command + $invokeParams = @{ + PipelineName = $PipelineName + ResourceGroupName = $ResourceGroupName + ActionType = "AllowUpdates" + Target = $ConnectionId + TargetType = "Connection" + } + + # Add optional parameters if provided + if ($SubscriptionId) { $invokeParams.SubscriptionId = $SubscriptionId } + if ($Justification) { $invokeParams.Justification = $Justification } + if ($DefaultProfile) { $invokeParams.DefaultProfile = $DefaultProfile } + if ($AsJob) { $invokeParams.AsJob = $AsJob } + if ($NoWait) { $invokeParams.NoWait = $NoWait } + + # Call the underlying command + Invoke-AzDataTransferExecutePipelineAction @invokeParams + } + catch { + $PSCmdlet.ThrowTerminatingError($_) + } + } + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferFlowType.ps1 b/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferFlowType.ps1 new file mode 100644 index 000000000000..294d49f942cf --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferFlowType.ps1 @@ -0,0 +1,121 @@ +<# +.SYNOPSIS + Enables Azure Data Transfer flow types. + +.DESCRIPTION + The Enable-AzDataTransferFlowType cmdlet enables previously disabled flow types within an Azure Data Transfer pipeline. + This allows new flows of the specified types to be created and existing flows of those types to resume operations. + +.PARAMETER PipelineName + The name of the pipeline containing the flow types. + +.PARAMETER ResourceGroupName + The name of the resource group containing the pipeline. + +.PARAMETER FlowType + One or more flow type names to enable (e.g., "FlowType01", "FlowType02"). + +.PARAMETER SubscriptionId + The ID of the target subscription. If not specified, uses the current context subscription. + +.PARAMETER Justification + Business justification for enabling the flow types. + +.PARAMETER DefaultProfile + The credentials, account, tenant, and subscription used for communication with Azure. + +.PARAMETER AsJob + Run the command as a job. + +.PARAMETER NoWait + Run the command asynchronously. + +.EXAMPLE + Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" + + Enables the "FlowType01" flow type. + +.EXAMPLE + Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") + + Enables both "FlowType01" and "FlowType02" flow types. + +.EXAMPLE + Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" -Justification "Re-enabling after security review" + + Enables a flow type with a business justification. + +.NOTES + This is a wrapper around Invoke-AzDataTransferExecutePipelineAction with ActionType "AllowUpdates" and TargetType "FlowType". +#> +function Enable-AzDataTransferFlowType { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory=$true, HelpMessage="The name of the pipeline containing the flow types")] + [ValidateNotNullOrEmpty()] + [string]$PipelineName, + + [Parameter(Mandatory=$true, HelpMessage="The name of the resource group")] + [ValidateNotNullOrEmpty()] + [string]$ResourceGroupName, + + [Parameter(Mandatory=$true, HelpMessage="One or more flow type names to enable")] + [ValidateNotNullOrEmpty()] + [string[]]$FlowType, + + [Parameter(HelpMessage="The ID of the target subscription")] + [string]$SubscriptionId, + + [Parameter(HelpMessage="Business justification for enabling the flow types")] + [string]$Justification, + + [Parameter(HelpMessage="The credentials, account, tenant, and subscription used for communication with Azure")] + [PSObject]$DefaultProfile, + + [Parameter(HelpMessage="Run the command as a job")] + [switch]$AsJob, + + [Parameter(HelpMessage="Run the command asynchronously")] + [switch]$NoWait + ) + + begin { + Write-Verbose "Enabling flow type(s): $($FlowType -join ', ') in pipeline: $PipelineName" + + # Validate flow type names (basic validation - actual valid values depend on the service) + foreach ($type in $FlowType) { + if ([string]::IsNullOrWhiteSpace($type)) { + throw "Flow type cannot be null or empty" + } + } + } + + process { + $flowTypeList = $FlowType -join ", " + if ($PSCmdlet.ShouldProcess($flowTypeList, "Enable Azure Data Transfer Flow Type(s)")) { + try { + # Prepare parameters for the underlying command + $invokeParams = @{ + PipelineName = $PipelineName + ResourceGroupName = $ResourceGroupName + ActionType = "AllowUpdates" + Target = $FlowType + TargetType = "FlowType" + } + + # Add optional parameters if provided + if ($SubscriptionId) { $invokeParams.SubscriptionId = $SubscriptionId } + if ($Justification) { $invokeParams.Justification = $Justification } + if ($DefaultProfile) { $invokeParams.DefaultProfile = $DefaultProfile } + if ($AsJob) { $invokeParams.AsJob = $AsJob } + if ($NoWait) { $invokeParams.NoWait = $NoWait } + + # Call the underlying command + Invoke-AzDataTransferExecutePipelineAction @invokeParams + } + catch { + $PSCmdlet.ThrowTerminatingError($_) + } + } + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferPipeline.ps1 b/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferPipeline.ps1 new file mode 100644 index 000000000000..b5555f25898e --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/custom/Enable-AzDataTransferPipeline.ps1 @@ -0,0 +1,101 @@ +<# +.SYNOPSIS + Enables an Azure Data Transfer pipeline. + +.DESCRIPTION + The Enable-AzDataTransferPipeline cmdlet enables a previously disabled Azure Data Transfer pipeline. + This allows new connections and flows to be created within the pipeline. + +.PARAMETER PipelineName + The name of the pipeline to enable. + +.PARAMETER ResourceGroupName + The name of the resource group containing the pipeline. + +.PARAMETER SubscriptionId + The ID of the target subscription. If not specified, uses the current context subscription. + +.PARAMETER Justification + Business justification for enabling the pipeline. + +.PARAMETER DefaultProfile + The credentials, account, tenant, and subscription used for communication with Azure. + +.PARAMETER AsJob + Run the command as a job. + +.PARAMETER NoWait + Run the command asynchronously. + +.EXAMPLE + Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" + + Enables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +.EXAMPLE + Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Re-enabling after maintenance" + + Enables the pipeline with a business justification. + +.NOTES + This is a wrapper around Invoke-AzDataTransferExecutePipelineAction with ActionType "AllowUpdates" and TargetType "Pipeline". +#> +function Enable-AzDataTransferPipeline { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory=$true, HelpMessage="The name of the pipeline to enable")] + [ValidateNotNullOrEmpty()] + [string]$PipelineName, + + [Parameter(Mandatory=$true, HelpMessage="The name of the resource group")] + [ValidateNotNullOrEmpty()] + [string]$ResourceGroupName, + + [Parameter(HelpMessage="The ID of the target subscription")] + [string]$SubscriptionId, + + [Parameter(HelpMessage="Business justification for enabling the pipeline")] + [string]$Justification, + + [Parameter(HelpMessage="The credentials, account, tenant, and subscription used for communication with Azure")] + [PSObject]$DefaultProfile, + + [Parameter(HelpMessage="Run the command as a job")] + [switch]$AsJob, + + [Parameter(HelpMessage="Run the command asynchronously")] + [switch]$NoWait + ) + + begin { + Write-Verbose "Enabling pipeline: $PipelineName" + } + + process { + if ($PSCmdlet.ShouldProcess($PipelineName, "Enable Azure Data Transfer Pipeline")) { + try { + # Prepare parameters for the underlying command + $invokeParams = @{ + PipelineName = $PipelineName + ResourceGroupName = $ResourceGroupName + ActionType = "AllowUpdates" + Target = @() + TargetType = "Pipeline" + } + + # Add optional parameters if provided + if ($SubscriptionId) { $invokeParams.SubscriptionId = $SubscriptionId } + if ($Justification) { $invokeParams.Justification = $Justification } + if ($DefaultProfile) { $invokeParams.DefaultProfile = $DefaultProfile } + if ($AsJob) { $invokeParams.AsJob = $AsJob } + if ($NoWait) { $invokeParams.NoWait = $NoWait } + + # Call the underlying command + Invoke-AzDataTransferExecutePipelineAction @invokeParams + } + catch { + $PSCmdlet.ThrowTerminatingError($_) + } + } + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Az.DataTransfer.md b/src/DataTransfer/DataTransfer.Autorest/docs/Az.DataTransfer.md index 7c23110e3040..226e9c6a8e6d 100644 --- a/src/DataTransfer/DataTransfer.Autorest/docs/Az.DataTransfer.md +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Az.DataTransfer.md @@ -1,6 +1,6 @@ --- Module Name: Az.DataTransfer -Module Guid: 88c154ed-ced9-4381-b277-441566a6c538 +Module Guid: 2958a59e-8f59-4066-a681-ad0f8ea534b1 Download Help Link: https://learn.microsoft.com/powershell/module/az.datatransfer Help Version: 1.0.0.0 Locale: en-US @@ -17,12 +17,30 @@ Approves the specified connection request in a pipeline. ### [Deny-AzDataTransferConnection](Deny-AzDataTransferConnection.md) Rejects the specified connection request in a pipeline. +### [Disable-AzDataTransferConnection](Disable-AzDataTransferConnection.md) +Disables Azure Data Transfer connections. + ### [Disable-AzDataTransferFlow](Disable-AzDataTransferFlow.md) Disables the specified flow +### [Disable-AzDataTransferFlowType](Disable-AzDataTransferFlowType.md) +Disables Azure Data Transfer flow types. + +### [Disable-AzDataTransferPipeline](Disable-AzDataTransferPipeline.md) +Disables an Azure Data Transfer pipeline. + +### [Enable-AzDataTransferConnection](Enable-AzDataTransferConnection.md) +Enables Azure Data Transfer connections. + ### [Enable-AzDataTransferFlow](Enable-AzDataTransferFlow.md) Enables the specified flow. +### [Enable-AzDataTransferFlowType](Enable-AzDataTransferFlowType.md) +Enables Azure Data Transfer flow types. + +### [Enable-AzDataTransferPipeline](Enable-AzDataTransferPipeline.md) +Enables an Azure Data Transfer pipeline. + ### [Get-AzDataTransferConnection](Get-AzDataTransferConnection.md) Gets connection resource. @@ -38,6 +56,9 @@ Lists all remote flows that have not yet been linked to local flows ### [Get-AzDataTransferPipeline](Get-AzDataTransferPipeline.md) Gets pipeline resource. +### [Invoke-AzDataTransferExecutePipelineAction](Invoke-AzDataTransferExecutePipelineAction.md) +Executes a privileged action for a pipeline. + ### [Invoke-AzDataTransferLinkPendingConnection](Invoke-AzDataTransferLinkPendingConnection.md) Links the connection to its pending connection. diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferConnection.md b/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferConnection.md new file mode 100644 index 000000000000..a18d8ab19d3a --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferConnection.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/disable-azdatatransferconnection +schema: 2.0.0 +--- + +# Disable-AzDataTransferConnection + +## SYNOPSIS +Disables Azure Data Transfer connections. + +## SYNTAX + +``` +Disable-AzDataTransferConnection [-PipelineName] [-ResourceGroupName] + [-ConnectionId] [[-SubscriptionId] ] [[-Justification] ] + [[-DefaultProfile] ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Disable-AzDataTransferConnection cmdlet disables Azure Data Transfer connections. +This prevents data transfer operations on the connections and disables all flows within them. + +## EXAMPLES + +### Example 1: Disable a single connection +```powershell +Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" +``` + +Disables a single connection. + +### Example 2: Disable multiple connections +```powershell +$connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" +) +Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds +``` + +Disables multiple connections. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConnectionId +One or more connection resource IDs to disable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for disabling the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferFlowType.md b/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferFlowType.md new file mode 100644 index 000000000000..cbc9a63d5358 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferFlowType.md @@ -0,0 +1,204 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/disable-azdatatransferflowtype +schema: 2.0.0 +--- + +# Disable-AzDataTransferFlowType + +## SYNOPSIS +Disables Azure Data Transfer flow types. + +## SYNTAX + +``` +Disable-AzDataTransferFlowType [-PipelineName] [-ResourceGroupName] [-FlowType] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Disable-AzDataTransferFlowType cmdlet disables flow types within an Azure Data Transfer pipeline. +This prevents new flows of the specified types from being created and disables existing flows of those types. + +## EXAMPLES + +### Example 1: Disable a single flow type +```powershell +Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" +``` + +Disables the "FlowType01" flow type. + +### Example 2: Disable multiple flow types +```powershell +Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") +``` + +Disables both "FlowType01" and "FlowType02" flow types. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FlowType +One or more flow type names to disable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for disabling the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferPipeline.md b/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferPipeline.md new file mode 100644 index 000000000000..7a4eaa0a0b0f --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Disable-AzDataTransferPipeline.md @@ -0,0 +1,189 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/disable-azdatatransferpipeline +schema: 2.0.0 +--- + +# Disable-AzDataTransferPipeline + +## SYNOPSIS +Disables an Azure Data Transfer pipeline. + +## SYNTAX + +``` +Disable-AzDataTransferPipeline [-PipelineName] [-ResourceGroupName] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Disable-AzDataTransferPipeline cmdlet disables an Azure Data Transfer pipeline. +This prevents new connections and flows from being created within the pipeline and disables existing resources. + +## EXAMPLES + +### Example 1: Disable a pipeline +```powershell +Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +``` + +Disables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +### Example 2: Disable a pipeline with justification +```powershell +Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Emergency shutdown for security review" +``` + +Disables the pipeline with a business justification. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for disabling the pipeline + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline to disable + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferConnection.md b/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferConnection.md new file mode 100644 index 000000000000..b0363f738779 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferConnection.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/enable-azdatatransferconnection +schema: 2.0.0 +--- + +# Enable-AzDataTransferConnection + +## SYNOPSIS +Enables Azure Data Transfer connections. + +## SYNTAX + +``` +Enable-AzDataTransferConnection [-PipelineName] [-ResourceGroupName] + [-ConnectionId] [[-SubscriptionId] ] [[-Justification] ] + [[-DefaultProfile] ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Enable-AzDataTransferConnection cmdlet enables previously disabled Azure Data Transfer connections. +This allows the connections to resume data transfer operations and allows new flows to be created within them. + +## EXAMPLES + +### Example 1: Enable a single connection +```powershell +Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" +``` + +Enables a single connection. + +### Example 2: Enable multiple connections +```powershell +$connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" +) +Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds +``` + +Enables multiple connections. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConnectionId +One or more connection resource IDs to enable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for enabling the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferFlowType.md b/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferFlowType.md new file mode 100644 index 000000000000..97896b08efb3 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferFlowType.md @@ -0,0 +1,204 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/enable-azdatatransferflowtype +schema: 2.0.0 +--- + +# Enable-AzDataTransferFlowType + +## SYNOPSIS +Enables Azure Data Transfer flow types. + +## SYNTAX + +``` +Enable-AzDataTransferFlowType [-PipelineName] [-ResourceGroupName] [-FlowType] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Enable-AzDataTransferFlowType cmdlet enables previously disabled flow types within an Azure Data Transfer pipeline. +This allows new flows of the specified types to be created and existing flows of those types to resume operations. + +## EXAMPLES + +### Example 1: Enable a single flow type +```powershell +Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" +``` + +Enables the "FlowType01" flow type. + +### Example 2: Enable multiple flow types +```powershell +Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") +``` + +Enables both "FlowType01" and "FlowType02" flow types. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FlowType +One or more flow type names to enable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for enabling the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferPipeline.md b/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferPipeline.md new file mode 100644 index 000000000000..ae60c222f818 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Enable-AzDataTransferPipeline.md @@ -0,0 +1,189 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/enable-azdatatransferpipeline +schema: 2.0.0 +--- + +# Enable-AzDataTransferPipeline + +## SYNOPSIS +Enables an Azure Data Transfer pipeline. + +## SYNTAX + +``` +Enable-AzDataTransferPipeline [-PipelineName] [-ResourceGroupName] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Enable-AzDataTransferPipeline cmdlet enables a previously disabled Azure Data Transfer pipeline. +This allows new connections and flows to be created within the pipeline. + +## EXAMPLES + +### Example 1: Enable a pipeline +```powershell +Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +``` + +Enables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +### Example 2: Enable a pipeline with justification +```powershell +Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Re-enabling after maintenance" +``` + +Enables the pipeline with a business justification. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for enabling the pipeline + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline to enable + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/docs/Invoke-AzDataTransferExecutePipelineAction.md b/src/DataTransfer/DataTransfer.Autorest/docs/Invoke-AzDataTransferExecutePipelineAction.md new file mode 100644 index 000000000000..1d43aa04ba17 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/docs/Invoke-AzDataTransferExecutePipelineAction.md @@ -0,0 +1,346 @@ +--- +external help file: +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/invoke-azdatatransferexecutepipelineaction +schema: 2.0.0 +--- + +# Invoke-AzDataTransferExecutePipelineAction + +## SYNOPSIS +Executes a privileged action for a pipeline. + +## SYNTAX + +### ExecuteExpanded (Default) +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + -ActionType -Target -TargetType [-SubscriptionId ] + [-Justification ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### Execute +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + -Action [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### ExecuteViaIdentity +``` +Invoke-AzDataTransferExecutePipelineAction -InputObject -Action + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ExecuteViaIdentityExpanded +``` +Invoke-AzDataTransferExecutePipelineAction -InputObject -ActionType + -Target -TargetType [-Justification ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ExecuteViaJsonFilePath +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### ExecuteViaJsonString +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + -JsonString [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Executes a privileged action for a pipeline. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Action +The action to be executed. + +```yaml +Type: ADT.Models.IAction +Parameter Sets: Execute, ExecuteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ActionType +Type of action to be executed + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: ADT.Models.IDataTransferIdentity +Parameter Sets: ExecuteViaIdentity, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Execute operation + +```yaml +Type: System.String +Parameter Sets: ExecuteViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Execute operation + +```yaml +Type: System.String +Parameter Sets: ExecuteViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for the action + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name for the pipeline to perform the operation on. + +```yaml +Type: System.String +Parameter Sets: Execute, ExecuteExpanded, ExecuteViaJsonFilePath, ExecuteViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Execute, ExecuteExpanded, ExecuteViaJsonFilePath, ExecuteViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Execute, ExecuteExpanded, ExecuteViaJsonFilePath, ExecuteViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Target +Targets for the action + +```yaml +Type: System.String[] +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetType +Type of target to execute the action on + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### ADT.Models.IAction + +### ADT.Models.IDataTransferIdentity + +## OUTPUTS + +### ADT.Models.IPipeline + +## NOTES + +## RELATED LINKS + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferConnection.md b/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferConnection.md new file mode 100644 index 000000000000..cd2622b0a3d6 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferConnection.md @@ -0,0 +1,18 @@ +### Example 1: Disable a single connection +```powershell +Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" +``` + +Disables a single connection. + +### Example 2: Disable multiple connections +```powershell +$connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" +) +Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds +``` + +Disables multiple connections. + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferFlowType.md b/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferFlowType.md new file mode 100644 index 000000000000..c23407c3bf9c --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferFlowType.md @@ -0,0 +1,14 @@ +### Example 1: Disable a single flow type +```powershell +Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" +``` + +Disables the "FlowType01" flow type. + +### Example 2: Disable multiple flow types +```powershell +Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") +``` + +Disables both "FlowType01" and "FlowType02" flow types. + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferPipeline.md b/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferPipeline.md new file mode 100644 index 000000000000..9d12fd907cfa --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Disable-AzDataTransferPipeline.md @@ -0,0 +1,14 @@ +### Example 1: Disable a pipeline +```powershell +Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +``` + +Disables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +### Example 2: Disable a pipeline with justification +```powershell +Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Emergency shutdown for security review" +``` + +Disables the pipeline with a business justification. + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferConnection.md b/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferConnection.md new file mode 100644 index 000000000000..97d72138bc0d --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferConnection.md @@ -0,0 +1,18 @@ +### Example 1: Enable a single connection +```powershell +Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" +``` + +Enables a single connection. + +### Example 2: Enable multiple connections +```powershell +$connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" +) +Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds +``` + +Enables multiple connections. + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferFlowType.md b/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferFlowType.md new file mode 100644 index 000000000000..80525699af79 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferFlowType.md @@ -0,0 +1,14 @@ +### Example 1: Enable a single flow type +```powershell +Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" +``` + +Enables the "FlowType01" flow type. + +### Example 2: Enable multiple flow types +```powershell +Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") +``` + +Enables both "FlowType01" and "FlowType02" flow types. + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferPipeline.md b/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferPipeline.md new file mode 100644 index 000000000000..a3e97f9751cd --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Enable-AzDataTransferPipeline.md @@ -0,0 +1,14 @@ +### Example 1: Enable a pipeline +```powershell +Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +``` + +Enables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +### Example 2: Enable a pipeline with justification +```powershell +Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Re-enabling after maintenance" +``` + +Enables the pipeline with a business justification. + diff --git a/src/DataTransfer/DataTransfer.Autorest/examples/Invoke-AzDataTransferExecutePipelineAction.md b/src/DataTransfer/DataTransfer.Autorest/examples/Invoke-AzDataTransferExecutePipelineAction.md new file mode 100644 index 000000000000..0371f56c36d2 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/examples/Invoke-AzDataTransferExecutePipelineAction.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + diff --git a/src/DataTransfer/DataTransfer.Autorest/generate-info.json b/src/DataTransfer/DataTransfer.Autorest/generate-info.json index c300b6394a55..cf8368d29f85 100644 --- a/src/DataTransfer/DataTransfer.Autorest/generate-info.json +++ b/src/DataTransfer/DataTransfer.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "1f4c5ab5-7a35-4981-86e8-a91faae80ee3" + "generate_Id": "01c8b2c0-6ade-4a5b-a3d9-ee4f7ed56798" } diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferConnection.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferConnection.Tests.ps1 new file mode 100644 index 000000000000..9aa1a5718ec8 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferConnection.Tests.ps1 @@ -0,0 +1,177 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzDataTransferConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzDataTransferConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +$connectionToDisableName = "test-connection-disable-" + $env.RunId +$connectionToDisableAsJobName = "test-connection-disable-asjob-" + $env.RunId +$connectionToDisableNoWaitName = "test-connection-disable-nowait-" + $env.RunId + +Write-Host "Connection names for disable: $connectionToDisableName, $connectionToDisableAsJobName, $connectionToDisableNoWaitName" + +Describe 'Disable-AzDataTransferConnection' { + BeforeAll { + # Create test connections + $connectionParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection disable testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableName + PrimaryContact = "test@example.com" + } + $connectionToDisable = New-AzDataTransferConnection @connectionParams + $connectionToDisableId = $connectionToDisable.Id + + $connectionAsJobParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection disable AsJob testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableAsJobName + PrimaryContact = "test@example.com" + } + $connectionToDisableAsJob = New-AzDataTransferConnection @connectionAsJobParams + $connectionToDisableAsJobId = $connectionToDisableAsJob.Id + + $connectionNoWaitParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection disable NoWait testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableNoWaitName + PrimaryContact = "test@example.com" + } + $connectionToDisableNoWait = New-AzDataTransferConnection @connectionNoWaitParams + $connectionToDisableNoWaitId = $connectionToDisableNoWait.Id + } + + It 'Disable single connection' { + { + # Disable a single connection + $result = Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionToDisableId -Justification "Test disabling connection" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable multiple connections' { + { + # Disable multiple connections + $connectionIds = @($connectionToDisableAsJobId, $connectionToDisableNoWaitId) + $result = Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionIds -Justification "Test disabling multiple connections" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable connection with AsJob' { + { + # Re-create connection for AsJob test + $connectionAsJobParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection disable AsJob testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableAsJobName + "-new" + PrimaryContact = "test@example.com" + } + $newConnection = New-AzDataTransferConnection @connectionAsJobParams + $newConnectionId = $newConnection.Id + + # Disable connection as a background job + $job = Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $newConnectionId -Justification "Test disabling connection as job" -AsJob -Confirm:$false + + # Verify the job is created + $job | Should -Not -BeNullOrEmpty + ($job.State -eq "Running" -or $job.State -eq "Completed") | Should -Be $true + + # Wait for the job to complete + $job | Wait-Job | Out-Null + ($job.State -eq "Completed") | Should -Be $true + + # Clean up + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name ($connectionToDisableAsJobName + "-new") -Confirm:$false -ErrorAction SilentlyContinue + } | Should -Not -Throw + } + + It 'Disable connection with NoWait' { + { + # Re-create connection for NoWait test + $connectionNoWaitParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection disable NoWait testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableNoWaitName + "-new" + PrimaryContact = "test@example.com" + } + $newConnection = New-AzDataTransferConnection @connectionNoWaitParams + $newConnectionId = $newConnection.Id + + # Disable connection asynchronously + $result = Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $newConnectionId -Justification "Test disabling connection with NoWait" -NoWait -Confirm:$false + + # NoWait should return immediately + $result | Should -Not -BeNullOrEmpty + + # Clean up + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name ($connectionToDisableNoWaitName + "-new") -Confirm:$false -ErrorAction SilentlyContinue + } | Should -Not -Throw + } + + It 'Disable connection with WhatIf' { + { + # Test WhatIf functionality using existing connection + $result = Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $env.ConnectionLinkedId -Justification "Test WhatIf" -WhatIf + + # WhatIf should not throw and should not perform actual operation + } | Should -Not -Throw + } + + AfterAll { + # Clean up test connections + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToDisableName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToDisableAsJobName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToDisableNoWaitName -Confirm:$false -ErrorAction SilentlyContinue + } +} + +Describe 'Disable-AzDataTransferConnection' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferFlowType.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferFlowType.Tests.ps1 new file mode 100644 index 000000000000..ad30a1c47fb4 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferFlowType.Tests.ps1 @@ -0,0 +1,135 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzDataTransferFlowType')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzDataTransferFlowType.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +$connectionToDisableFlowTypeName = "test-connection-flowtype-disable-" + $env.RunId +$connectionToDisableFlowTypeAsJobName = "test-connection-flowtype-disable-asjob-" + $env.RunId +$connectionToDisableFlowTypeNoWaitName = "test-connection-flowtype-disable-nowait-" + $env.RunId + +Write-Host "Connection names for FlowType disable: $connectionToDisableFlowTypeName, $connectionToDisableFlowTypeAsJobName, $connectionToDisableFlowTypeNoWaitName" + +Describe 'Disable-AzDataTransferFlowType' { + BeforeAll { + # Create test connections with flows + $connectionParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for FlowType disable testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableFlowTypeName + PrimaryContact = "test@example.com" + } + $connectionToDisableFlowType = New-AzDataTransferConnection @connectionParams + + $connectionAsJobParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for FlowType disable AsJob testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableFlowTypeAsJobName + PrimaryContact = "test@example.com" + } + $connectionToDisableFlowTypeAsJob = New-AzDataTransferConnection @connectionAsJobParams + + $connectionNoWaitParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for FlowType disable NoWait testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToDisableFlowTypeNoWaitName + PrimaryContact = "test@example.com" + } + $connectionToDisableFlowTypeNoWait = New-AzDataTransferConnection @connectionNoWaitParams + } + + It 'Disable single flow type' { + { + # Disable a single flow type + $result = Disable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test disabling flow type" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable multiple flow types' { + { + # Disable multiple flow types + $result = Disable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType @("Mission", "Complex") -Justification "Test disabling multiple flow types" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable flow type with AsJob' { + { + # Disable flow type as a background job + $job = Disable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test disabling flow type as job" -AsJob -Confirm:$false + + # Verify the job is created + $job | Should -Not -BeNullOrEmpty + ($job.State -eq "Running" -or $job.State -eq "Completed") | Should -Be $true + + # Wait for the job to complete + $job | Wait-Job | Out-Null + ($job.State -eq "Completed") | Should -Be $true + } | Should -Not -Throw + } + + It 'Disable flow type with NoWait' { + { + # Disable flow type asynchronously + $result = Disable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test disabling flow type with NoWait" -NoWait -Confirm:$false + + # NoWait should return immediately + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable flow type with WhatIf' { + { + # Test WhatIf functionality + $result = Disable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test WhatIf" -WhatIf + + # WhatIf should not throw and should not perform actual operation + } | Should -Not -Throw + } + + AfterAll { + # Clean up test connections + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToDisableFlowTypeName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToDisableFlowTypeAsJobName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToDisableFlowTypeNoWaitName -Confirm:$false -ErrorAction SilentlyContinue + } +} + +Describe 'Disable-AzDataTransferFlowType' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferPipeline.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferPipeline.Tests.ps1 new file mode 100644 index 000000000000..4f0d4694bbe2 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Disable-AzDataTransferPipeline.Tests.ps1 @@ -0,0 +1,67 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzDataTransferPipeline')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzDataTransferPipeline.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Disable-AzDataTransferPipeline' { + It 'Disable pipeline' { + { + # Disable the pipeline + $result = Disable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test disabling pipeline" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable pipeline with AsJob' { + { + # Disable pipeline as a background job + $job = Disable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test disabling pipeline as job" -AsJob -Confirm:$false + + # Verify the job is created + $job | Should -Not -BeNullOrEmpty + ($job.State -eq "Running" -or $job.State -eq "Completed") | Should -Be $true + + # Wait for the job to complete + $job | Wait-Job | Out-Null + ($job.State -eq "Completed") | Should -Be $true + } | Should -Not -Throw + } + + It 'Disable pipeline with NoWait' { + { + # Disable pipeline asynchronously + $result = Disable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test disabling pipeline with NoWait" -NoWait -Confirm:$false + + # NoWait should return immediately + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Disable pipeline with WhatIf' { + { + # Test WhatIf functionality + $result = Disable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test WhatIf" -WhatIf + + # WhatIf should not throw and should not perform actual operation + } | Should -Not -Throw + } +} + +Describe 'Disable-AzDataTransferPipeline' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferConnection.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferConnection.Tests.ps1 new file mode 100644 index 000000000000..8742023d4aa7 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferConnection.Tests.ps1 @@ -0,0 +1,188 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzDataTransferConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzDataTransferConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +$connectionToEnableName = "test-connection-enable-" + $env.RunId +$connectionToEnableAsJobName = "test-connection-enable-asjob-" + $env.RunId +$connectionToEnableNoWaitName = "test-connection-enable-nowait-" + $env.RunId + +Write-Host "Connection names for enable: $connectionToEnableName, $connectionToEnableAsJobName, $connectionToEnableNoWaitName" + +Describe 'Enable-AzDataTransferConnection' { + BeforeAll { + # Create test connections + $connectionParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection enable testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableName + PrimaryContact = "test@example.com" + } + $connectionToEnable = New-AzDataTransferConnection @connectionParams + $connectionToEnableId = $connectionToEnable.Id + + $connectionAsJobParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection enable AsJob testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableAsJobName + PrimaryContact = "test@example.com" + } + $connectionToEnableAsJob = New-AzDataTransferConnection @connectionAsJobParams + $connectionToEnableAsJobId = $connectionToEnableAsJob.Id + + $connectionNoWaitParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection enable NoWait testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableNoWaitName + PrimaryContact = "test@example.com" + } + $connectionToEnableNoWait = New-AzDataTransferConnection @connectionNoWaitParams + $connectionToEnableNoWaitId = $connectionToEnableNoWait.Id + + # First disable the connections so we can enable them in tests + Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionToEnableId -Justification "Disable for enable testing" -Confirm:$false -ErrorAction SilentlyContinue + Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionToEnableAsJobId -Justification "Disable for enable testing" -Confirm:$false -ErrorAction SilentlyContinue + Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionToEnableNoWaitId -Justification "Disable for enable testing" -Confirm:$false -ErrorAction SilentlyContinue + } + + It 'Enable single connection' { + { + # Enable a single connection + $result = Enable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionToEnableId -Justification "Test enabling connection" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable multiple connections' { + { + # Enable multiple connections + $connectionIds = @($connectionToEnableAsJobId, $connectionToEnableNoWaitId) + $result = Enable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $connectionIds -Justification "Test enabling multiple connections" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable connection with AsJob' { + { + # Re-create and disable connection for AsJob test + $connectionAsJobParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection enable AsJob testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableAsJobName + "-new" + PrimaryContact = "test@example.com" + } + $newConnection = New-AzDataTransferConnection @connectionAsJobParams + $newConnectionId = $newConnection.Id + + # Disable it first + Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $newConnectionId -Justification "Disable for enable testing" -Confirm:$false -ErrorAction SilentlyContinue + + # Enable connection as a background job + $job = Enable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $newConnectionId -Justification "Test enabling connection as job" -AsJob -Confirm:$false + + # Verify the job is created + $job | Should -Not -BeNullOrEmpty + ($job.State -eq "Running" -or $job.State -eq "Completed") | Should -Be $true + + # Wait for the job to complete + $job | Wait-Job | Out-Null + ($job.State -eq "Completed") | Should -Be $true + + # Clean up + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name ($connectionToEnableAsJobName + "-new") -Confirm:$false -ErrorAction SilentlyContinue + } | Should -Not -Throw + } + + It 'Enable connection with NoWait' { + { + # Re-create and disable connection for NoWait test + $connectionNoWaitParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for connection enable NoWait testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableNoWaitName + "-new" + PrimaryContact = "test@example.com" + } + $newConnection = New-AzDataTransferConnection @connectionNoWaitParams + $newConnectionId = $newConnection.Id + + # Disable it first + Disable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $newConnectionId -Justification "Disable for enable testing" -Confirm:$false -ErrorAction SilentlyContinue + + # Enable connection asynchronously + $result = Enable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $newConnectionId -Justification "Test enabling connection with NoWait" -NoWait -Confirm:$false + + # NoWait should return immediately + $result | Should -Not -BeNullOrEmpty + + # Clean up + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name ($connectionToEnableNoWaitName + "-new") -Confirm:$false -ErrorAction SilentlyContinue + } | Should -Not -Throw + } + + It 'Enable connection with WhatIf' { + { + # Test WhatIf functionality using existing connection + $result = Enable-AzDataTransferConnection -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -ConnectionId $env.ConnectionLinkedId -Justification "Test WhatIf" -WhatIf + + # WhatIf should not throw and should not perform actual operation + } | Should -Not -Throw + } + + AfterAll { + # Clean up test connections + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToEnableName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToEnableAsJobName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToEnableNoWaitName -Confirm:$false -ErrorAction SilentlyContinue + } +} + +Describe 'Enable-AzDataTransferConnection' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferFlowType.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferFlowType.Tests.ps1 new file mode 100644 index 000000000000..bd657dda89b4 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferFlowType.Tests.ps1 @@ -0,0 +1,135 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzDataTransferFlowType')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzDataTransferFlowType.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +$connectionToEnableFlowTypeName = "test-connection-flowtype-enable-" + $env.RunId +$connectionToEnableFlowTypeAsJobName = "test-connection-flowtype-enable-asjob-" + $env.RunId +$connectionToEnableFlowTypeNoWaitName = "test-connection-flowtype-enable-nowait-" + $env.RunId + +Write-Host "Connection names for FlowType enable: $connectionToEnableFlowTypeName, $connectionToEnableFlowTypeAsJobName, $connectionToEnableFlowTypeNoWaitName" + +Describe 'Enable-AzDataTransferFlowType' { + BeforeAll { + # Create test connections with flows + $connectionParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for FlowType enable testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableFlowTypeName + PrimaryContact = "test@example.com" + } + $connectionToEnableFlowType = New-AzDataTransferConnection @connectionParams + + $connectionAsJobParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for FlowType enable AsJob testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableFlowTypeAsJobName + PrimaryContact = "test@example.com" + } + $connectionToEnableFlowTypeAsJob = New-AzDataTransferConnection @connectionAsJobParams + + $connectionNoWaitParams = @{ + Location = $env.Location + PipelineName = $env.PipelineName + Direction = "Send" + FlowType = "Mission" + ResourceGroupName = $env.ResourceGroupName + Justification = "Send side for FlowType enable NoWait testing" + RemoteSubscriptionId = $env.SubscriptionId + RequirementId = 0 + Name = $connectionToEnableFlowTypeNoWaitName + PrimaryContact = "test@example.com" + } + $connectionToEnableFlowTypeNoWait = New-AzDataTransferConnection @connectionNoWaitParams + } + + It 'Enable single flow type' { + { + # Enable a single flow type + $result = Enable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test enabling flow type" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable multiple flow types' { + { + # Enable multiple flow types + $result = Enable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType @("Mission", "Complex") -Justification "Test enabling multiple flow types" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable flow type with AsJob' { + { + # Enable flow type as a background job + $job = Enable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test enabling flow type as job" -AsJob -Confirm:$false + + # Verify the job is created + $job | Should -Not -BeNullOrEmpty + ($job.State -eq "Running" -or $job.State -eq "Completed") | Should -Be $true + + # Wait for the job to complete + $job | Wait-Job | Out-Null + ($job.State -eq "Completed") | Should -Be $true + } | Should -Not -Throw + } + + It 'Enable flow type with NoWait' { + { + # Enable flow type asynchronously + $result = Enable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test enabling flow type with NoWait" -NoWait -Confirm:$false + + # NoWait should return immediately + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable flow type with WhatIf' { + { + # Test WhatIf functionality + $result = Enable-AzDataTransferFlowType -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -FlowType "Mission" -Justification "Test WhatIf" -WhatIf + + # WhatIf should not throw and should not perform actual operation + } | Should -Not -Throw + } + + AfterAll { + # Clean up test connections + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToEnableFlowTypeName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToEnableFlowTypeAsJobName -Confirm:$false -ErrorAction SilentlyContinue + Remove-AzDataTransferConnection -ResourceGroupName $env.ResourceGroupName -Name $connectionToEnableFlowTypeNoWaitName -Confirm:$false -ErrorAction SilentlyContinue + } +} + +Describe 'Enable-AzDataTransferFlowType' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferPipeline.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferPipeline.Tests.ps1 new file mode 100644 index 000000000000..2f0b43af8614 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Enable-AzDataTransferPipeline.Tests.ps1 @@ -0,0 +1,67 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzDataTransferPipeline')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzDataTransferPipeline.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Enable-AzDataTransferPipeline' { + It 'Enable pipeline' { + { + # Enable the pipeline + $result = Enable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test enabling pipeline" -Confirm:$false + + # Verify the operation was successful + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable pipeline with AsJob' { + { + # Enable pipeline as a background job + $job = Enable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test enabling pipeline as job" -AsJob -Confirm:$false + + # Verify the job is created + $job | Should -Not -BeNullOrEmpty + ($job.State -eq "Running" -or $job.State -eq "Completed") | Should -Be $true + + # Wait for the job to complete + $job | Wait-Job | Out-Null + ($job.State -eq "Completed") | Should -Be $true + } | Should -Not -Throw + } + + It 'Enable pipeline with NoWait' { + { + # Enable pipeline asynchronously + $result = Enable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test enabling pipeline with NoWait" -NoWait -Confirm:$false + + # NoWait should return immediately + $result | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Enable pipeline with WhatIf' { + { + # Test WhatIf functionality + $result = Enable-AzDataTransferPipeline -PipelineName $env.PipelineName -ResourceGroupName $env.ResourceGroupName -Justification "Test WhatIf" -WhatIf + + # WhatIf should not throw and should not perform actual operation + } | Should -Not -Throw + } +} + +Describe 'Enable-AzDataTransferPipeline' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.Autorest/test/Invoke-AzDataTransferExecutePipelineAction.Tests.ps1 b/src/DataTransfer/DataTransfer.Autorest/test/Invoke-AzDataTransferExecutePipelineAction.Tests.ps1 new file mode 100644 index 000000000000..ab0b2d0aec19 --- /dev/null +++ b/src/DataTransfer/DataTransfer.Autorest/test/Invoke-AzDataTransferExecutePipelineAction.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzDataTransferExecutePipelineAction')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzDataTransferExecutePipelineAction.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzDataTransferExecutePipelineAction' { + It 'ExecuteExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ExecuteViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ExecuteViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Execute' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ExecuteViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ExecuteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataTransfer/DataTransfer.sln b/src/DataTransfer/DataTransfer.sln index 600160b4ee08..960ad4e748ad 100644 --- a/src/DataTransfer/DataTransfer.sln +++ b/src/DataTransfer/DataTransfer.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataTransfer", "DataTransfe EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataTransfer.Autorest", "DataTransfer.Autorest", "{E3651BD2-2AAA-41CF-2DFA-F6780C65890A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataTransfer", "..\..\generated\DataTransfer\DataTransfer.Autorest\Az.DataTransfer.csproj", "{6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataTransfer", "..\..\generated\DataTransfer\DataTransfer.Autorest\Az.DataTransfer.csproj", "{6F4946B1-3D6C-4A18-8E10-941DBD46153A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {23D2B465-3259-453B-A927-C5C4E7EE2375}.Release|x64.Build.0 = Release|Any CPU {23D2B465-3259-453B-A927-C5C4E7EE2375}.Release|x86.ActiveCfg = Release|Any CPU {23D2B465-3259-453B-A927-C5C4E7EE2375}.Release|x86.Build.0 = Release|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Debug|x64.ActiveCfg = Debug|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Debug|x64.Build.0 = Debug|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Debug|x86.ActiveCfg = Debug|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Debug|x86.Build.0 = Debug|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Release|Any CPU.Build.0 = Release|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Release|x64.ActiveCfg = Release|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Release|x64.Build.0 = Release|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Release|x86.ActiveCfg = Release|Any CPU - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F}.Release|x86.Build.0 = Release|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Debug|x64.ActiveCfg = Debug|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Debug|x64.Build.0 = Debug|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Debug|x86.ActiveCfg = Debug|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Debug|x86.Build.0 = Debug|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Release|Any CPU.Build.0 = Release|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Release|x64.ActiveCfg = Release|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Release|x64.Build.0 = Release|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Release|x86.ActiveCfg = Release|Any CPU + {6F4946B1-3D6C-4A18-8E10-941DBD46153A}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {4BDF5DC6-A518-46E6-99C6-3AF3BFE24451} = {32836310-FB5E-5A92-56B4-44D826EF11F5} {244454EF-5EAF-40F6-895F-DA49D8681DFF} = {32836310-FB5E-5A92-56B4-44D826EF11F5} {081B7423-0DAA-462B-ACF1-4C7600C6D131} = {32836310-FB5E-5A92-56B4-44D826EF11F5} - {6EE0B168-8A40-456E-BC5B-0EF350DC9F1F} = {E3651BD2-2AAA-41CF-2DFA-F6780C65890A} + {6F4946B1-3D6C-4A18-8E10-941DBD46153A} = {E3651BD2-2AAA-41CF-2DFA-F6780C65890A} EndGlobalSection EndGlobal diff --git a/src/DataTransfer/DataTransfer/Az.DataTransfer.psd1 b/src/DataTransfer/DataTransfer/Az.DataTransfer.psd1 index a862f53aa674..ef024e78fb50 100644 --- a/src/DataTransfer/DataTransfer/Az.DataTransfer.psd1 +++ b/src/DataTransfer/DataTransfer/Az.DataTransfer.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 6/19/2025 +# Generated on: 8/8/2025 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.1.0'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.2.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'DataTransfer.Autorest/bin/Az.DataTransfer.private.dll' @@ -70,10 +70,14 @@ NestedModules = @('DataTransfer.Autorest/Az.DataTransfer.psm1') # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = 'Approve-AzDataTransferConnection', 'Deny-AzDataTransferConnection', - 'Disable-AzDataTransferFlow', 'Enable-AzDataTransferFlow', + 'Disable-AzDataTransferConnection', 'Disable-AzDataTransferFlow', + 'Disable-AzDataTransferFlowType', 'Disable-AzDataTransferPipeline', + 'Enable-AzDataTransferConnection', 'Enable-AzDataTransferFlow', + 'Enable-AzDataTransferFlowType', 'Enable-AzDataTransferPipeline', 'Get-AzDataTransferConnection', 'Get-AzDataTransferFlow', 'Get-AzDataTransferPendingConnection', 'Get-AzDataTransferPendingFlow', 'Get-AzDataTransferPipeline', + 'Invoke-AzDataTransferExecutePipelineAction', 'Invoke-AzDataTransferLinkPendingConnection', 'Invoke-AzDataTransferLinkPendingFlow', 'New-AzDataTransferConnection', 'New-AzDataTransferFlow', diff --git a/src/DataTransfer/DataTransfer/Properties/AssemblyInfo.cs b/src/DataTransfer/DataTransfer/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..1147ca62f7d7 --- /dev/null +++ b/src/DataTransfer/DataTransfer/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// 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. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - DataTransfer")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("243f6591-4f0c-42e8-a1e1-de168a9efdc0")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/src/DataTransfer/DataTransfer/help/Az.DataTransfer.md b/src/DataTransfer/DataTransfer/help/Az.DataTransfer.md index ccd6c47d2db2..08882c770e18 100644 --- a/src/DataTransfer/DataTransfer/help/Az.DataTransfer.md +++ b/src/DataTransfer/DataTransfer/help/Az.DataTransfer.md @@ -17,12 +17,30 @@ Approves the specified connection request in a pipeline. ### [Deny-AzDataTransferConnection](Deny-AzDataTransferConnection.md) Rejects the specified connection request in a pipeline. +### [Disable-AzDataTransferConnection](Disable-AzDataTransferConnection.md) +Disables Azure Data Transfer connections. + ### [Disable-AzDataTransferFlow](Disable-AzDataTransferFlow.md) Disables the specified flow +### [Disable-AzDataTransferFlowType](Disable-AzDataTransferFlowType.md) +Disables Azure Data Transfer flow types. + +### [Disable-AzDataTransferPipeline](Disable-AzDataTransferPipeline.md) +Disables an Azure Data Transfer pipeline. + +### [Enable-AzDataTransferConnection](Enable-AzDataTransferConnection.md) +Enables Azure Data Transfer connections. + ### [Enable-AzDataTransferFlow](Enable-AzDataTransferFlow.md) Enables the specified flow. +### [Enable-AzDataTransferFlowType](Enable-AzDataTransferFlowType.md) +Enables Azure Data Transfer flow types. + +### [Enable-AzDataTransferPipeline](Enable-AzDataTransferPipeline.md) +Enables an Azure Data Transfer pipeline. + ### [Get-AzDataTransferConnection](Get-AzDataTransferConnection.md) Gets connection resource. @@ -38,6 +56,9 @@ Lists all remote flows that have not yet been linked to local flows ### [Get-AzDataTransferPipeline](Get-AzDataTransferPipeline.md) Gets pipeline resource. +### [Invoke-AzDataTransferExecutePipelineAction](Invoke-AzDataTransferExecutePipelineAction.md) +Executes a privileged action for a pipeline. + ### [Invoke-AzDataTransferLinkPendingConnection](Invoke-AzDataTransferLinkPendingConnection.md) Links the connection to its pending connection. diff --git a/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferConnection.md b/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferConnection.md new file mode 100644 index 000000000000..8dff3c5b9cf4 --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferConnection.md @@ -0,0 +1,208 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/disable-azdatatransferconnection +schema: 2.0.0 +--- + +# Disable-AzDataTransferConnection + +## SYNOPSIS +Disables Azure Data Transfer connections. + +## SYNTAX + +``` +Disable-AzDataTransferConnection [-PipelineName] [-ResourceGroupName] + [-ConnectionId] [[-SubscriptionId] ] [[-Justification] ] + [[-DefaultProfile] ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +The Disable-AzDataTransferConnection cmdlet disables Azure Data Transfer connections. +This prevents data transfer operations on the connections and disables all flows within them. + +## EXAMPLES + +### Example 1: Disable a single connection +```powershell +Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" +``` + +Disables a single connection. + +### Example 2: Disable multiple connections +```powershell +$connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" +) +Disable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds +``` + +Disables multiple connections. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConnectionId +One or more connection resource IDs to disable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for disabling the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferFlowType.md b/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferFlowType.md new file mode 100644 index 000000000000..c5aba50e37a9 --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferFlowType.md @@ -0,0 +1,203 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/disable-azdatatransferflowtype +schema: 2.0.0 +--- + +# Disable-AzDataTransferFlowType + +## SYNOPSIS +Disables Azure Data Transfer flow types. + +## SYNTAX + +``` +Disable-AzDataTransferFlowType [-PipelineName] [-ResourceGroupName] [-FlowType] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The Disable-AzDataTransferFlowType cmdlet disables flow types within an Azure Data Transfer pipeline. +This prevents new flows of the specified types from being created and disables existing flows of those types. + +## EXAMPLES + +### Example 1: Disable a single flow type +```powershell +Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" +``` + +Disables the "FlowType01" flow type. + +### Example 2: Disable multiple flow types +```powershell +Disable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") +``` + +Disables both "FlowType01" and "FlowType02" flow types. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FlowType +One or more flow type names to disable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for disabling the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferPipeline.md b/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferPipeline.md new file mode 100644 index 000000000000..de75736d7dfe --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Disable-AzDataTransferPipeline.md @@ -0,0 +1,188 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/disable-azdatatransferpipeline +schema: 2.0.0 +--- + +# Disable-AzDataTransferPipeline + +## SYNOPSIS +Disables an Azure Data Transfer pipeline. + +## SYNTAX + +``` +Disable-AzDataTransferPipeline [-PipelineName] [-ResourceGroupName] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The Disable-AzDataTransferPipeline cmdlet disables an Azure Data Transfer pipeline. +This prevents new connections and flows from being created within the pipeline and disables existing resources. + +## EXAMPLES + +### Example 1: Disable a pipeline +```powershell +Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +``` + +Disables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +### Example 2: Disable a pipeline with justification +```powershell +Disable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Emergency shutdown for security review" +``` + +Disables the pipeline with a business justification. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for disabling the pipeline + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline to disable + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferConnection.md b/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferConnection.md new file mode 100644 index 000000000000..c0686975a95c --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferConnection.md @@ -0,0 +1,208 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/enable-azdatatransferconnection +schema: 2.0.0 +--- + +# Enable-AzDataTransferConnection + +## SYNOPSIS +Enables Azure Data Transfer connections. + +## SYNTAX + +``` +Enable-AzDataTransferConnection [-PipelineName] [-ResourceGroupName] + [-ConnectionId] [[-SubscriptionId] ] [[-Justification] ] + [[-DefaultProfile] ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +The Enable-AzDataTransferConnection cmdlet enables previously disabled Azure Data Transfer connections. +This allows the connections to resume data transfer operations and allows new flows to be created within them. + +## EXAMPLES + +### Example 1: Enable a single connection +```powershell +Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01" +``` + +Enables a single connection. + +### Example 2: Enable multiple connections +```powershell +$connectionIds = @( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection01", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Private.AzureDataTransfer/connections/Connection02" +) +Enable-AzDataTransferConnection -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -ConnectionId $connectionIds +``` + +Enables multiple connections. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConnectionId +One or more connection resource IDs to enable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for enabling the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the connections + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferFlowType.md b/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferFlowType.md new file mode 100644 index 000000000000..9d550c5d134b --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferFlowType.md @@ -0,0 +1,203 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/enable-azdatatransferflowtype +schema: 2.0.0 +--- + +# Enable-AzDataTransferFlowType + +## SYNOPSIS +Enables Azure Data Transfer flow types. + +## SYNTAX + +``` +Enable-AzDataTransferFlowType [-PipelineName] [-ResourceGroupName] [-FlowType] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The Enable-AzDataTransferFlowType cmdlet enables previously disabled flow types within an Azure Data Transfer pipeline. +This allows new flows of the specified types to be created and existing flows of those types to resume operations. + +## EXAMPLES + +### Example 1: Enable a single flow type +```powershell +Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType "FlowType01" +``` + +Enables the "FlowType01" flow type. + +### Example 2: Enable multiple flow types +```powershell +Enable-AzDataTransferFlowType -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowType @("FlowType01", "FlowType02") +``` + +Enables both "FlowType01" and "FlowType02" flow types. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FlowType +One or more flow type names to enable + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for enabling the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline containing the flow types + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferPipeline.md b/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferPipeline.md new file mode 100644 index 000000000000..3b1550353342 --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Enable-AzDataTransferPipeline.md @@ -0,0 +1,188 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/enable-azdatatransferpipeline +schema: 2.0.0 +--- + +# Enable-AzDataTransferPipeline + +## SYNOPSIS +Enables an Azure Data Transfer pipeline. + +## SYNTAX + +``` +Enable-AzDataTransferPipeline [-PipelineName] [-ResourceGroupName] + [[-SubscriptionId] ] [[-Justification] ] [[-DefaultProfile] ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The Enable-AzDataTransferPipeline cmdlet enables a previously disabled Azure Data Transfer pipeline. +This allows new connections and flows to be created within the pipeline. + +## EXAMPLES + +### Example 1: Enable a pipeline +```powershell +Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +``` + +Enables the pipeline named "Pipeline01" in the "ResourceGroup01" resource group. + +### Example 2: Enable a pipeline with justification +```powershell +Enable-AzDataTransferPipeline -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Justification "Re-enabling after maintenance" +``` + +Enables the pipeline with a business justification. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for enabling the pipeline + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name of the pipeline to enable + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/DataTransfer/DataTransfer/help/Invoke-AzDataTransferExecutePipelineAction.md b/src/DataTransfer/DataTransfer/help/Invoke-AzDataTransferExecutePipelineAction.md new file mode 100644 index 000000000000..1ac68f8f3f0e --- /dev/null +++ b/src/DataTransfer/DataTransfer/help/Invoke-AzDataTransferExecutePipelineAction.md @@ -0,0 +1,346 @@ +--- +external help file: Az.DataTransfer-help.xml +Module Name: Az.DataTransfer +online version: https://learn.microsoft.com/powershell/module/az.datatransfer/invoke-azdatatransferexecutepipelineaction +schema: 2.0.0 +--- + +# Invoke-AzDataTransferExecutePipelineAction + +## SYNOPSIS +Executes a privileged action for a pipeline. + +## SYNTAX + +### ExecuteExpanded (Default) +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + [-SubscriptionId ] -ActionType -Target -TargetType + [-Justification ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### ExecuteViaJsonString +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### ExecuteViaJsonFilePath +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### Execute +``` +Invoke-AzDataTransferExecutePipelineAction -PipelineName -ResourceGroupName + [-SubscriptionId ] -Action [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### ExecuteViaIdentityExpanded +``` +Invoke-AzDataTransferExecutePipelineAction -InputObject -ActionType + -Target -TargetType [-Justification ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-WhatIf] [-Confirm] [] +``` + +### ExecuteViaIdentity +``` +Invoke-AzDataTransferExecutePipelineAction -InputObject -Action + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Executes a privileged action for a pipeline. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Action +The action to be executed. + +```yaml +Type: ADT.Models.IAction +Parameter Sets: Execute, ExecuteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ActionType +Type of action to be executed + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: ADT.Models.IDataTransferIdentity +Parameter Sets: ExecuteViaIdentityExpanded, ExecuteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Execute operation + +```yaml +Type: System.String +Parameter Sets: ExecuteViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Execute operation + +```yaml +Type: System.String +Parameter Sets: ExecuteViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Justification +Business justification for the action + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PipelineName +The name for the pipeline to perform the operation on. + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaJsonString, ExecuteViaJsonFilePath, Execute +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaJsonString, ExecuteViaJsonFilePath, Execute +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaJsonString, ExecuteViaJsonFilePath, Execute +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Target +Targets for the action + +```yaml +Type: System.String[] +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetType +Type of target to execute the action on + +```yaml +Type: System.String +Parameter Sets: ExecuteExpanded, ExecuteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### ADT.Models.IAction + +### ADT.Models.IDataTransferIdentity + +## OUTPUTS + +### ADT.Models.IPipeline + +## NOTES + +## RELATED LINKS