-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Communication] - PhoneNumberClient - Adding samples for phone number administration #16935
[Communication] - PhoneNumberClient - Adding samples for phone number administration #16935
Conversation
Update from Azure
Pull latest from head repository
Cool stuff, can we split this PR into two? One for live tests, one for samples? |
…pavel/feature/communication/administration_samples_2
…pavel/feature/communication/administration_samples_2
…R_LIVE_TESTS env var is not True
Pull latest master to fork
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
…_samples # Conflicts: # sdk/communication/Azure.Communication.Administration/tests/Infrastructure/PhoneNumberAdministrationClientLiveTestBase.cs # sdk/communication/Azure.Communication.Administration/tests/PhoneNumberAdministrationClient/PhoneNumberAdministrationClientLiveTests.cs # sdk/communication/Azure.Communication.Administration/tests/SessionRecords/PhoneNumberAdministrationClientLiveTests/CreateReservationErrorState(%en-US%)Async.json # sdk/communication/Azure.Communication.Administration/tests/SessionRecords/PhoneNumberAdministrationClientLiveTests/CreateReservationErrorState(null)Async.json
.../Azure.Communication.Administration/tests/samples/Sample2_PhoneNumberAdministrationClient.cs
Outdated
Show resolved
Hide resolved
public void GetPhonePlanLocationOptions() | ||
{ | ||
var client = CreateClient(false); | ||
var locale = "en-US"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
instead of var
. Same for the country code and other methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.../Azure.Communication.Administration/tests/samples/Sample2_PhoneNumberAdministrationClient.cs
Outdated
Show resolved
Hide resolved
@@ -153,6 +153,10 @@ public async Task GetAreaCodesForPlan(string? locale) | |||
[AsyncOnly] | |||
public async Task CreateReservationErrorState(string? locale) | |||
{ | |||
if (!IncludePhoneNumberLiveTests) | |||
Assert.Ignore("Include phone number live tests flag is off."); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
break; | ||
} | ||
|
||
Thread.Sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christothes is there a better recommended way to have sync tests for long running operations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christothes @RezaJooyandeh just a reminder that this test code is copied over MD sample file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's follow how KeyVault has written the code. https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#purging-a-deleted-key
while (!newPhoneNumberReservationOperation.HasCompleted)
{
Thread.Sleep(2000);
operation.UpdateStatus();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
#region Snippet:ReleasePhoneNumbersAsync | ||
//@@var acquiredPhoneNumber = "<acquired_phone_number>"; | ||
var phoneNumbers = new List<PhoneNumber> { new PhoneNumber(acquiredPhoneNumber) }; | ||
var phoneNumberReleaseOperation = client.StartReleasePhoneNumbers(phoneNumbers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can inline:
client.StartReleasePhoneNumbers(new [] { new PhoneNumber(acquiredPhoneNumber) });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RezaJooyandeh I would prefer to leave second line simpler as this is for the MD sample and it is somewhat easier to those who is glancing over it to catch that release starts by passing some phoneNumbers, whatever type those are.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both is fine, inlined or not. But I agree with Reza that new[] {
reads better than new List<PhoneNumber> {
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a new method that takes a single phone number and used it on a sample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on the samples and writing the README! 🐱💻
Added comments with fixes and suggestions on the text. Also weighed in on the infinite loop for synchronously polling a LRO.
|
||
## Creating a PhoneNumberAdministrationClient | ||
|
||
To create a new `PhoneNumberAdministrationClient` you need a connection string to the Azure Communication Services resource that you can get from the Azure Portal once you create a relevant resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To create a new `PhoneNumberAdministrationClient` you need a connection string to the Azure Communication Services resource that you can get from the Azure Portal once you create a relevant resource. | |
To create a new `PhoneNumberAdministrationClient` you need a connection string to the Azure Communication Services resource that you can get from the Azure Portal once you have created the resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## Listing all supported countries | ||
|
||
In order to acquire a phone number you will need to know if Azure Communication Services are available in particular country. You can do that by retrieving a list of supported countries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to acquire a phone number you will need to know if Azure Communication Services are available in particular country. You can do that by retrieving a list of supported countries. | |
In order to acquire a phone number you will need to know if Azure Communication Services are available in a particular country. You can find out by retrieving a list of supported countries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## Get area codes | ||
|
||
Fetching area codes for geographic phone plans will require the the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the GetPhonePlanLocationOptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetching area codes for geographic phone plans will require the the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the GetPhonePlanLocationOptions. | |
Fetching area codes for geographic phone plans will require the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the GetPhonePlanLocationOptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
``` | ||
|
||
Area codes for toll free phone plans can be found in the plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Area codes for toll free phone plans can be found in the plan. | |
Area codes for toll-free phone plans can be found in the plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## Reserve phone numbers | ||
|
||
Phone numbers need to be reserved for purchase. Reservation is a long running operation that can be started by CreateReservationOptions function that returns an PhoneNumberReservationOperation object. PhoneNumberReservationOperation can be used to update status of the operation and to check for completeness. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go through the file and `` format all references to code where we use the literal name of a type or method. Just fixing one sentence here as an example.
Phone numbers need to be reserved for purchase. Reservation is a long running operation that can be started by CreateReservationOptions function that returns an PhoneNumberReservationOperation object. PhoneNumberReservationOperation can be used to update status of the operation and to check for completeness. | |
Phone numbers need to be reserved before they can be purchased. Reservation is a long running operation that can be started by `CreateReservationOptions` function that returns an `PhoneNumberReservationOperation` object. `PhoneNumberReservationOperation` can be used to update status of the operation and to check for completeness. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Console.WriteLine($"Area code: {areaCode}"); | ||
} | ||
|
||
#endregion Snippet:TollFreePlanAreCodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#endregion Snippet:TollFreePlanAreCodes | |
#endregion Snippet:TollFreePlanAreaCodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
var phonePlanGroups = client.GetPhonePlanGroups(countryCode, locale); | ||
var tollFreePhonePlanGroup = phonePlanGroups.First(group => group.PhoneNumberType == PhoneNumberType.TollFree); | ||
|
||
#region Snippet:TollFreePlanAreCodesAsync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#region Snippet:TollFreePlanAreCodesAsync | |
#region Snippet:TollFreePlanAreaCodesAsync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Console.WriteLine($"Area code: {areaCode}"); | ||
} | ||
|
||
#endregion Snippet:TollFreePlanAreCodesAsync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#endregion Snippet:TollFreePlanAreCodesAsync | |
#endregion Snippet:TollFreePlanAreaCodesAsync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
break; | ||
} | ||
|
||
Thread.Sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's follow how KeyVault has written the code. https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#purging-a-deleted-key
while (!newPhoneNumberReservationOperation.HasCompleted)
{
Thread.Sleep(2000);
operation.UpdateStatus();
}
|
||
// persist reservationOperationId and then continue with new operation | ||
|
||
var newPhoneNumberReservationOperation = new PhoneNumberReservationOperation(client, reservationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we shorten the name? Maybe just operation
or reserveOperation
.
The context makes it clear what the operation is about and it can't be confused with another operation, that's why I think a short and less precise name reads better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on reserveOperation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it newReserveOperation to stress that is a new object created with reservationId
Also there is reserveOperation variable in the same test where code snippet is coming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually one would only prefix variable names with new
if they are a new replacement for something existing, for example an event handler with newValue
. Otherwise every variable that holds a constructed object would start with new
. In general, we're preferring short names over encoding types in the name, which is a practice that comes from Hungarian notation among others and is now discouraged.
To avoid a name clash with the other reserveOperation
you can extract a function to have a new context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to reserveOperation
var locationOptionsResponse = await client.GetPhonePlanLocationOptionsAsync(countryCode, geographicPhonePlanGroupId, geographicPhonePlanId); | ||
var state = locationOptionsResponse.Value.LocationOptions.Options.First(); | ||
|
||
var locationOptionsQueries = new List<LocationOptionsQuery>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
on the new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some outstanding naming nits and question to Reza about adding the overload.
|
||
## Get area codes | ||
|
||
Fetching area codes for geographic phone plans will require the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the GetPhonePlanLocationOptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetching area codes for geographic phone plans will require the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the GetPhonePlanLocationOptions. | |
Fetching area codes for geographic phone plans will require the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the `GetPhonePlanLocationOptions`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Phone numbers can be acquired through purchasing a reservation. | ||
|
||
```C# Snippet:StartPurchaseReservation | ||
var reservationPurchaseOperation = client.StartPurchaseReservation(reservationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can shorten this to purchaseOperation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
```C# Snippet:ReleasePhoneNumbers | ||
var acquiredPhoneNumber = "<acquired_phone_number>"; | ||
var phoneNumberReleaseOperation = client.StartReleasePhoneNumber(new PhoneNumber(acquiredPhoneNumber)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's shorten to releaseOperation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Phone numbers can be acquired through purchasing a reservation. | ||
|
||
```C# Snippet:StartPurchaseReservationAsync | ||
var reservationPurchaseOperation = await client.StartPurchaseReservationAsync(reservationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's shorten the name to purchaseOperation
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
```C# Snippet:ReleasePhoneNumbersAsync | ||
var acquiredPhoneNumber = "<acquired_phone_number>"; | ||
var phoneNumberReleaseOperation = client.StartReleasePhoneNumber(new PhoneNumber(acquiredPhoneNumber)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's shorten the name to releaseOperation
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/// <param name="phoneNumber"> The phone number in the release request. </param> | ||
/// <param name="cancellationToken"> The cancellation token to use. </param> | ||
/// <returns> A <see cref="ReleasePhoneNumberOperation"/>. </returns> | ||
public virtual async Task<ReleasePhoneNumberOperation> StartReleasePhoneNumberAsync(PhoneNumber phoneNumber, CancellationToken cancellationToken = default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine adding another overload for a single number. What do you think @RezaJooyandeh?
Ideally we would add the overload for each language to stay consistent. Also, a change like this should happen in its own PR (see my other comment about strict single-purpose PRs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Synced up offline, ready to merge after addressing the comments with the next commit.
* Use pre steps to determine whether to record live tests (#17063) * Use pre steps to determine record * Add TestMode setting * Simplify live test post steps to use TestMode for recording condition * Swtich back to smoke-test before doc publishing error gets fixed. (#17091) Co-authored-by: Sima Zhu <sizhu@microsoft.com> * Azure Monitor Exporter - Update readme (#17094) * Update readme * Update sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/README.md Co-authored-by: Reiley Yang <reyang@microsoft.com> Co-authored-by: Reiley Yang <reyang@microsoft.com> * Minor tweak in queue equals check (#17104) * [Event Hubs Client] Docs Enhancements (#17085) The focus of these changes is to correct a bug in the samples and to introduce an SDK-level overview, covering each of the libraries. * Sync eng/common directory with azure-sdk-tools for PR 1219 (#17108) * Move entire docgeneration into common tools * Move docindex to common * Added the package replacement logic * Fixed on parameters * Fixed param * Change function to dash * Added regex on function * Added display name. * Update eng/common/docgeneration/Generate-DocIndex.ps1 Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * Deal with js * Add no new line args * revert some test changes * Need to default to the double quotes for JS regex * Update Generate-DocIndex.ps1 * Added the appTitle * type Co-authored-by: Sima Zhu <sizhu@microsoft.com> Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * [live tests] Minor fixes for SupportedClouds and Location overrides/defaults (#17039) * Default to true when live test platform does not have SupportedClouds override * Fall back to empty location default for live tests * simplify null checks * Support for Identity in Patch for Microsoft.RecoveryServices/Vaults (#17016) * Adding Identity support for Patch Vault * Adding Release notes for the changes * Resolving the breaking changes by adding identity * Merge Feature/formrecognizer2.1 into master (#17121) * [FR] Update to 2.1-preview.2 with generation and recordings (#16462) * generation and recordings * missing tests * PR feedback * enable test * export-api * [FR] Add invoices functionality (#16522) * add invoices * pr feedback * export api * Update sdk/formrecognizer/Azure.AI.FormRecognizer/src/RecognizeInvoicesOperation.cs Co-authored-by: Krista Pratico <krpratic@microsoft.com> Co-authored-by: Krista Pratico <krpratic@microsoft.com> * [FR] Add documentation for invoices (#16659) * documentation * PR feedback * generation plus small fixes (#16787) * [FR] Expose code generated properties (#16841) * selection mark state order: * appearance * bounding box * content-type bmp * pages * update to 2.1-preview.2 * language (#16889) * added more test for copy feature (#16892) * enable receipt and bc (#17004) * remove bc workaround (#17025) * disable receipts, enable AAD, move to canada (#17119) Co-authored-by: Krista Pratico <krpratic@microsoft.com> * add changelog for a new nuget minor version bump (#17131) * Add EnablePartitioning to QueueProperties ctor; rename GetRawMessage (#17101) * Add EnablePartitioning to QueueProperties ctor; rename GetRawMessage * Revert test change * Port ATOM fix * fix * PR fb * Fix rest doc links for app config samples (#17127) * [Identity] Merging feature/identity/140 back to master (#17083) * {Identity] Prototype TokenCache option to enable sharing cache across credentials and executions * prototype updates * adding client side user authentication samples * adding persistent token cache options * fix compilation issues * adding token cache samples * fix header * reword * updating API spec * temporary fix for AzureStack eng bits * workaround for MSA account * ignore failure test cases temporarily * update api sig * update version * update change log * update version * fix changelog * fix msal cache * update msal version * removing AuthenticationTokenRecord workaround * adding configuration to SharedTokenCacheCredential * upgrading msal * update snippet * [Identity] prepare for 1.4.0-beta.1 release (#16021) * Updating changelog for 1.4.0-beta.1 release * updating MSAL dependency * Increment package version after release of Azure.Identity (#16028) * make AuthenticationRecord public * making APIs public that got switched to internal in merge * adressing PR feedback * add tests for new STCC options Co-authored-by: Erich(Renyong) Wang <eriwan@microsoft.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> * [Event Hubs Client] Fix Live Test Hangs (#17132) The focus of these changes is to triage the test hangs in the live suite that seem to be related to the snippet smoke tests. This should unblock test runs while I continue to troubleshoot and locate the root cause. * Increment version for servicebus releases (#17134) Increment package version after release of Microsoft.Azure.ServiceBus * fix links (#17139) * [Synapse][Spark] - Fix null reference exception due to some nullable properties (#17112) Co-authored-by: Dongwei Wang <dongwwa@microsoft.com> * [Synapse] - update version for Spark SDK (#17146) Co-authored-by: Dongwei Wang <dongwwa@microsoft.com> * Increment version for synapse releases (#17147) Increment package version after release of Azure.Analytics.Synapse.Spark * Integrate InheritDoc into the build (#17123) # Summary Adds a reference to [InheritDoc](https://www.nuget.org/packages/SauceControl.InheritDoc/) to replace all `/// <inheritdoc/>` comments with the actual comment content in the documentation xml produced by the build. This is a development-only dependency; it will not be deployed with or referenced by the libraries. Note this produces a lot of warnings for `<inheritdoc />` comments that need to be further refined with a `cref="somBaseType"` attribute. Some examples of this are included in this PR. Example for `Azure.Security.KeyVault.Administration.xml`: **Before** ```xml <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Id"> <inheritdoc/> </member> <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Value"> <inheritdoc/> </member> <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasCompleted"> <inheritdoc/> </member> <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasValue"> <inheritdoc/> </member> <member name="M:Azure.Security.KeyVault.Administration.RestoreOperation.GetRawResponse"> <inheritdoc/> </member> ``` **After** ```xml <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Id"> <summary> Gets an ID representing the operation that can be used to poll for the status of the long-running operation. </summary> </member> <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Value"> <summary> Final result of the long-running operation. </summary><remarks> This property can be accessed only after the operation completes successfully (HasValue is true). </remarks> </member> <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasCompleted"> <summary> Returns true if the long-running operation completed. </summary> </member> <member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasValue"> <summary> Returns true if the long-running operation completed successfully and has produced final result (accessible by Value property). </summary> </member> <member name="M:Azure.Security.KeyVault.Administration.RestoreOperation.GetRawResponse"> <summary> The last HTTP response received from the server. </summary><remarks> The last response returned from the server during the lifecycle of this instance. An instance of Operation<typeparamref name="T" /> sends requests to a server in UpdateStatusAsync, UpdateStatus, and other methods. Responses from these requests can be accessed using GetRawResponse. </remarks> </member> ``` * Add NET 5.0 testing (#16947) * TSI: Add default values for ARM parameters (#17133) * [FR] Updates before release (#17152) * pre-release checklist changes * update sample in readme * GA release (#17151) * Fix CONTRIBUTING.md .NET 5 SDK link (#17161) * Increment version for formrecognizer releases (#17165) Increment package version after release of Azure.AI.FormRecognizer * Increment version for core releases (#17162) Increment package version after release of Azure.Core.Amqp * Sync eng/common directory with azure-sdk-tools for PR 1226 (#17128) * Fixed the docindex.yml and rename the files * Reset the mutated changes * Force checkout as the changes have already copied out * Minor changes for parameters * Update Generate-DocIndex.ps1 * Update Generate-DocIndex.ps1 * Update Generate-DocIndex.ps1 * Added function to common * Update Generate-DocIndex.ps1 Co-authored-by: Sima Zhu <sizhu@microsoft.com> Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> * Update FxCop analyzers (#17157) * Skip .NET 5 installation on Windows (#17167) The default image should now have the .NET 5 available. * Prepare for release (#17166) * Prepare for release * remove version from csproj * remove preview from changelog * remove project ref (#17171) * [Synapse] - Generate SDK based on the latest Swagger spec (#17070) * [Synapse] - Generate SDK based on the latest Swagger spec * Update release notes Co-authored-by: Dongwei Wang <dongwwa@microsoft.com> * [DataFactory] Set computeType, coreCount to object type to allow expressions (#16804) * [DataFactory] Set computeType, coreCount to object type to allow expressions * Add a test * Change PartitionOption to object to allow expression * Add test cases * Fixed the bug of the wrong parameter (#17169) Co-authored-by: Sima Zhu <sizhu@microsoft.com> * Increment version for servicebus releases (#17172) Increment package version after release of Azure.Messaging.ServiceBus * Enable EventHubs WebJobs extension live tests (#17029) Goals: 1. Get E2E live tests running so we can start iterating while having some level of validation * Azure Monitor Exporter: LogExporter (#17117) * saving wip * tests * wip * log details * mark classes internal while WIP * tests * disable Task.Delay * cleanup * cleanup * cleanup * fix datetime * include condition; if not default * todo * [FR] Undo customized internal enum (#17182) Fixes: #13867 Codegen now creates enums as internal too, so our customization is no longer needed * Add sync HttpClient support (#13722) Fixes: #13476 A lot of nullability fixed because of building against assemblies with annotations. * [FR] Enable validation for DataTableCell.Text not null in invoices (#17187) Bug in the Invoices endpoint where `Text` was not returned has been fixed and deployed to prod regions, so enabling the validation for it again. Fixes: #16514 * Miberezi (#16978) * fixing client libraries of private store * adding missed file * Fixing the SKD per the latest swagger files changes (fixing S360 issues) * updating the SDK after swagger fixes Azure/azure-rest-api-specs#11787 * [Communication] - PhoneNumberAdministrationClient - adding live tests (#16962) * Update storage generator to suppress FxCop issues (#17181) * [HMACAuthenticationPolicyTest] added new not null check for authValue (#17178) * Enable code coverage (#17067) * Use VSTest integration for Coverlet Fixes #15231. Relates to #14427. * Do not ignore CompilerGeneratedAttribute See coverlet-coverage/coverlet#794 (comment) * Enable code coverage for PRs * Publish code coverage even for failed tests * Enable code coverage reports Resolves #14427 by limiting reports to a single service directory (CIs) or per test project (dev environments). For CIs, full coverage reports of everything build will be uploaded. For dev environments, a summary HTML file will be output to test projects' TestResults directories. * Fix filefilters path for CI * Use absolute path for filefilters Same as dev support; reportgenerator documentation is not clear on when absolute or relative paths are required. * Use absolute path for reports * Update report directory to limit globbing * Disable code coverage of track 2 mgmt Opened #17090 to track re-enabling once improved. * Generate report before uploading test results The exact same commands are working locally using the same versions of ReportGenerator, sans running the test publishing executable. There's also extra coverage files showing up that I'm wondering if it's responsible. * Temporarily upload all code coverage artifacts * Split between props and targets again At one point, this mostly worked. Going back to how I was split between props and targets before to see if that makes a difference. * Collect more information * Always define CoverletGetPathMap @clairernovotny recommended important some changes. These are working locally when simulating a CI, so 🤞. * Resolve PR feedback Fix extra (temporary) logging as well. * Use different variable to detect CI ContinuousIntegrationBuild wasn't defined for test projects. * Replace curly braces with Of in file names Fixes #17164 * Removing extra logging * Renames files with curly braces Fixes #17164 * Resolve PR feedback * Do not reformat HTML coverage report * fix live test issue (#17200) * Install dotnet when running smoke tests (#17208) * ADT: add info about object serializer override (#17199) * Add blurb about dist tracing (#17059) - Addresses #16238 - Update LineCounter sample app to show usage of Event Grid - Update LineCounter README to include a screenshot of Azure Monitor - Update Distributed Tracing section in Diagnostics readme to link to LineCounter. - Also add in DI extension methods. * Fix EventGrid Readme issue (#17209) * Fix EventGrid Readme issue * Update README.md * do not check if there any aquired numbers. Will cover this check in the sample tests (#17212) * log azurite stderr. (#17230) * [CODEOWNERS] Add chamons to synapse (#17238) * Fix doc comment for CertificatePolicy.Default (#17231) * Temporarily disable live test weekly allow-all filter (#17236) * ConvertPrebuiltOutputToRecognizedForms moved to ClientCommon (#17185) * Properly create secondary endpoint Uri for Azurite endpoints (#17246) fixes #17215 * [FR] Add AAD tests for every endpoint (#17191) * add tests for every endpoint * remove playback * custom forms with and withouth labels for aad * Use BlobsCheckpointStore in scale monitor (#17241) * Update Redis Enterprise to match Updated Swagger (#17214) * Add support for Redis Enterprise. * Add SessionRecords from successful tests. * Add redisenterprise pipeline. * Updated SDK to match updated Swagger. * [Event Hubs Client] Live Test Fixes (#17261) The focus of these changes is to fix a couple of race conditions causing some tests to be flaky and to adjust the scope creation approach used for snippet test. The global setup/cleanup was causing occasional long delays that appeared to be hangs during nightly runs. * [Communication] - PhoneNumberClient - Adding samples for phone number administration (#16935) * inroduce phone number addministration tests * Samples are created * Improve sanitization in tests * Improve sanitization in tests * Update test records * Ignore phone numbers live test for not playback if INCLUDE_PHONENUMBER_LIVE_TESTS env var is not True * Update readme * Update readme * samples wording update * rename test * addressing tests code formatting * addressing tests code formatting * add assertion to sample test * add release phone number method for single number * add release phone number method for single number - update api * address PR comments (sample wording and renames) * update sample wording and some variable names * Send metadata header on IMDS probe request. (#15875) * Call imds instance endpoint instead of token endpoint to probe for imds, extend timeout * Update msi token tests to distinguish between which imds endpoint is being called * Fix comment and visibility in test * Change per stpetrov * re-trigger checks * Add metadata header to probe request * CloudNative.CloudEvents bridge library (#17234) * CloudNative.CloudEvents bridge library * PR fb * Fix NUnit casing * Export API * Add Mohit to Search owners list (#17275) * Remove abstraction layers from EventHubs WebJobs extensions (#17271) There are some layers in EventHubs WebJobs extensions that were the artifact of Track 2 refactoring. Remove them to simplify the code a bit. Major changes: * Merge `Processor` and `EventProcessorHost` * Merge `ProcessorPartitionContext` and `Partition`, rename to `EventProcessorHostPartition` * Remove ICheckpointer * Fix to be able to CanGenerateSas and GenerateSas from storage clients generated by GetClient (#17232) * Support moniker specific output folders (#17295) * updating CI config with moniker specific readme/service output * Update to latest AMQP package version (#17290) * Do not generate reports with no coverage (#17293) Fixes #17286 * Delete redundant files and point to common scripts (#17292) * Added support for AccountInfo.IsHierarchicalNamespaceEnabled (#17285) * Fix template path for tests.yml (#17198) * Add a default value for environmentName (#17309) * Resources SDK version 2020-10 (#17163) * Generated SDK and re-recorded tests * rerecord remaining tests * Updated version and release notes * regenerate from Swagger. Fixed possible breaking change * ClientCertificateAzureServiceTokenProvider dispose of certificate obj… (#17266) …ects Properly dispose the X509Certificate2 objects after use to prevent temporary private key files to filling up the disk. Unless properly dispoed, they fill up the space between garbage collections and stay permanently in case of process kills. * Add token credential auth support (#17308) * [synapse] Trim resource name to 15 char limit in provisioning (#17310) - Fixes #17237 * Sync eng/common directory with azure-sdk-tools for PR 1233 (#17314) * reformatted parameter arguments to both update-docs scripts. added parameter requirements and renamed CIRepository to DocRepoLocation which is a lot clearer. Added additional CIConfig parameter to update-docs-metadata to support specific write locations per moniker. Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * [Communication] - PhoneNumberAdministrationClient - fix next page (#17283) Fix communication admin Pageable results issue not pulling next page * Update AutoRest C# version (#17319) * [EventGrid] Small README.md updates (#17313) Endpoint is a URI, let's make the construction explicit in our samples instead of just a plain string so customers starting from these samples don't hit a type error right away. * [Storage] Increase network timeout in tests. (#17323) Sometimes tests experience slow transfer rate which makes tests pushing larger payloads flaky. This is attempt to give them more time to complete transfer and see if this resolves that problem. * [EventGrid] Add a cross reference to the docs (#17336) From our user studies we've seen cases where folks correctly find `EventGridSharedAccessSignitureCredential` but don't figure out how to construct one. We already have pointers on some of the constructors for `EventGridPublisherClient` that take `EventGridSharedAccessSignature`'s but we can also add a reference on the type itself. * Various renaming for x-language consistency (#17320) * Various renaming for x-language consistency * Enable multiple blank lines StyleCop rules (#17318) * Enable track 2 mgmt projects by default (#17324) Resolves #17090 - at least for re-enabling mgmt-plane. Still needs coverage improvement but that's being handled separately. * Sdk automation script (#17193) SDK automation script * Fix sync batch method coverage (#17343) * fix sync batch method coverage * re-enable InheritDoc (#17259) * re-enable inheritdoc and fix non-generated comment warnings * Clean up docs (#17342) * add AAD and improve polling for playback (#17296) * [TA] No locale in links and add functionalities to package descriptions (#17312) * remove local from links and modify package description * Make pageable results internal (#17348) * [TA] Update service version and some cleanup (#17347) * update service version * run export * [Storage] Bump network timeout, add progress logging. (#17350) - Bump network timeout to 400s to see if it's enough for worst case agent-network-storage account combo - add progress logging to flaky tests to see if it hangs. * STG 75 (#17242) * [FR] Update docstrings (#17345) * first rounds: * improve docstring and cleanup some code * PR feedback * [Event Hubs Client] Credential Refresh Buffer Tweak (#17330) The focus of these changes is to add more buffer when computing the time when a credential should be renwed. We've recently begun to see the occasional credential expiration infrequently during nightly runs. These tweaks will allow for a greater period clock skew by eagerly refreshing the token 10 minutes before the client belives it expires. The minimum interval for refreshing has also been reduced in order to guard against short lived credentials. * [Event Hubs Client] Enable Idempotent Producer Tests (#17316) The focus of these changes is to enable the Live tests for the Idempotent Producer feature now that the service team has confirmed that it has rolled out to all Azure clouds in our test matrix. * [Data Lake Performance] Test Scenarios for T2 (#17307) The focus of these changes is to create the initial set of performance test scenarios for the v12.x (track two) Data Lake client library. * Replaced hardcoded true/false with TrueString/FalseString (#17359) * [Event Hubs Client] Sample ReadMe Updates (#17315) The focus of these changes is to fix the instructions for adding packages since there are references to API changes from the beta in the sample code. * enable AAD in test resources (#17351) * Make storage mock clients able to generate sas (#17349) * Prepare storage for release (#17382) * Create Azure.Security.Attestation Track 2 Preview SDK (#17159) * Created Initialcut at GA API version * Checkpoint * Checkpoint * Implemented most of the core attestation service APIs. * Implemented V1 of all of MAA API Surface * Converted TPM request and response to ReadOnlyMemory * Another round of API review feedback * Updated readme.md and changelog.md a small bit; corrected a couple of API review feedback items * Somehow nunit got added to the test dependencies; removed it * Added snippets to readme.md * Fixed typo in tests.yml; Fleshed out readme.md a bit * Use ClientSecretCredentials not DefaultProviderCredentials for tests * Two test classes were still flagged as being live * Ran Export-API.ps1 * Updated root cl for autorest * Updated session records * Added new SDK to ci.yml * Fixed several static analysis errors * Use TestEnvironment.Credential for credentials * Try a different way of generating the key * Updated session records * Updated session records with policy document that does not contain CRLF characters * Pull request feedback changes * Updated changelog * More Pull Request feedback * Added assert that the number of signing certificates is at least 1 * Use Argument.AssertNotNullOrEmpty instead of Argument.IsInRange for array check * [Storage] Live tests - Wait for RBAC replication. (#17385) It may take up to 5 minutes for RBAC (AAD) role assignments to replicate. This makes live tests flaky. The short term solution is to add "sleep" after test resources provisioning. Long term solution to be found here #17384 * [Synapse] Update swagger - Bump to eea7c0141c0b7ad9f66f8ba06560b549c6b3b014 * Add legacy checkpoint reading support to EventHubs (#17335) Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Sima Zhu <sizhu@microsoft.com> Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com> Co-authored-by: Reiley Yang <reyang@microsoft.com> Co-authored-by: Vijaya Gopal Yarramneni <viyarr@microsoft.com> Co-authored-by: Jesse Squire <jsquire@microsoft.com> Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: asmaskar <58723769+asmaskar@users.noreply.github.com> Co-authored-by: Mariana Rios Flores <mariari@microsoft.com> Co-authored-by: Krista Pratico <krpratic@microsoft.com> Co-authored-by: DorothySun216 <55454966+DorothySun216@users.noreply.github.com> Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Co-authored-by: Scott Schaab <sschaab@microsoft.com> Co-authored-by: Erich(Renyong) Wang <eriwan@microsoft.com> Co-authored-by: Dongwei Wang <bean0idear@163.com> Co-authored-by: Dongwei Wang <dongwwa@microsoft.com> Co-authored-by: Christopher Scott <chriss@microsoft.com> Co-authored-by: Pavel Krymets <pavel@krymets.com> Co-authored-by: Basel Rustum <barustum@microsoft.com> Co-authored-by: Chris Hamons <chris.hamons@xamarin.com> Co-authored-by: Timothy Mothra <tilee@microsoft.com> Co-authored-by: MiriBerezin <73054714+MiriBerezin@users.noreply.github.com> Co-authored-by: pavelprystinka <30868871+pavelprystinka@users.noreply.github.com> Co-authored-by: JoshuaLai <9044372+JoshuaLai@users.noreply.github.com> Co-authored-by: Heath Stewart <heaths@microsoft.com> Co-authored-by: David R. Williamson <drwill@microsoft.com> Co-authored-by: Tianyun Gao (MSFT) <65581162+Tianyun-G@users.noreply.github.com> Co-authored-by: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com> Co-authored-by: andrew <69653137+greenms@users.noreply.github.com> Co-authored-by: Isaac Sarek Banner <70341725+isaacbanner@users.noreply.github.com> Co-authored-by: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com> Co-authored-by: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Co-authored-by: Gokul Premraj <gopremra@microsoft.com> Co-authored-by: Dan Nicolescu <dan.nicolescu@microsoft.com> Co-authored-by: Matt Ellis <matell@microsoft.com> Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com> Co-authored-by: Alexander Batishchev <abatishchev@gmail.com> Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
… administration (Azure#16935) * inroduce phone number addministration tests * Samples are created * Improve sanitization in tests * Improve sanitization in tests * Update test records * Ignore phone numbers live test for not playback if INCLUDE_PHONENUMBER_LIVE_TESTS env var is not True * Update readme * Update readme * samples wording update * rename test * addressing tests code formatting * addressing tests code formatting * add assertion to sample test * add release phone number method for single number * add release phone number method for single number - update api * address PR comments (sample wording and renames) * update sample wording and some variable names
Update from Azure