Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Accounts/Accounts.Test/EnvironmentCmdletTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ public void CanCreateEnvironmentWithAllProperties()
AzureOperationalInsightsEndpoint = "https://AzureOperationalInsights",
AzureAttestationServiceEndpointResourceId = "AzureAttestationServiceEndpointResourceId",
AzureAttestationServiceEndpointSuffix = "https://AzureAttestationService",
AzureSynapseAnalyticsEndpointResourceId = "AzureSynapseAnalyticsEndpointResourceId",
AzureSynapseAnalyticsEndpointSuffix = "https://AzureSynapseAnalytics",
};

var dict = new Dictionary<string, object>();
Expand All @@ -407,6 +409,8 @@ public void CanCreateEnvironmentWithAllProperties()
dict["AzureOperationalInsightsEndpoint"] = "https://AzureOperationalInsights";
dict["AzureAttestationServiceEndpointResourceId"] = "AzureAttestationServiceEndpointResourceId";
dict["AzureAttestationServiceEndpointSuffix"] = "https://AzureAttestationService";
dict["AzureSynapseAnalyticsEndpointResourceId"] = "AzureSynapseAnalyticsEndpointResourceId";
dict["AzureSynapseAnalyticsEndpointSuffix"] = "https://AzureSynapseAnalytics";
cmdlet.SetBoundParameters(dict);

cmdlet.InvokeBeginProcessing();
Expand Down Expand Up @@ -436,6 +440,8 @@ public void CanCreateEnvironmentWithAllProperties()
Assert.Equal(cmdlet.AzureOperationalInsightsEndpoint, actual.AzureOperationalInsightsEndpoint);
Assert.Equal(cmdlet.AzureAttestationServiceEndpointResourceId, actual.AzureAttestationServiceEndpointResourceId);
Assert.Equal(cmdlet.AzureAttestationServiceEndpointSuffix, actual.AzureAttestationServiceEndpointSuffix);
Assert.Equal(cmdlet.AzureSynapseAnalyticsEndpointResourceId, actual.AzureSynapseAnalyticsEndpointResourceId);
Assert.Equal(cmdlet.AzureSynapseAnalyticsEndpointSuffix, actual.AzureSynapseAnalyticsEndpointSuffix);
commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny<PSAzureEnvironment>()), Times.Once());
IAzureEnvironment env = AzureRmProfileProvider.Instance.Profile.GetEnvironment("KaTaL");
Assert.Equal(env.Name, cmdlet.Name);
Expand Down
1 change: 1 addition & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->
## Upcoming Release
* Removed alias of `Resolve-AzError`
* Updated Add-AzEnvironment and Set-AzEnvironment to accept parameters AzureSynapseAnalyticsEndpointResourceId and AzureSynapseAnalyticsEndpointSuffix

