From 34c849f39190a59001d2e436ecf012675263808d Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Wed, 17 Jan 2024 08:39:43 -0800 Subject: [PATCH 1/4] Update release date for azappconfig --- sdk/data/azappconfig/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/data/azappconfig/CHANGELOG.md b/sdk/data/azappconfig/CHANGELOG.md index 771db50fb7f3..f7ed77d7083e 100644 --- a/sdk/data/azappconfig/CHANGELOG.md +++ b/sdk/data/azappconfig/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0 (2024-01-16) +## 1.1.0 (2024-01-17) ### Features Added * Added support for [`Snapshots`](https://learn.microsoft.com/azure/azure-app-configuration/concept-snapshots). From d7fa5d46ecfded1e9b78c0ab5d0d12c47fa30a86 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Wed, 17 Jan 2024 13:35:38 -0800 Subject: [PATCH 2/4] update to latest azcore --- sdk/data/azappconfig/go.mod | 10 +++++----- sdk/data/azappconfig/go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sdk/data/azappconfig/go.mod b/sdk/data/azappconfig/go.mod index c355c12d5db2..89342c1ce9f0 100644 --- a/sdk/data/azappconfig/go.mod +++ b/sdk/data/azappconfig/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/data/azappconfig go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 github.com/stretchr/testify v1.8.4 @@ -18,10 +18,10 @@ require ( github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/sdk/data/azappconfig/go.sum b/sdk/data/azappconfig/go.sum index e58339a398cf..077e482da9a1 100644 --- a/sdk/data/azappconfig/go.sum +++ b/sdk/data/azappconfig/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= @@ -23,15 +23,15 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From e0e1d545bbd779d8d8fab69cd82b363f7a1dfd1d Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Wed, 17 Jan 2024 13:42:26 -0800 Subject: [PATCH 3/4] fix LRO options type name --- sdk/data/azappconfig/client.go | 6 +++--- sdk/data/azappconfig/client_test.go | 2 +- sdk/data/azappconfig/examples_test.go | 2 +- sdk/data/azappconfig/options.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/data/azappconfig/client.go b/sdk/data/azappconfig/client.go index aea6bab6732b..8bdedec025ae 100644 --- a/sdk/data/azappconfig/client.go +++ b/sdk/data/azappconfig/client.go @@ -382,10 +382,10 @@ func (c *Client) NewListSettingsForSnapshotPager(snapshotName string, options *L // // - snapshotName - The name of the snapshot to create. // - settingFilter - The filters to apply on the key-values. -// - options - CreateSnapshotOptions contains the optional parameters to create a Snapshot -func (c *Client) BeginCreateSnapshot(ctx context.Context, snapshotName string, settingFilter []SettingFilter, options *CreateSnapshotOptions) (*runtime.Poller[CreateSnapshotResponse], error) { +// - options - BeginCreateSnapshotOptions contains the optional parameters to create a Snapshot +func (c *Client) BeginCreateSnapshot(ctx context.Context, snapshotName string, settingFilter []SettingFilter, options *BeginCreateSnapshotOptions) (*runtime.Poller[CreateSnapshotResponse], error) { if options == nil { - options = &CreateSnapshotOptions{} + options = &BeginCreateSnapshotOptions{} } filter := make([]generated.KeyValueFilter, len(settingFilter)) diff --git a/sdk/data/azappconfig/client_test.go b/sdk/data/azappconfig/client_test.go index 3cc538062d60..9d758bc75b33 100644 --- a/sdk/data/azappconfig/client_test.go +++ b/sdk/data/azappconfig/client_test.go @@ -605,7 +605,7 @@ func CreateSnapshot(c *azappconfig.Client, snapshotName string, sf []azappconfig } } - opts := &azappconfig.CreateSnapshotOptions{ + opts := &azappconfig.BeginCreateSnapshotOptions{ RetentionPeriod: to.Ptr[int64](3600), } diff --git a/sdk/data/azappconfig/examples_test.go b/sdk/data/azappconfig/examples_test.go index 97ab354a83c6..7251bd8c4d95 100644 --- a/sdk/data/azappconfig/examples_test.go +++ b/sdk/data/azappconfig/examples_test.go @@ -266,7 +266,7 @@ func ExampleClient_BeginCreateSnapshot() { }, } - _, err = client.BeginCreateSnapshot(context.TODO(), snapshotName, filter, &azappconfig.CreateSnapshotOptions{}) + _, err = client.BeginCreateSnapshot(context.TODO(), snapshotName, filter, nil) if err != nil { // TODO: Update the following line with your application specific error handling logic diff --git a/sdk/data/azappconfig/options.go b/sdk/data/azappconfig/options.go index 5fd21e38d9c4..89d71119428f 100644 --- a/sdk/data/azappconfig/options.go +++ b/sdk/data/azappconfig/options.go @@ -85,8 +85,8 @@ type SetSettingOptions struct { OnlyIfUnchanged *azcore.ETag } -// CreateSnapshotOptions contains the optional parameters for the BeginCreateSnapshot method. -type CreateSnapshotOptions struct { +// BeginCreateSnapshotOptions contains the optional parameters for the BeginCreateSnapshot method. +type BeginCreateSnapshotOptions struct { // Resumes the LRO from the provided token. ResumeToken string From 65c6dc13de25bb10cbe0ff06161adffc785c1dec Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Wed, 17 Jan 2024 13:52:54 -0800 Subject: [PATCH 4/4] more example cleanup --- sdk/data/azappconfig/examples_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/data/azappconfig/examples_test.go b/sdk/data/azappconfig/examples_test.go index 7251bd8c4d95..4cc3e2215a28 100644 --- a/sdk/data/azappconfig/examples_test.go +++ b/sdk/data/azappconfig/examples_test.go @@ -289,7 +289,7 @@ func ExampleClient_ArchiveSnapshot() { snapshotName := "existing-snapshot-example" - _, err = client.ArchiveSnapshot(context.TODO(), snapshotName, &azappconfig.ArchiveSnapshotOptions{}) + _, err = client.ArchiveSnapshot(context.TODO(), snapshotName, nil) if err != nil { // TODO: Update the following line with your application specific error handling logic @@ -312,7 +312,7 @@ func ExampleClient_RecoverSnapshot() { snapshotName := "existing-snapshot-example" - _, err = client.RecoverSnapshot(context.TODO(), snapshotName, &azappconfig.RecoverSnapshotOptions{}) + _, err = client.RecoverSnapshot(context.TODO(), snapshotName, nil) if err != nil { // TODO: Update the following line with your application specific error handling logic @@ -397,7 +397,7 @@ func ExampleClient_GetSnapshot() { snapshotName := "snapshot-example" - snapshot, err := client.GetSnapshot(context.TODO(), snapshotName, &azappconfig.GetSnapshotOptions{}) + snapshot, err := client.GetSnapshot(context.TODO(), snapshotName, nil) if err != nil { // TODO: Update the following line with your application specific error handling logic