Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen committed Jul 10, 2023
2 parents 6fe0dc3 + d481b3d commit 71d0558
Show file tree
Hide file tree
Showing 16 changed files with 630 additions and 170 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.5.0] - 2023-05-31

### Changed

- The access token in the `Connect-Service` command cannot be within the connection string but is an optional parameter.
- Connecting to a azure sql server without a access token, will aquire a new token.

### Added

- Added deploy options to `Install-Package`.

## [1.3.0] - 2023-03-14

### Added
Expand Down
8 changes: 4 additions & 4 deletions docs/Connect-DacService.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Connects a database instance using DacServices.

### ConnectionString (Default)
```
Connect-DacService [-ConnectionString] <String> [<CommonParameters>]
Connect-DacService [-ConnectionString] <String> [-AccessToken <String>] [<CommonParameters>]
```

### DataSource
### Properties
```
Connect-DacService [-DataSource] <String> [-AccessToken <String>] [<CommonParameters>]
```
Expand All @@ -42,7 +42,7 @@ Specifies a token for authentication.

```yaml
Type: String
Parameter Sets: DataSource
Parameter Sets: (All)
Aliases:

Required: False
Expand Down Expand Up @@ -73,7 +73,7 @@ Specifies the datasource or server name to connect to.
```yaml
Type: String
Parameter Sets: DataSource
Parameter Sets: Properties
Aliases:

Required: True
Expand Down
217 changes: 216 additions & 1 deletion docs/Install-DacPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ Installs the package content to a database.

```
Install-DacPackage [-Package] <DacPackage> -DatabaseName <String> [-UpgradeExisting]
[-ExcludeObjectTypes <ObjectType[]>] [-Service <DacServices>] [<CommonParameters>]
[-ExcludeObjectTypes <ObjectType[]>] [-DoNotDropObjectTypes <ObjectType[]>] [-AcceptPossibleDataLoss]
[-Variables <Hashtable>] [-CommandTimeout <Int32>] [-LongRunningCommandTimeout <Int32>]
[-DatabaseLockTimeout <Int32>] [-DropConstraintsNotInSource] [-DropDmlTriggersNotInSource]
[-DropExtendedPropertiesNotInSource] [-DropIndexesNotInSource] [-DropObjectsNotInSource]
[-DropPermissionsNotInSource] [-DropRoleMembersNotInSource] [-DropStatisticsNotInSource]
[-Service <DacServices>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -109,6 +114,216 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -CommandTimeout
{{ Fill CommandTimeout Description }}
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DatabaseLockTimeout
{{ Fill DatabaseLockTimeout Description }}
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DoNotDropObjectTypes
{{ Fill DoNotDropObjectTypes Description }}
```yaml
Type: ObjectType[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropConstraintsNotInSource
{{ Fill DropConstraintsNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropDmlTriggersNotInSource
{{ Fill DropDmlTriggersNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropExtendedPropertiesNotInSource
{{ Fill DropExtendedPropertiesNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropIndexesNotInSource
{{ Fill DropIndexesNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropObjectsNotInSource
{{ Fill DropObjectsNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropPermissionsNotInSource
{{ Fill DropPermissionsNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropRoleMembersNotInSource
{{ Fill DropRoleMembersNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DropStatisticsNotInSource
{{ Fill DropStatisticsNotInSource Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -LongRunningCommandTimeout
{{ Fill LongRunningCommandTimeout Description }}
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Variables
{{ Fill Variables Description }}
```yaml
Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AcceptPossibleDataLoss
{{ Fill AcceptPossibleDataLoss Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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).
Expand Down
20 changes: 20 additions & 0 deletions src/PsDac/AzureAuthProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Microsoft.SqlServer.Dac;
using Microsoft.Azure.Services.AppAuthentication;

namespace PsDac
{
internal class AzureAuthProvider : IUniversalAuthProvider
{
public string Resource { get; private set; }

public AzureAuthProvider (string resource)
{
Resource = resource;
}

public string GetValidAccessToken()
{
return new AzureServiceTokenProvider().GetAccessTokenAsync(resource: Resource).Result;
}
}
}
Loading

0 comments on commit 71d0558

Please sign in to comment.