## Version 1.7.5
* Updated Azure PowerShell survey URL in `Resolve-AzError` [#11507]
Expand Down
11 changes: 11 additions & 0 deletions src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ public string DataLakeAudience
HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")]
public string AzureAttestationServiceEndpointResourceId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "Dns suffix of Azure Synapse Analytics.")]
public string AzureSynapseAnalyticsEndpointSuffix { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.")]
public string AzureSynapseAnalyticsEndpointResourceId { get; set; }

protected override void BeginProcessing()
{
Expand Down Expand Up @@ -329,6 +336,10 @@ public override void ExecuteCmdlet()
nameof(AzureAttestationServiceEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId,
nameof(AzureAttestationServiceEndpointResourceId));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix,
nameof(AzureSynapseAnalyticsEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId,
nameof(AzureSynapseAnalyticsEndpointResourceId));
WriteObject(new PSAzureEnvironment(profileClient.AddOrSetEnvironment(newEnvironment)));
}
});
Expand Down
12 changes: 12 additions & 0 deletions src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ public string DataLakeAudience
HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")]
public string AzureAttestationServiceEndpointResourceId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "Dns suffix of Azure Synapse Analytics.")]
public string AzureSynapseAnalyticsEndpointSuffix { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.")]
public string AzureSynapseAnalyticsEndpointResourceId { get; set; }

protected override void BeginProcessing()
{
// do not call begin processing there is no context needed for this cmdlet
Expand Down Expand Up @@ -329,6 +337,10 @@ public override void ExecuteCmdlet()
nameof(AzureAttestationServiceEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId,
nameof(AzureAttestationServiceEndpointResourceId));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix,
nameof(AzureSynapseAnalyticsEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId,
nameof(AzureSynapseAnalyticsEndpointResourceId));
WriteObject(new PSAzureEnvironment(profileClient.AddOrSetEnvironment(newEnvironment)));
}
});
Expand Down
36 changes: 35 additions & 1 deletion src/Accounts/Accounts/help/Add-AzEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Add-AzEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String>] [[-Servi
[[-BatchEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>] [-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-AzureAttestationServiceEndpointSuffix <String>]
[-AzureAttestationServiceEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-AzureAttestationServiceEndpointResourceId <String>] [-AzureSynapseAnalyticsEndpointSuffix <String>]
[-AzureSynapseAnalyticsEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand All @@ -38,6 +39,7 @@ Add-AzEnvironment [-Name] <String> [[-StorageEndpoint] <String>] [-ARMEndpoint]
[[-AzureOperationalInsightsEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>] [-AzureAnalysisServicesEndpointResourceId <String>]
[-AzureAttestationServiceEndpointSuffix <String>] [-AzureAttestationServiceEndpointResourceId <String>]
[-AzureSynapseAnalyticsEndpointSuffix <String>] [-AzureSynapseAnalyticsEndpointResourceId <String>]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
Expand Down Expand Up @@ -91,6 +93,8 @@ AzureOperationalInsightsEndpoint :
AzureAnalysisServicesEndpointSuffix :
AzureAttestationServiceEndpointSuffix :
AzureAttestationServiceEndpointResourceId :
AzureSynapseAnalyticsEndpointSuffix :
AzureSynapseAnalyticsEndpointResourceId :
VersionProfiles : {}
ExtendedProperties : {}
BatchEndpointResourceId :
Expand Down Expand Up @@ -310,6 +314,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -AzureSynapseAnalyticsEndpointResourceId
The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -AzureSynapseAnalyticsEndpointSuffix
Dns suffix of Azure Synapse Analytics.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -BatchEndpointResourceId
The resource identifier of the Azure Batch service that is the recipient of the requested token

Expand Down
36 changes: 35 additions & 1 deletion src/Accounts/Accounts/help/Set-AzEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Set-AzEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String>] [[-Servi
[[-BatchEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>] [-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-AzureAttestationServiceEndpointSuffix <String>]
[-AzureAttestationServiceEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-AzureAttestationServiceEndpointResourceId <String>] [-AzureSynapseAnalyticsEndpointSuffix <String>]
[-AzureSynapseAnalyticsEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand All @@ -38,6 +39,7 @@ Set-AzEnvironment [-Name] <String> [[-StorageEndpoint] <String>] [-ARMEndpoint]
[[-AzureOperationalInsightsEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>] [-AzureAnalysisServicesEndpointResourceId <String>]
[-AzureAttestationServiceEndpointSuffix <String>] [-AzureAttestationServiceEndpointResourceId <String>]
[-AzureSynapseAnalyticsEndpointSuffix <String>] [-AzureSynapseAnalyticsEndpointResourceId <String>]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
Expand Down Expand Up @@ -88,6 +90,8 @@ AzureOperationalInsightsEndpoint :
AzureOperationalInsightsEndpointResourceId :
AzureAttestationServiceEndpointSuffix :
AzureAttestationServiceEndpointResourceId :
AzureSynapseAnalyticsEndpointSuffix :
AzureSynapseAnalyticsEndpointResourceId :
```

In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created environment using the cmdlet Set-AzEnvironment.
Expand Down Expand Up @@ -303,6 +307,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -AzureSynapseAnalyticsEndpointResourceId
The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -AzureSynapseAnalyticsEndpointSuffix
Dns suffix of Azure Synapse Analytics.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -BatchEndpointResourceId
The resource identifier of the Azure Batch service that is the recipient of the requested token

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public PSAzureEnvironment(PSObject other)
AzureAttestationServiceEndpointResourceId =
other.GetProperty<string>(nameof(AzureAttestationServiceEndpointResourceId));
AzureAttestationServiceEndpointSuffix = other.GetProperty<string>(nameof(AzureAttestationServiceEndpointSuffix));
AzureSynapseAnalyticsEndpointResourceId =
other.GetProperty<string>(nameof(AzureSynapseAnalyticsEndpointResourceId));
AzureSynapseAnalyticsEndpointSuffix = other.GetProperty<string>(nameof(AzureSynapseAnalyticsEndpointSuffix));
VersionProfiles.Populate(nameof(VersionProfiles), other);
this.PopulateExtensions(other);
}
Expand Down Expand Up @@ -324,6 +327,36 @@ public string AzureAttestationServiceEndpointResourceId
}
}

/// <summary>
/// The domain name suffix for Azure Synapse Analyticss
/// </summary>
public string AzureSynapseAnalyticsEndpointSuffix
{
get
{
return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix);
}
set
{
this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix, value);
}
}

/// <summary>
/// Gets or sets the resource Id to use for contacting the Synapse Analyticss endpoint
/// </summary>
public string AzureSynapseAnalyticsEndpointResourceId
{
get
{
return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId);
}
set
{
this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId, value);
}
}

public IList<string> VersionProfiles { get; } = new List<string>();

public IDictionary<string, string> ExtendedProperties { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Expand Down
Loading