Skip to content

Commit

Permalink
[Defender (RiskIQ) - EASM] Api version 2024-10-01-preview (Azure#31045)
Browse files Browse the repository at this point in the history
* Adding a new version

* Fix double quote typo

* Fix versioning copy/paste error

* Adding missing versions.

* Update client version.

* Adding the generated json file.

* Small syntax fixes.

* Add override words for the new version as well

* Fix pretty syntax.

* Update readme

* This might be ore correct

* Fix response

* Update the other one as well.

* Fix policyName

* Fix policyName in these as well

* Let's see if this generalization works as well.

* First round of addressing review feedback: moving clientName annotations to the client file, removing unused params from models, adjusting which fields are optional, adding RFC3339 to the dates, adding learning doc link to the ActionParameters.

* Adjusting examples

* More adjustments for wave 1 fixes.

* More cleanup

* Use the same object for policy put request and response.

* Update the docs for the id.

* Replace the rest of the models.

* Set name to read and create

* Trying to fix the swagger errors for DC endpoints

* More adjustments for the name

* Adjust validate endpoints to work with the same PUT model

* Update other json files as well

* Update other json files as well

* Update other json files as well

* Let's keep things simple.

* Let's Try to force a build.

---------

Co-authored-by: dashaspencer <[email protected]>
  • Loading branch information
2 people authored and markcowl committed Oct 29, 2024
1 parent 12da569 commit 2e26571
Show file tree
Hide file tree
Showing 97 changed files with 23,976 additions and 62 deletions.
2 changes: 1 addition & 1 deletion cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@
]
},
{
"filename": "**/specification/riskiq/data-plane/Microsoft.Easm/preview/2024-03-01-preview/easm.json",
"filename": "**/specification/riskiq/data-plane/Microsoft.Easm/preview/**/*.json",
"words": [
"Cisa",
"cisa",
Expand Down
62 changes: 61 additions & 1 deletion specification/riskiq/Easm/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "./main.tsp";
using Azure.ClientGenerator.Core;

@TypeSpec.Versioning.useDependency(Azure.Core.Versions.v1_0_Preview_2)
@TypeSpec.Versioning.useDependency(Easm.Versions.v2024_03_01_preview)
@TypeSpec.Versioning.useDependency(Easm.Versions.v2024_10_01_preview)
namespace Customizations;

@client({
Expand Down Expand Up @@ -66,4 +66,64 @@ interface EasmClient {

getCisaCves is Easm.CisaCves.getCisaCves;
getCisaCve is Easm.CisaCves.getCisaCve;

listPolicy is Easm.Policies.listPolicy;
getPolicy is Easm.Policies.getPolicy;
deletePolicy is Easm.Policies.deletePolicy;
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
createOrReplacePolicy is Easm.Policies.createOrReplacePolicy;
}

@@clientName(Easm.Policy, "Policy", "csharp");
@@clientName(Easm.AlexaInfo, "AlexaDetails", "java");
@@clientName(Easm.AssetUpdateData, "AssetUpdatePayload", "csharp");
@@clientName(Easm.Attribute, "AttributeDetails", "csharp");
@@clientName(Easm.Banner, "BannerDetails", "csharp");
@@clientName(Easm.Banner.banner, "bannerName", "csharp");
@@clientName(Easm.Cookie, "CookieDetails", "csharp");
@@clientName(Easm.Cve, "CveDetails", "csharp");
@@clientName(Easm.DataConnectionData, "DataConnectionPayload", "csharp");
@@clientName(Easm.DiscoGroupData, "DiscoveryGroupPayload", "csharp");
@@clientName(Easm.DiscoGroup, "DiscoveryGroup", "csharp");
@@clientName(Easm.DiscoRunPageResult, "DiscoveryRunPageResult", "csharp");
@@clientName(Easm.DiscoRunResult, "DiscoveryRunResult", "csharp");
@@clientName(Easm.DiscoSource, "DiscoverySource", "csharp");
@@clientName(Easm.DiscoTemplate, "DiscoveryTemplate", "csharp");
@@clientName(Easm.IpBlock.ipBlock, "ipBlockName", "csharp");
@@clientName(Easm.Location, "ObservedLocationDetails", "csharp");
@@clientName(Easm.Port, "PortDetails", "csharp");
@@clientName(Easm.Port.port, "portName", "csharp");
@@clientName(Easm.ReportAssetSnapshotExportRequest,
"ReportAssetSnapshotExportPayload",
"csharp"
);
@@clientName(Easm.ReportAssetSnapshotRequest,
"ReportAssetSnapshotPayload",
"csharp"
);
@@clientName(Easm.ReportAssetSummaryRequest,
"ReportAssetSummaryPayload",
"csharp"
);
@@clientName(Easm.Reputation, "ReputationDetails", "csharp");
@@clientName(Easm.ResourceUrl, "ResourceUri", "csharp");
@@clientName(Easm.SavedFilterData, "SavedFilterPayload", "csharp");
@@clientName(Easm.Service, "AssetService", "csharp");
@@clientName(Easm.Source, "SourceDetails", "csharp");
@@clientName(Easm.Source.source, "sourceName", "csharp");
@@clientName(Easm.Task, "TaskResource", "csharp");
@@clientName(Easm.TaskState, "TaskResourceState", "csharp");
@@clientName(Easm.TaskPhase, "TaskResourcePhase", "csharp");
@@clientName(Easm.DiscoSourceKind, "DiscoverySourceKind", "csharp");
@@clientName(Easm.LogAnalyticsDataConnectionData,
"LogAnalyticsDataConnectionPayload",
"csharp"
);
@@clientName(Easm.AzureDataExplorerDataConnectionData,
"AzureDataExplorerDataConnectionPayload",
"csharp"
);
@@clientName(Easm.DiscoGroupNameParameter,
"DiscoveryGroupNameParameter",
"csharp"
);
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "dummyrg",
"workspaceName": "ThisisaWorkspace",
"groupName": "ThisisaDiscoGroup",
"body": {
"name": "ThisisaDiscoGroup",
"description": "This is a disco group",
"frequencyMilliseconds": 604800000,
"tier": "advanced",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "dummyrg",
"workspaceName": "ThisisaWorkspace",
"groupName": "ThisisaDiscoGroup",
"body": {
"name": "ThisisaDiscoGroup",
"description": "This is a disco group",
"frequencyMilliseconds": 604800000,
"tier": "advanced",
Expand Down
Loading

0 comments on commit 2e26571

Please sign in to comment.