diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..ac3b5701aac0 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -45,6 +45,7 @@ specifiers: '@rush-temp/arm-loadtestservice': file:./projects/arm-loadtestservice.tgz '@rush-temp/arm-locks': file:./projects/arm-locks.tgz '@rush-temp/arm-logic': file:./projects/arm-logic.tgz + '@rush-temp/arm-m365securityandcompliance': file:./projects/arm-m365securityandcompliance.tgz '@rush-temp/arm-managedapplications': file:./projects/arm-managedapplications.tgz '@rush-temp/arm-managementgroups': file:./projects/arm-managementgroups.tgz '@rush-temp/arm-mediaservices': file:./projects/arm-mediaservices.tgz @@ -226,6 +227,7 @@ dependencies: '@rush-temp/arm-loadtestservice': file:projects/arm-loadtestservice.tgz '@rush-temp/arm-locks': file:projects/arm-locks.tgz '@rush-temp/arm-logic': file:projects/arm-logic.tgz + '@rush-temp/arm-m365securityandcompliance': file:projects/arm-m365securityandcompliance.tgz '@rush-temp/arm-managedapplications': file:projects/arm-managedapplications.tgz '@rush-temp/arm-managementgroups': file:projects/arm-managementgroups.tgz '@rush-temp/arm-mediaservices': file:projects/arm-mediaservices.tgz @@ -6977,7 +6979,7 @@ packages: hasBin: true dev: false - /ts-node/10.4.0_276ff2ad8f60608417677a4691c0f835: + /ts-node/10.4.0_28670484a221c7e896c5d6b821a5cbb7: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7003,11 +7005,11 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.2.4 + typescript: 4.4.4 yn: 3.1.1 dev: false - /ts-node/10.4.0_54d7f9b57c83a5c5120be11b085b9de6: + /ts-node/10.4.0_f9f9f28f986ed7ad377c75abc9f416f4: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7033,7 +7035,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.4.4 + typescript: 4.2.4 yn: 3.1.1 dev: false @@ -7629,7 +7631,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7857,7 +7859,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7908,7 +7910,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7965,7 +7967,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -8728,6 +8730,27 @@ packages: uglify-js: 3.14.5 dev: false + file:projects/arm-m365securityandcompliance.tgz: + resolution: {integrity: sha512-sdz9jilIk+tNGiPzDImF8wVSUtgaHlTMR4mB+GcDfo4yBQb40PjlRGj5xA6trb6UW3CEWaSEqPcLt8xZKwYh2Q==, tarball: file:projects/arm-m365securityandcompliance.tgz} + name: '@rush-temp/arm-m365securityandcompliance' + version: 0.0.0 + dependencies: + '@microsoft/api-extractor': 7.19.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.5 + dev: false + file:projects/arm-managedapplications.tgz: resolution: {integrity: sha512-5kLfrfEy5OIjFS2BfTSnbWRIh5NDMaXjYdA9yWjpD+9Dk2rsI5/ifntBT7zm0klJ9YmrszjI6IjXzZw37FnLzg==, tarball: file:projects/arm-managedapplications.tgz} name: '@rush-temp/arm-managedapplications' @@ -9487,7 +9510,7 @@ packages: rollup: 1.32.1 safe-buffer: 5.2.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -9982,7 +10005,7 @@ packages: dev: false file:projects/core-amqp.tgz: - resolution: {integrity: sha512-jmyXvDp5FyZIlqp1zATESQp6qO2NqjKSfY5o9ojPsKN/g9WJ45RL4jfy+cD5u8C2t9jSDTsCoL+jbiLptpkDLA==, tarball: file:projects/core-amqp.tgz} + resolution: {integrity: sha512-nAZlMW/WFVSloK1iVzoSJNx9CHjvMl4/kJrnq1s5Okn96/AQX19SYkqfdvmew1Oy3bxfDC2g3n3e1CFLrlSyEg==, tarball: file:projects/core-amqp.tgz} name: '@rush-temp/core-amqp' version: 0.0.0 dependencies: @@ -10025,7 +10048,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 url: 0.11.0 @@ -10111,7 +10134,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10342,7 +10365,7 @@ packages: shx: 0.3.3 sinon: 9.2.4 tough-cookie: 4.0.0 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 tunnel: 0.0.6 typescript: 4.2.4 @@ -10390,7 +10413,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -10657,7 +10680,7 @@ packages: sinon: 9.2.4 snap-shot-it: 7.9.6 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 universal-user-agent: 6.0.0 @@ -10714,7 +10737,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10760,7 +10783,7 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 - ts-node: 10.4.0_54d7f9b57c83a5c5120be11b085b9de6 + ts-node: 10.4.0_28670484a221c7e896c5d6b821a5cbb7 tslib: 2.3.1 typescript: 4.4.4 yaml: 1.10.2 @@ -10917,7 +10940,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -10979,7 +11002,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11034,7 +11057,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11087,7 +11110,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11289,7 +11312,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11553,7 +11576,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11702,7 +11725,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11774,7 +11797,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11794,7 +11817,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11814,7 +11837,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11834,7 +11857,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11873,7 +11896,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11894,7 +11917,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11917,7 +11940,7 @@ packages: moment: 2.29.1 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11937,7 +11960,7 @@ packages: eslint: 7.32.0 prettier: 1.19.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11957,7 +11980,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11978,7 +12001,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12000,7 +12023,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12021,7 +12044,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12041,7 +12064,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12060,7 +12083,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12081,7 +12104,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12104,7 +12127,7 @@ packages: node-fetch: 2.6.6 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12125,7 +12148,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12146,7 +12169,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12167,7 +12190,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12539,7 +12562,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12608,7 +12631,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 ws: 8.3.0 @@ -12671,7 +12694,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12734,7 +12757,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12797,7 +12820,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12858,7 +12881,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12916,7 +12939,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12976,7 +12999,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -13028,7 +13051,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13082,7 +13105,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13135,7 +13158,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 diff --git a/rush.json b/rush.json index 66a9aa13703f..2d0fc0a1d749 100644 --- a/rush.json +++ b/rush.json @@ -1215,6 +1215,11 @@ "packageName": "@azure/arm-containerinstance", "projectFolder": "sdk/containerinstance/arm-containerinstance", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-m365securityandcompliance", + "projectFolder": "sdk/m365securityandcompliance/arm-m365securityandcompliance", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/CHANGELOG.md b/sdk/m365securityandcompliance/arm-m365securityandcompliance/CHANGELOG.md new file mode 100644 index 000000000000..787e5285f31e --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2022-01-05) + +The package of @azure/arm-m365securityandcompliance is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/LICENSE b/sdk/m365securityandcompliance/arm-m365securityandcompliance/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/README.md b/sdk/m365securityandcompliance/arm-m365securityandcompliance/README.md new file mode 100644 index 000000000000..63c9ee88c943 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/README.md @@ -0,0 +1,98 @@ +# Azure M365SecurityAndCompliance client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure M365SecurityAndCompliance client. + +Security And Compliance Client + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/m365securityandcompliance/arm-m365securityandcompliance) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-m365securityandcompliance) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-m365securityandcompliance?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-m365securityandcompliance` package + +Install the Azure M365SecurityAndCompliance client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-m365securityandcompliance +``` + +### Create and authenticate a `M365SecurityAndComplianceClient` + +To create a client object to access the Azure M365SecurityAndCompliance API, you will need the `endpoint` of your Azure M365SecurityAndCompliance resource and a `credential`. The Azure M365SecurityAndCompliance client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure M365SecurityAndCompliance resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure M365SecurityAndCompliance** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { M365SecurityAndComplianceClient } = require("@azure/arm-m365securityandcompliance"); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new M365SecurityAndComplianceClient(new DefaultAzureCredential(), subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### M365SecurityAndComplianceClient + +`M365SecurityAndComplianceClient` is the primary interface for developers using the Azure M365SecurityAndCompliance client library. Explore the methods on this client object to understand the different features of the Azure M365SecurityAndCompliance service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fm365securityandcompliance%2Farm-m365securityandcompliance%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/_meta.json b/sdk/m365securityandcompliance/arm-m365securityandcompliance/_meta.json new file mode 100644 index 000000000000..d52233216403 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "e8c6db17dc13a00155936dcaeacf4da0a1fabf77", + "readme": "specification/m365securityandcompliance/resource-manager/readme.md", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/m365securityandcompliance/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" +} \ No newline at end of file diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/api-extractor.json b/sdk/m365securityandcompliance/arm-m365securityandcompliance/api-extractor.json new file mode 100644 index 000000000000..98990fc22eed --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-m365securityandcompliance.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/package.json b/sdk/m365securityandcompliance/arm-m365securityandcompliance/package.json new file mode 100644 index 000000000000..6276e1ee213a --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/package.json @@ -0,0 +1,92 @@ +{ + "name": "@azure/arm-m365securityandcompliance", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for M365SecurityAndComplianceClient.", + "version": "1.0.0-beta.1", + "engines": { "node": ">=12.0.0" }, + "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" + }, + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-m365securityandcompliance.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/m365securityandcompliance/arm-m365securityandcompliance", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/review/arm-m365securityandcompliance.api.md b/sdk/m365securityandcompliance/arm-m365securityandcompliance/review/arm-m365securityandcompliance.api.md new file mode 100644 index 000000000000..3a2a969dc43a --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/review/arm-m365securityandcompliance.api.md @@ -0,0 +1,1288 @@ +## API Report File for "@azure/arm-m365securityandcompliance" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorDetails { + error?: ErrorDetailsInternal; +} + +// @public +export interface ErrorDetailsInternal { + readonly code?: string; + readonly message?: string; + readonly target?: string; +} + +// @public +export type Kind = "fhir" | "fhir-Stu3" | "fhir-R4"; + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownManagedServiceIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned" +} + +// @public +export enum KnownOperationResultStatus { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + Requested = "Requested", + // (undocumented) + Running = "Running", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownPrivateEndpointConnectionProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownPrivateEndpointServiceConnectionStatus { + // (undocumented) + Approved = "Approved", + // (undocumented) + Pending = "Pending", + // (undocumented) + Rejected = "Rejected" +} + +// @public +export enum KnownProvisioningState { + // (undocumented) + Accepted = "Accepted", + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Deprovisioned = "Deprovisioned", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating", + // (undocumented) + Verifying = "Verifying" +} + +// @public +export enum KnownPublicNetworkAccess { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public (undocumented) +export class M365SecurityAndComplianceClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: M365SecurityAndComplianceClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + operationResults: OperationResults; + // (undocumented) + operations: Operations; + // (undocumented) + privateEndpointConnectionsAdtAPI: PrivateEndpointConnectionsAdtAPI; + // (undocumented) + privateEndpointConnectionsComp: PrivateEndpointConnectionsComp; + // (undocumented) + privateEndpointConnectionsForEDM: PrivateEndpointConnectionsForEDM; + // (undocumented) + privateEndpointConnectionsForMIPPolicySync: PrivateEndpointConnectionsForMIPPolicySync; + // (undocumented) + privateEndpointConnectionsForSCCPowershell: PrivateEndpointConnectionsForSCCPowershell; + // (undocumented) + privateEndpointConnectionsSec: PrivateEndpointConnectionsSec; + // (undocumented) + privateLinkResources: PrivateLinkResources; + // (undocumented) + privateLinkResourcesAdtAPI: PrivateLinkResourcesAdtAPI; + // (undocumented) + privateLinkResourcesComp: PrivateLinkResourcesComp; + // (undocumented) + privateLinkResourcesForMIPPolicySync: PrivateLinkResourcesForMIPPolicySync; + // (undocumented) + privateLinkResourcesForSCCPowershell: PrivateLinkResourcesForSCCPowershell; + // (undocumented) + privateLinkResourcesSec: PrivateLinkResourcesSec; + // (undocumented) + privateLinkServicesForEDMUpload: PrivateLinkServicesForEDMUpload; + // (undocumented) + privateLinkServicesForM365ComplianceCenter: PrivateLinkServicesForM365ComplianceCenter; + // (undocumented) + privateLinkServicesForM365SecurityCenter: PrivateLinkServicesForM365SecurityCenter; + // (undocumented) + privateLinkServicesForMIPPolicySync: PrivateLinkServicesForMIPPolicySync; + // (undocumented) + privateLinkServicesForO365ManagementActivityAPI: PrivateLinkServicesForO365ManagementActivityAPI; + // (undocumented) + privateLinkServicesForSCCPowershell: PrivateLinkServicesForSCCPowershell; + // (undocumented) + services: Services; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface M365SecurityAndComplianceClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type ManagedServiceIdentityType = string; + +// @public +export interface Operation { + readonly display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: string; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface OperationResults { + get(locationName: string, operationResultId: string, options?: OperationResultsGetOptionalParams): Promise; +} + +// @public +export interface OperationResultsDescription { + readonly id?: string; + readonly name?: string; + properties?: any; + readonly startTime?: string; + readonly status?: OperationResultStatus; +} + +// @public +export interface OperationResultsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationResultsGetResponse = OperationResultsDescription; + +// @public +export type OperationResultStatus = string; + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface PrivateEndpoint { + readonly id?: string; +} + +// @public +export type PrivateEndpointConnection = Resource & { + readonly systemData?: SystemData; + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +}; + +// @public +export interface PrivateEndpointConnectionListResult { + readonly nextLink?: string; + value?: PrivateEndpointConnection[]; +} + +// @public +export type PrivateEndpointConnectionProvisioningState = string; + +// @public +export interface PrivateEndpointConnectionsAdtAPI { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsAdtAPIDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsAdtAPIDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsAdtAPIGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsAdtAPIDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsAdtAPIGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsAdtAPIGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsAdtAPIListByServiceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsAdtAPIListByServiceNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsAdtAPIListByServiceResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsComp { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCompCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsCompDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsCompDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsCompGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsCompListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsCompCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsCompDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsCompGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsCompGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsCompListByServiceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsCompListByServiceNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsCompListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsCompListByServiceResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsForEDM { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsForEDMCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForEDMDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForEDMDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForEDMGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsForEDMListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsForEDMCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsForEDMDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsForEDMGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForEDMGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsForEDMListByServiceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForEDMListByServiceNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsForEDMListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForEDMListByServiceResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsForMIPPolicySync { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForMIPPolicySyncGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForMIPPolicySyncListByServiceResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsForSCCPowershell { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsForSCCPowershellGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsForSCCPowershellGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForSCCPowershellGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsForSCCPowershellListByServiceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForSCCPowershellListByServiceNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsForSCCPowershellListByServiceResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsSec { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsSecCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsSecDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsSecDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsSecGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsSecListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsSecCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsSecDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsSecGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsSecGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsSecListByServiceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsSecListByServiceNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsSecListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsSecListByServiceResponse = PrivateEndpointConnectionListResult; + +// @public +export type PrivateEndpointServiceConnectionStatus = string; + +// @public +export type PrivateLinkResource = Resource & { + readonly systemData?: SystemData; + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; +}; + +// @public +export interface PrivateLinkResourceListResult { + readonly nextLink?: string; + value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkResources { + get(resourceGroupName: string, resourceName: string, groupName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateLinkResourcesListByServiceOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesAdtAPI { + get(resourceGroupName: string, resourceName: string, groupName: string, options?: PrivateLinkResourcesAdtAPIGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateLinkResourcesAdtAPIListByServiceOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesAdtAPIGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesAdtAPIGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesAdtAPIListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesAdtAPIListByServiceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesComp { + get(resourceGroupName: string, resourceName: string, groupName: string, options?: PrivateLinkResourcesCompGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateLinkResourcesCompListByServiceOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesCompGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesCompGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesCompListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesCompListByServiceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesForMIPPolicySync { + get(resourceGroupName: string, resourceName: string, groupName: string, options?: PrivateLinkResourcesForMIPPolicySyncGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesForMIPPolicySyncGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesForMIPPolicySyncGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesForMIPPolicySyncListByServiceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesForSCCPowershell { + get(resourceGroupName: string, resourceName: string, groupName: string, options?: PrivateLinkResourcesForSCCPowershellGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesForSCCPowershellGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesForSCCPowershellGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesForSCCPowershellListByServiceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByServiceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesSec { + get(resourceGroupName: string, resourceName: string, groupName: string, options?: PrivateLinkResourcesSecGetOptionalParams): Promise; + listByService(resourceGroupName: string, resourceName: string, options?: PrivateLinkResourcesSecListByServiceOptionalParams): Promise; +} + +// @public +export interface PrivateLinkResourcesSecGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesSecGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesSecListByServiceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesSecListByServiceResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} + +// @public +export interface PrivateLinkServicesForEDMUpload { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateLinkServicesForEDMUploadDescription: PrivateLinkServicesForEDMUploadDescription, options?: PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams): Promise, PrivateLinkServicesForEDMUploadCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateLinkServicesForEDMUploadDescription: PrivateLinkServicesForEDMUploadDescription, options?: PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForEDMUploadUpdateOptionalParams): Promise, PrivateLinkServicesForEDMUploadUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForEDMUploadUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForEDMUploadGetOptionalParams): Promise; + list(options?: PrivateLinkServicesForEDMUploadListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForEDMUploadCreateOrUpdateResponse = PrivateLinkServicesForEDMUploadDescription; + +// @public +export type PrivateLinkServicesForEDMUploadDescription = ServicesResource & { + properties?: ServicesProperties; +}; + +// @public +export interface PrivateLinkServicesForEDMUploadDescriptionListResult { + readonly nextLink?: string; + value?: PrivateLinkServicesForEDMUploadDescription[]; +} + +// @public +export interface PrivateLinkServicesForEDMUploadGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForEDMUploadGetResponse = PrivateLinkServicesForEDMUploadDescription; + +// @public +export interface PrivateLinkServicesForEDMUploadListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForEDMUploadListByResourceGroupNextResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +// @public +export interface PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForEDMUploadListByResourceGroupResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +// @public +export interface PrivateLinkServicesForEDMUploadListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForEDMUploadListNextResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +// @public +export interface PrivateLinkServicesForEDMUploadListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForEDMUploadListResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +// @public +export interface PrivateLinkServicesForEDMUploadUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForEDMUploadUpdateResponse = PrivateLinkServicesForEDMUploadDescription; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenter { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateLinkServicesForM365ComplianceCenterDescription: PrivateLinkServicesForM365ComplianceCenterDescription, options?: PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams): Promise, PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateLinkServicesForM365ComplianceCenterDescription: PrivateLinkServicesForM365ComplianceCenterDescription, options?: PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams): Promise, PrivateLinkServicesForM365ComplianceCenterUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForM365ComplianceCenterGetOptionalParams): Promise; + list(options?: PrivateLinkServicesForM365ComplianceCenterListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse = PrivateLinkServicesForM365ComplianceCenterDescription; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterDescription = ServicesResource & { + properties?: ServicesProperties; +}; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterDescriptionListResult { + readonly nextLink?: string; + value?: PrivateLinkServicesForM365ComplianceCenterDescription[]; +} + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterGetResponse = PrivateLinkServicesForM365ComplianceCenterDescription; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterListByResourceGroupResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterListNextResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterListResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForM365ComplianceCenterUpdateResponse = PrivateLinkServicesForM365ComplianceCenterDescription; + +// @public +export interface PrivateLinkServicesForM365SecurityCenter { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateLinkServicesForM365SecurityCenterDescription: PrivateLinkServicesForM365SecurityCenterDescription, options?: PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams): Promise, PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateLinkServicesForM365SecurityCenterDescription: PrivateLinkServicesForM365SecurityCenterDescription, options?: PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams): Promise, PrivateLinkServicesForM365SecurityCenterUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForM365SecurityCenterGetOptionalParams): Promise; + list(options?: PrivateLinkServicesForM365SecurityCenterListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse = PrivateLinkServicesForM365SecurityCenterDescription; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterDescription = ServicesResource & { + properties?: ServicesProperties; +}; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterDescriptionListResult { + readonly nextLink?: string; + value?: PrivateLinkServicesForM365SecurityCenterDescription[]; +} + +// @public +export interface PrivateLinkServicesForM365SecurityCenterGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterGetResponse = PrivateLinkServicesForM365SecurityCenterDescription; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterListByResourceGroupResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterListNextResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterListResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +// @public +export interface PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForM365SecurityCenterUpdateResponse = PrivateLinkServicesForM365SecurityCenterDescription; + +// @public +export interface PrivateLinkServicesForMIPPolicySync { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateLinkServicesForMIPPolicySyncDescription: PrivateLinkServicesForMIPPolicySyncDescription, options?: PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams): Promise, PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateLinkServicesForMIPPolicySyncDescription: PrivateLinkServicesForMIPPolicySyncDescription, options?: PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams): Promise, PrivateLinkServicesForMIPPolicySyncUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForMIPPolicySyncGetOptionalParams): Promise; + list(options?: PrivateLinkServicesForMIPPolicySyncListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse = PrivateLinkServicesForMIPPolicySyncDescription; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncDescription = ServicesResource & { + properties?: ServicesProperties; +}; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncDescriptionListResult { + readonly nextLink?: string; + value?: PrivateLinkServicesForMIPPolicySyncDescription[]; +} + +// @public +export interface PrivateLinkServicesForMIPPolicySyncGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncGetResponse = PrivateLinkServicesForMIPPolicySyncDescription; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncListByResourceGroupResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncListNextResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncListResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +// @public +export interface PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForMIPPolicySyncUpdateResponse = PrivateLinkServicesForMIPPolicySyncDescription; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPI { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateLinkServicesForO365ManagementActivityAPIDescription: PrivateLinkServicesForO365ManagementActivityAPIDescription, options?: PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams): Promise, PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateLinkServicesForO365ManagementActivityAPIDescription: PrivateLinkServicesForO365ManagementActivityAPIDescription, options?: PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams): Promise, PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams): Promise; + list(options?: PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse = PrivateLinkServicesForO365ManagementActivityAPIDescription; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIDescription = ServicesResource & { + properties?: ServicesProperties; +}; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult { + readonly nextLink?: string; + value?: PrivateLinkServicesForO365ManagementActivityAPIDescription[]; +} + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIGetResponse = PrivateLinkServicesForO365ManagementActivityAPIDescription; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIListNextResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIListResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +// @public +export interface PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse = PrivateLinkServicesForO365ManagementActivityAPIDescription; + +// @public +export interface PrivateLinkServicesForSCCPowershell { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateLinkServicesForSCCPowershellDescription: PrivateLinkServicesForSCCPowershellDescription, options?: PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams): Promise, PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateLinkServicesForSCCPowershellDescription: PrivateLinkServicesForSCCPowershellDescription, options?: PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForSCCPowershellDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForSCCPowershellDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForSCCPowershellUpdateOptionalParams): Promise, PrivateLinkServicesForSCCPowershellUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: PrivateLinkServicesForSCCPowershellUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: PrivateLinkServicesForSCCPowershellGetOptionalParams): Promise; + list(options?: PrivateLinkServicesForSCCPowershellListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse = PrivateLinkServicesForSCCPowershellDescription; + +// @public +export interface PrivateLinkServicesForSCCPowershellDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForSCCPowershellDescription = ServicesResource & { + properties?: ServicesProperties; +}; + +// @public +export interface PrivateLinkServicesForSCCPowershellDescriptionListResult { + readonly nextLink?: string; + value?: PrivateLinkServicesForSCCPowershellDescription[]; +} + +// @public +export interface PrivateLinkServicesForSCCPowershellGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForSCCPowershellGetResponse = PrivateLinkServicesForSCCPowershellDescription; + +// @public +export interface PrivateLinkServicesForSCCPowershellListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForSCCPowershellListByResourceGroupNextResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +// @public +export interface PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForSCCPowershellListByResourceGroupResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +// @public +export interface PrivateLinkServicesForSCCPowershellListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForSCCPowershellListNextResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +// @public +export interface PrivateLinkServicesForSCCPowershellListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkServicesForSCCPowershellListResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +// @public +export interface PrivateLinkServicesForSCCPowershellUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateLinkServicesForSCCPowershellUpdateResponse = PrivateLinkServicesForSCCPowershellDescription; + +// @public +export type ProvisioningState = string; + +// @public +export type PublicNetworkAccess = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ServiceAccessPolicyEntry { + objectId: string; +} + +// @public +export interface ServiceAuthenticationConfigurationInfo { + audience?: string; + authority?: string; + smartProxyEnabled?: boolean; +} + +// @public +export interface ServiceCorsConfigurationInfo { + allowCredentials?: boolean; + headers?: string[]; + maxAge?: number; + methods?: string[]; + origins?: string[]; +} + +// @public +export interface ServiceCosmosDbConfigurationInfo { + keyVaultKeyUri?: string; + offerThroughput?: number; +} + +// @public +export interface ServiceExportConfigurationInfo { + storageAccountName?: string; +} + +// @public +export interface Services { + beginDelete(resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams): Promise; +} + +// @public +export interface ServicesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ServicesPatchDescription { + publicNetworkAccess?: PublicNetworkAccess; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ServicesProperties { + accessPolicies?: ServiceAccessPolicyEntry[]; + authenticationConfiguration?: ServiceAuthenticationConfigurationInfo; + corsConfiguration?: ServiceCorsConfigurationInfo; + cosmosDbConfiguration?: ServiceCosmosDbConfigurationInfo; + exportConfiguration?: ServiceExportConfigurationInfo; + privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: ProvisioningState; + publicNetworkAccess?: PublicNetworkAccess; +} + +// @public +export interface ServicesResource { + etag?: string; + readonly id?: string; + identity?: ServicesResourceIdentity; + kind: Kind; + location: string; + readonly name?: string; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface ServicesResourceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: ManagedServiceIdentityType; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/rollup.config.js b/sdk/m365securityandcompliance/arm-m365securityandcompliance/rollup.config.js new file mode 100644 index 000000000000..9be1955eb7f1 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/rollup.config.js @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/index.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/index.ts new file mode 100644 index 000000000000..3de4a49b0a2c --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { M365SecurityAndComplianceClient } from "./m365SecurityAndComplianceClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/lroImpl.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/m365SecurityAndComplianceClient.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/m365SecurityAndComplianceClient.ts new file mode 100644 index 000000000000..f91a52a75e77 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/m365SecurityAndComplianceClient.ts @@ -0,0 +1,187 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + OperationResultsImpl, + PrivateLinkServicesForEDMUploadImpl, + ServicesImpl, + PrivateEndpointConnectionsForEDMImpl, + PrivateLinkResourcesImpl, + PrivateLinkServicesForM365ComplianceCenterImpl, + PrivateEndpointConnectionsCompImpl, + PrivateLinkResourcesCompImpl, + PrivateLinkServicesForM365SecurityCenterImpl, + PrivateEndpointConnectionsSecImpl, + PrivateLinkResourcesSecImpl, + PrivateLinkServicesForO365ManagementActivityAPIImpl, + PrivateEndpointConnectionsAdtAPIImpl, + PrivateLinkResourcesAdtAPIImpl, + PrivateLinkServicesForSCCPowershellImpl, + PrivateEndpointConnectionsForSCCPowershellImpl, + PrivateLinkResourcesForSCCPowershellImpl, + PrivateLinkServicesForMIPPolicySyncImpl, + PrivateEndpointConnectionsForMIPPolicySyncImpl, + PrivateLinkResourcesForMIPPolicySyncImpl +} from "./operations"; +import { + Operations, + OperationResults, + PrivateLinkServicesForEDMUpload, + Services, + PrivateEndpointConnectionsForEDM, + PrivateLinkResources, + PrivateLinkServicesForM365ComplianceCenter, + PrivateEndpointConnectionsComp, + PrivateLinkResourcesComp, + PrivateLinkServicesForM365SecurityCenter, + PrivateEndpointConnectionsSec, + PrivateLinkResourcesSec, + PrivateLinkServicesForO365ManagementActivityAPI, + PrivateEndpointConnectionsAdtAPI, + PrivateLinkResourcesAdtAPI, + PrivateLinkServicesForSCCPowershell, + PrivateEndpointConnectionsForSCCPowershell, + PrivateLinkResourcesForSCCPowershell, + PrivateLinkServicesForMIPPolicySync, + PrivateEndpointConnectionsForMIPPolicySync, + PrivateLinkResourcesForMIPPolicySync +} from "./operationsInterfaces"; +import { M365SecurityAndComplianceClientOptionalParams } from "./models"; + +export class M365SecurityAndComplianceClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the M365SecurityAndComplianceClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The subscription identifier. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: M365SecurityAndComplianceClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: M365SecurityAndComplianceClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-m365securityandcompliance/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-03-25-preview"; + this.operations = new OperationsImpl(this); + this.operationResults = new OperationResultsImpl(this); + this.privateLinkServicesForEDMUpload = new PrivateLinkServicesForEDMUploadImpl( + this + ); + this.services = new ServicesImpl(this); + this.privateEndpointConnectionsForEDM = new PrivateEndpointConnectionsForEDMImpl( + this + ); + this.privateLinkResources = new PrivateLinkResourcesImpl(this); + this.privateLinkServicesForM365ComplianceCenter = new PrivateLinkServicesForM365ComplianceCenterImpl( + this + ); + this.privateEndpointConnectionsComp = new PrivateEndpointConnectionsCompImpl( + this + ); + this.privateLinkResourcesComp = new PrivateLinkResourcesCompImpl(this); + this.privateLinkServicesForM365SecurityCenter = new PrivateLinkServicesForM365SecurityCenterImpl( + this + ); + this.privateEndpointConnectionsSec = new PrivateEndpointConnectionsSecImpl( + this + ); + this.privateLinkResourcesSec = new PrivateLinkResourcesSecImpl(this); + this.privateLinkServicesForO365ManagementActivityAPI = new PrivateLinkServicesForO365ManagementActivityAPIImpl( + this + ); + this.privateEndpointConnectionsAdtAPI = new PrivateEndpointConnectionsAdtAPIImpl( + this + ); + this.privateLinkResourcesAdtAPI = new PrivateLinkResourcesAdtAPIImpl(this); + this.privateLinkServicesForSCCPowershell = new PrivateLinkServicesForSCCPowershellImpl( + this + ); + this.privateEndpointConnectionsForSCCPowershell = new PrivateEndpointConnectionsForSCCPowershellImpl( + this + ); + this.privateLinkResourcesForSCCPowershell = new PrivateLinkResourcesForSCCPowershellImpl( + this + ); + this.privateLinkServicesForMIPPolicySync = new PrivateLinkServicesForMIPPolicySyncImpl( + this + ); + this.privateEndpointConnectionsForMIPPolicySync = new PrivateEndpointConnectionsForMIPPolicySyncImpl( + this + ); + this.privateLinkResourcesForMIPPolicySync = new PrivateLinkResourcesForMIPPolicySyncImpl( + this + ); + } + + operations: Operations; + operationResults: OperationResults; + privateLinkServicesForEDMUpload: PrivateLinkServicesForEDMUpload; + services: Services; + privateEndpointConnectionsForEDM: PrivateEndpointConnectionsForEDM; + privateLinkResources: PrivateLinkResources; + privateLinkServicesForM365ComplianceCenter: PrivateLinkServicesForM365ComplianceCenter; + privateEndpointConnectionsComp: PrivateEndpointConnectionsComp; + privateLinkResourcesComp: PrivateLinkResourcesComp; + privateLinkServicesForM365SecurityCenter: PrivateLinkServicesForM365SecurityCenter; + privateEndpointConnectionsSec: PrivateEndpointConnectionsSec; + privateLinkResourcesSec: PrivateLinkResourcesSec; + privateLinkServicesForO365ManagementActivityAPI: PrivateLinkServicesForO365ManagementActivityAPI; + privateEndpointConnectionsAdtAPI: PrivateEndpointConnectionsAdtAPI; + privateLinkResourcesAdtAPI: PrivateLinkResourcesAdtAPI; + privateLinkServicesForSCCPowershell: PrivateLinkServicesForSCCPowershell; + privateEndpointConnectionsForSCCPowershell: PrivateEndpointConnectionsForSCCPowershell; + privateLinkResourcesForSCCPowershell: PrivateLinkResourcesForSCCPowershell; + privateLinkServicesForMIPPolicySync: PrivateLinkServicesForMIPPolicySync; + privateEndpointConnectionsForMIPPolicySync: PrivateEndpointConnectionsForMIPPolicySync; + privateLinkResourcesForMIPPolicySync: PrivateLinkResourcesForMIPPolicySync; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/index.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/index.ts new file mode 100644 index 000000000000..fcc9f5088cb4 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/index.ts @@ -0,0 +1,1384 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +/** A list of service operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** + * A list of service operations supported by the Microsoft.M365SecurityAndCompliance resource provider. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; +} + +/** Service REST API operation. */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{read | write | action | delete} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Indicates whether the operation is a data action + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** + * Default value is 'user,system'. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: string; + /** + * The information displayed about the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly display?: OperationDisplay; +} + +/** The object that represents the operation. */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.M365SecurityAndCompliance + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * Resource Type: Services + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * Name of the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * Friendly description for the operation, + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** Error details. */ +export interface ErrorDetails { + /** Object containing error details. */ + error?: ErrorDetailsInternal; +} + +/** Error details. */ +export interface ErrorDetailsInternal { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The target of the particular error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; +} + +/** The properties indicating the operation result of an operation on a service. */ +export interface OperationResultsDescription { + /** + * The ID of the operation returned. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the operation result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The status of the operation being performed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: OperationResultStatus; + /** + * The time that the operation was started. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startTime?: string; + /** Additional properties of the operation result. */ + properties?: any; +} + +/** The properties of a service instance. */ +export interface ServicesProperties { + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The access policies of the service instance. */ + accessPolicies?: ServiceAccessPolicyEntry[]; + /** The settings for the Cosmos DB database backing the service. */ + cosmosDbConfiguration?: ServiceCosmosDbConfigurationInfo; + /** The authentication configuration for the service instance. */ + authenticationConfiguration?: ServiceAuthenticationConfigurationInfo; + /** The settings for the CORS configuration of the service instance. */ + corsConfiguration?: ServiceCorsConfigurationInfo; + /** The settings for the export operation of the service instance. */ + exportConfiguration?: ServiceExportConfigurationInfo; + /** The list of private endpoint connections that are set up for this resource. */ + privateEndpointConnections?: PrivateEndpointConnection[]; + /** Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ + publicNetworkAccess?: PublicNetworkAccess; +} + +/** An access policy entry. */ +export interface ServiceAccessPolicyEntry { + /** An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. */ + objectId: string; +} + +/** The settings for the Cosmos DB database backing the service. */ +export interface ServiceCosmosDbConfigurationInfo { + /** The provisioned throughput for the backing database. */ + offerThroughput?: number; + /** The URI of the customer-managed key for the backing database. */ + keyVaultKeyUri?: string; +} + +/** Authentication configuration information */ +export interface ServiceAuthenticationConfigurationInfo { + /** The authority url for the service */ + authority?: string; + /** The audience url for the service */ + audience?: string; + /** If the SMART on FHIR proxy is enabled */ + smartProxyEnabled?: boolean; +} + +/** The settings for the CORS configuration of the service instance. */ +export interface ServiceCorsConfigurationInfo { + /** The origins to be allowed via CORS. */ + origins?: string[]; + /** The headers to be allowed via CORS. */ + headers?: string[]; + /** The methods to be allowed via CORS. */ + methods?: string[]; + /** The max age to be allowed via CORS. */ + maxAge?: number; + /** If credentials are allowed via CORS. */ + allowCredentials?: boolean; +} + +/** Export operation configuration information */ +export interface ServiceExportConfigurationInfo { + /** The name of the default export storage account. */ + storageAccountName?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** The Private Endpoint resource. */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** The common properties of a service. */ +export interface ServicesResource { + /** + * The resource identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Required property for system data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** The kind of the service. */ + kind: Kind; + /** The resource location. */ + location: string; + /** The resource tags. */ + tags?: { [propertyName: string]: string }; + /** An etag associated with the resource, used for optimistic concurrency when editing it. */ + etag?: string; + /** Setting indicating whether the service has a managed identity associated with it. */ + identity?: ServicesResourceIdentity; +} + +/** Setting indicating whether the service has a managed identity associated with it. */ +export interface ServicesResourceIdentity { + /** + * The principal ID of the resource identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of identity being specified, currently SystemAssigned and None are allowed. */ + type?: ManagedServiceIdentityType; +} + +/** The description of the service. */ +export interface ServicesPatchDescription { + /** Instance tags */ + tags?: { [propertyName: string]: string }; + /** Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ + publicNetworkAccess?: PublicNetworkAccess; +} + +/** A list of service description objects with a next link. */ +export interface PrivateLinkServicesForEDMUploadDescriptionListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** A list of service description objects. */ + value?: PrivateLinkServicesForEDMUploadDescription[]; +} + +/** List of private endpoint connection associated with the specified storage account */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; + /** + * The URL to get the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; + /** + * The URL to get the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of service description objects with a next link. */ +export interface PrivateLinkServicesForM365ComplianceCenterDescriptionListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** A list of service description objects. */ + value?: PrivateLinkServicesForM365ComplianceCenterDescription[]; +} + +/** A list of service description objects with a next link. */ +export interface PrivateLinkServicesForM365SecurityCenterDescriptionListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** A list of service description objects. */ + value?: PrivateLinkServicesForM365SecurityCenterDescription[]; +} + +/** A list of service description objects with a next link. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** A list of service description objects. */ + value?: PrivateLinkServicesForO365ManagementActivityAPIDescription[]; +} + +/** A list of service description objects with a next link. */ +export interface PrivateLinkServicesForSCCPowershellDescriptionListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** A list of service description objects. */ + value?: PrivateLinkServicesForSCCPowershellDescription[]; +} + +/** A list of service description objects with a next link. */ +export interface PrivateLinkServicesForMIPPolicySyncDescriptionListResult { + /** + * The link used to get the next page of service description objects. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** A list of service description objects. */ + value?: PrivateLinkServicesForMIPPolicySyncDescription[]; +} + +/** The Private Endpoint Connection resource. */ +export type PrivateEndpointConnection = Resource & { + /** + * Required property for system data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** The resource of private end point. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +}; + +/** A private link resource */ +export type PrivateLinkResource = Resource & { + /** + * Required property for system data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** The private link resource Private link DNS zone name. */ + requiredZoneNames?: string[]; +}; + +/** The description of the service. */ +export type PrivateLinkServicesForEDMUploadDescription = ServicesResource & { + /** The common properties of a service. */ + properties?: ServicesProperties; +}; + +/** The description of the service. */ +export type PrivateLinkServicesForM365ComplianceCenterDescription = ServicesResource & { + /** The common properties of a service. */ + properties?: ServicesProperties; +}; + +/** The description of the service. */ +export type PrivateLinkServicesForM365SecurityCenterDescription = ServicesResource & { + /** The common properties of a service. */ + properties?: ServicesProperties; +}; + +/** The description of the service. */ +export type PrivateLinkServicesForO365ManagementActivityAPIDescription = ServicesResource & { + /** The common properties of a service. */ + properties?: ServicesProperties; +}; + +/** The description of the service. */ +export type PrivateLinkServicesForSCCPowershellDescription = ServicesResource & { + /** The common properties of a service. */ + properties?: ServicesProperties; +}; + +/** The description of the service. */ +export type PrivateLinkServicesForMIPPolicySyncDescription = ServicesResource & { + /** The common properties of a service. */ + properties?: ServicesProperties; +}; + +/** Known values of {@link OperationResultStatus} that the service accepts. */ +export enum KnownOperationResultStatus { + Canceled = "Canceled", + Succeeded = "Succeeded", + Failed = "Failed", + Requested = "Requested", + Running = "Running" +} + +/** + * Defines values for OperationResultStatus. \ + * {@link KnownOperationResultStatus} can be used interchangeably with OperationResultStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Canceled** \ + * **Succeeded** \ + * **Failed** \ + * **Requested** \ + * **Running** + */ +export type OperationResultStatus = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + Deleting = "Deleting", + Succeeded = "Succeeded", + Creating = "Creating", + Accepted = "Accepted", + Verifying = "Verifying", + Updating = "Updating", + Failed = "Failed", + Canceled = "Canceled", + Deprovisioned = "Deprovisioned" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Deleting** \ + * **Succeeded** \ + * **Creating** \ + * **Accepted** \ + * **Verifying** \ + * **Updating** \ + * **Failed** \ + * **Canceled** \ + * **Deprovisioned** + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + Pending = "Pending", + Approved = "Approved", + Rejected = "Rejected" +} + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Approved** \ + * **Rejected** + */ +export type PrivateEndpointServiceConnectionStatus = string; + +/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ +export enum KnownPrivateEndpointConnectionProvisioningState { + Succeeded = "Succeeded", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed" +} + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. \ + * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Creating** \ + * **Deleting** \ + * **Failed** + */ +export type PrivateEndpointConnectionProvisioningState = string; + +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type PublicNetworkAccess = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + SystemAssigned = "SystemAssigned", + None = "None" +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssigned** \ + * **None** + */ +export type ManagedServiceIdentityType = string; +/** Defines values for Kind. */ +export type Kind = "fhir" | "fhir-Stu3" | "fhir-R4"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationResultsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OperationResultsGetResponse = OperationResultsDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkServicesForEDMUploadGetResponse = PrivateLinkServicesForEDMUploadDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkServicesForEDMUploadCreateOrUpdateResponse = PrivateLinkServicesForEDMUploadDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PrivateLinkServicesForEDMUploadUpdateResponse = PrivateLinkServicesForEDMUploadDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateLinkServicesForEDMUploadListResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkServicesForEDMUploadListByResourceGroupResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrivateLinkServicesForEDMUploadListNextResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForEDMUploadListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkServicesForEDMUploadListByResourceGroupNextResponse = PrivateLinkServicesForEDMUploadDescriptionListResult; + +/** Optional parameters. */ +export interface ServicesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForEDMListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateEndpointConnectionsForEDMListByServiceResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForEDMGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsForEDMGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsForEDMCreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForEDMDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForEDMListByServiceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServiceNext operation. */ +export type PrivateEndpointConnectionsForEDMListByServiceNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateLinkResourcesListByServiceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkServicesForM365ComplianceCenterGetResponse = PrivateLinkServicesForM365ComplianceCenterDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse = PrivateLinkServicesForM365ComplianceCenterDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PrivateLinkServicesForM365ComplianceCenterUpdateResponse = PrivateLinkServicesForM365ComplianceCenterDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateLinkServicesForM365ComplianceCenterListResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkServicesForM365ComplianceCenterListByResourceGroupResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrivateLinkServicesForM365ComplianceCenterListNextResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextResponse = PrivateLinkServicesForM365ComplianceCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCompListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateEndpointConnectionsCompListByServiceResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCompGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsCompGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsCompCreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCompDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCompListByServiceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServiceNext operation. */ +export type PrivateEndpointConnectionsCompListByServiceNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesCompListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateLinkResourcesCompListByServiceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesCompGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesCompGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkServicesForM365SecurityCenterGetResponse = PrivateLinkServicesForM365SecurityCenterDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse = PrivateLinkServicesForM365SecurityCenterDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PrivateLinkServicesForM365SecurityCenterUpdateResponse = PrivateLinkServicesForM365SecurityCenterDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateLinkServicesForM365SecurityCenterListResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkServicesForM365SecurityCenterListByResourceGroupResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrivateLinkServicesForM365SecurityCenterListNextResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextResponse = PrivateLinkServicesForM365SecurityCenterDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsSecListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateEndpointConnectionsSecListByServiceResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsSecGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsSecGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsSecCreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsSecDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsSecListByServiceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServiceNext operation. */ +export type PrivateEndpointConnectionsSecListByServiceNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesSecListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateLinkResourcesSecListByServiceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesSecGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesSecGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPIGetResponse = PrivateLinkServicesForO365ManagementActivityAPIDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse = PrivateLinkServicesForO365ManagementActivityAPIDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse = PrivateLinkServicesForO365ManagementActivityAPIDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPIListResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPIListNextResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextResponse = PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateEndpointConnectionsAdtAPIListByServiceResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsAdtAPIGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsAdtAPIGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsAdtAPIDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsAdtAPIListByServiceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServiceNext operation. */ +export type PrivateEndpointConnectionsAdtAPIListByServiceNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesAdtAPIListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateLinkResourcesAdtAPIListByServiceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesAdtAPIGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesAdtAPIGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkServicesForSCCPowershellGetResponse = PrivateLinkServicesForSCCPowershellDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse = PrivateLinkServicesForSCCPowershellDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PrivateLinkServicesForSCCPowershellUpdateResponse = PrivateLinkServicesForSCCPowershellDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateLinkServicesForSCCPowershellListResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkServicesForSCCPowershellListByResourceGroupResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrivateLinkServicesForSCCPowershellListNextResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForSCCPowershellListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkServicesForSCCPowershellListByResourceGroupNextResponse = PrivateLinkServicesForSCCPowershellDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateEndpointConnectionsForSCCPowershellListByServiceResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForSCCPowershellGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsForSCCPowershellGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForSCCPowershellListByServiceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServiceNext operation. */ +export type PrivateEndpointConnectionsForSCCPowershellListByServiceNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateLinkResourcesForSCCPowershellListByServiceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesForSCCPowershellGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesForSCCPowershellGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkServicesForMIPPolicySyncGetResponse = PrivateLinkServicesForMIPPolicySyncDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse = PrivateLinkServicesForMIPPolicySyncDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PrivateLinkServicesForMIPPolicySyncUpdateResponse = PrivateLinkServicesForMIPPolicySyncDescription; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateLinkServicesForMIPPolicySyncListResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkServicesForMIPPolicySyncListByResourceGroupResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrivateLinkServicesForMIPPolicySyncListNextResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextResponse = PrivateLinkServicesForMIPPolicySyncDescriptionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateEndpointConnectionsForMIPPolicySyncListByServiceResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsForMIPPolicySyncGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServiceNext operation. */ +export type PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByService operation. */ +export type PrivateLinkResourcesForMIPPolicySyncListByServiceResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateLinkResourcesForMIPPolicySyncGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesForMIPPolicySyncGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface M365SecurityAndComplianceClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/mappers.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/mappers.ts new file mode 100644 index 000000000000..10e6bb8615df --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/mappers.ts @@ -0,0 +1,1084 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetails", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetailsInternal" + } + } + } + } +}; + +export const ErrorDetailsInternal: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetailsInternal", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationResultsDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationResultsDescription", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "any" + } + } + } + } +}; + +export const ServicesProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServicesProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + accessPolicies: { + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceAccessPolicyEntry" + } + } + } + }, + cosmosDbConfiguration: { + serializedName: "cosmosDbConfiguration", + type: { + name: "Composite", + className: "ServiceCosmosDbConfigurationInfo" + } + }, + authenticationConfiguration: { + serializedName: "authenticationConfiguration", + type: { + name: "Composite", + className: "ServiceAuthenticationConfigurationInfo" + } + }, + corsConfiguration: { + serializedName: "corsConfiguration", + type: { + name: "Composite", + className: "ServiceCorsConfigurationInfo" + } + }, + exportConfiguration: { + serializedName: "exportConfiguration", + type: { + name: "Composite", + className: "ServiceExportConfigurationInfo" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceAccessPolicyEntry: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceAccessPolicyEntry", + modelProperties: { + objectId: { + constraints: { + Pattern: new RegExp( + "^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$" + ) + }, + serializedName: "objectId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServiceCosmosDbConfigurationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceCosmosDbConfigurationInfo", + modelProperties: { + offerThroughput: { + constraints: { + InclusiveMaximum: 10000, + InclusiveMinimum: 400 + }, + serializedName: "offerThroughput", + type: { + name: "Number" + } + }, + keyVaultKeyUri: { + serializedName: "keyVaultKeyUri", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceAuthenticationConfigurationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceAuthenticationConfigurationInfo", + modelProperties: { + authority: { + serializedName: "authority", + type: { + name: "String" + } + }, + audience: { + serializedName: "audience", + type: { + name: "String" + } + }, + smartProxyEnabled: { + serializedName: "smartProxyEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ServiceCorsConfigurationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceCorsConfigurationInfo", + modelProperties: { + origins: { + serializedName: "origins", + type: { + name: "Sequence", + element: { + constraints: { + Pattern: new RegExp( + "^(?:(?:(?:[hH][tT][tT][pP](?:[sS]|))\\:\\/\\/(?:[a-zA-Z0-9-]+[.]?)+(?:\\:[0-9]{1,5})?|[*]))$" + ) + }, + type: { + name: "String" + } + } + } + }, + headers: { + serializedName: "headers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + methods: { + serializedName: "methods", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxAge: { + constraints: { + InclusiveMaximum: 99999, + InclusiveMinimum: 0 + }, + serializedName: "maxAge", + type: { + name: "Number" + } + }, + allowCredentials: { + serializedName: "allowCredentials", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ServiceExportConfigurationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceExportConfigurationInfo", + modelProperties: { + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "String" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PrivateEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServicesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServicesResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + constraints: { + Pattern: new RegExp("^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$") + }, + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + kind: { + serializedName: "kind", + required: true, + type: { + name: "Enum", + allowedValues: ["fhir", "fhir-Stu3", "fhir-R4"] + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ServicesResourceIdentity" + } + } + } + } +}; + +export const ServicesResourceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServicesResourceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ServicesPatchDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServicesPatchDescription", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServicesForEDMUploadDescriptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForEDMUploadDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkServicesForEDMUploadDescription" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServicesForM365ComplianceCenterDescriptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "PrivateLinkServicesForM365ComplianceCenterDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkServicesForM365ComplianceCenterDescription" + } + } + } + } + } + } +}; + +export const PrivateLinkServicesForM365SecurityCenterDescriptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForM365SecurityCenterDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkServicesForM365SecurityCenterDescription" + } + } + } + } + } + } +}; + +export const PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "PrivateLinkServicesForO365ManagementActivityAPIDescription" + } + } + } + } + } + } +}; + +export const PrivateLinkServicesForSCCPowershellDescriptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForSCCPowershellDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkServicesForSCCPowershellDescription" + } + } + } + } + } + } +}; + +export const PrivateLinkServicesForMIPPolicySyncDescriptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForMIPPolicySyncDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkServicesForMIPPolicySyncDescription" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkServicesForEDMUploadDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForEDMUploadDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; + +export const PrivateLinkServicesForM365ComplianceCenterDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForM365ComplianceCenterDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; + +export const PrivateLinkServicesForM365SecurityCenterDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForM365SecurityCenterDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; + +export const PrivateLinkServicesForO365ManagementActivityAPIDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForO365ManagementActivityAPIDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; + +export const PrivateLinkServicesForSCCPowershellDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForSCCPowershellDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; + +export const PrivateLinkServicesForMIPPolicySyncDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServicesForMIPPolicySyncDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/parameters.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/parameters.ts new file mode 100644 index 000000000000..35baaff117bb --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/models/parameters.ts @@ -0,0 +1,209 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + PrivateLinkServicesForEDMUploadDescription as PrivateLinkServicesForEDMUploadDescriptionMapper, + ServicesPatchDescription as ServicesPatchDescriptionMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper, + PrivateLinkServicesForM365ComplianceCenterDescription as PrivateLinkServicesForM365ComplianceCenterDescriptionMapper, + PrivateLinkServicesForM365SecurityCenterDescription as PrivateLinkServicesForM365SecurityCenterDescriptionMapper, + PrivateLinkServicesForO365ManagementActivityAPIDescription as PrivateLinkServicesForO365ManagementActivityAPIDescriptionMapper, + PrivateLinkServicesForSCCPowershellDescription as PrivateLinkServicesForSCCPowershellDescriptionMapper, + PrivateLinkServicesForMIPPolicySyncDescription as PrivateLinkServicesForMIPPolicySyncDescriptionMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-03-25-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const locationName: OperationURLParameter = { + parameterPath: "locationName", + mapper: { + serializedName: "locationName", + required: true, + type: { + name: "String" + } + } +}; + +export const operationResultId: OperationURLParameter = { + parameterPath: "operationResultId", + mapper: { + serializedName: "operationResultId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceName: OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + constraints: { + MaxLength: 24, + MinLength: 3 + }, + serializedName: "resourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const privateLinkServicesForEDMUploadDescription: OperationParameter = { + parameterPath: "privateLinkServicesForEDMUploadDescription", + mapper: PrivateLinkServicesForEDMUploadDescriptionMapper +}; + +export const servicePatchDescription: OperationParameter = { + parameterPath: "servicePatchDescription", + mapper: ServicesPatchDescriptionMapper +}; + +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + type: { + name: "String" + } + } +}; + +export const properties: OperationParameter = { + parameterPath: "properties", + mapper: PrivateEndpointConnectionMapper +}; + +export const groupName: OperationURLParameter = { + parameterPath: "groupName", + mapper: { + serializedName: "groupName", + required: true, + type: { + name: "String" + } + } +}; + +export const privateLinkServicesForM365ComplianceCenterDescription: OperationParameter = { + parameterPath: "privateLinkServicesForM365ComplianceCenterDescription", + mapper: PrivateLinkServicesForM365ComplianceCenterDescriptionMapper +}; + +export const privateLinkServicesForM365SecurityCenterDescription: OperationParameter = { + parameterPath: "privateLinkServicesForM365SecurityCenterDescription", + mapper: PrivateLinkServicesForM365SecurityCenterDescriptionMapper +}; + +export const privateLinkServicesForO365ManagementActivityAPIDescription: OperationParameter = { + parameterPath: "privateLinkServicesForO365ManagementActivityAPIDescription", + mapper: PrivateLinkServicesForO365ManagementActivityAPIDescriptionMapper +}; + +export const privateLinkServicesForSCCPowershellDescription: OperationParameter = { + parameterPath: "privateLinkServicesForSCCPowershellDescription", + mapper: PrivateLinkServicesForSCCPowershellDescriptionMapper +}; + +export const privateLinkServicesForMIPPolicySyncDescription: OperationParameter = { + parameterPath: "privateLinkServicesForMIPPolicySyncDescription", + mapper: PrivateLinkServicesForMIPPolicySyncDescriptionMapper +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/index.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/index.ts new file mode 100644 index 000000000000..9dfb2330aa71 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/index.ts @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./operationResults"; +export * from "./privateLinkServicesForEDMUpload"; +export * from "./services"; +export * from "./privateEndpointConnectionsForEDM"; +export * from "./privateLinkResources"; +export * from "./privateLinkServicesForM365ComplianceCenter"; +export * from "./privateEndpointConnectionsComp"; +export * from "./privateLinkResourcesComp"; +export * from "./privateLinkServicesForM365SecurityCenter"; +export * from "./privateEndpointConnectionsSec"; +export * from "./privateLinkResourcesSec"; +export * from "./privateLinkServicesForO365ManagementActivityAPI"; +export * from "./privateEndpointConnectionsAdtAPI"; +export * from "./privateLinkResourcesAdtAPI"; +export * from "./privateLinkServicesForSCCPowershell"; +export * from "./privateEndpointConnectionsForSCCPowershell"; +export * from "./privateLinkResourcesForSCCPowershell"; +export * from "./privateLinkServicesForMIPPolicySync"; +export * from "./privateEndpointConnectionsForMIPPolicySync"; +export * from "./privateLinkResourcesForMIPPolicySync"; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/operationResults.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/operationResults.ts new file mode 100644 index 000000000000..d05d7a7ac6ee --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/operationResults.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { OperationResults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + OperationResultsGetOptionalParams, + OperationResultsGetResponse +} from "../models"; + +/** Class containing OperationResults operations. */ +export class OperationResultsImpl implements OperationResults { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class OperationResults class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get the operation result for a long running operation. + * @param locationName The location of the operation. + * @param operationResultId The ID of the operation result to get. + * @param options The options parameters. + */ + get( + locationName: string, + operationResultId: string, + options?: OperationResultsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, operationResultId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/locations/{locationName}/operationresults/{operationResultId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationResultsDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationResultId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/operations.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/operations.ts new file mode 100644 index 000000000000..307fc8a4dd08 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/operations.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all of the available M365SecurityAndCompliance REST API operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all of the available M365SecurityAndCompliance REST API operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.M365SecurityAndCompliance/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsAdtAPI.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsAdtAPI.ts new file mode 100644 index 000000000000..efe39bbfaaee --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsAdtAPI.ts @@ -0,0 +1,502 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnectionsAdtAPI } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsAdtAPIListByServiceNextOptionalParams, + PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams, + PrivateEndpointConnectionsAdtAPIListByServiceResponse, + PrivateEndpointConnectionsAdtAPIGetOptionalParams, + PrivateEndpointConnectionsAdtAPIGetResponse, + PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams, + PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse, + PrivateEndpointConnectionsAdtAPIDeleteOptionalParams, + PrivateEndpointConnectionsAdtAPIListByServiceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnectionsAdtAPI operations. */ +export class PrivateEndpointConnectionsAdtAPIImpl + implements PrivateEndpointConnectionsAdtAPI { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnectionsAdtAPI class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsAdtAPIGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse + >, + PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsAdtAPIDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsAdtAPIDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsAdtAPIListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsComp.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsComp.ts new file mode 100644 index 000000000000..1d31eb3bceb0 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsComp.ts @@ -0,0 +1,500 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnectionsComp } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsCompListByServiceNextOptionalParams, + PrivateEndpointConnectionsCompListByServiceOptionalParams, + PrivateEndpointConnectionsCompListByServiceResponse, + PrivateEndpointConnectionsCompGetOptionalParams, + PrivateEndpointConnectionsCompGetResponse, + PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsCompCreateOrUpdateResponse, + PrivateEndpointConnectionsCompDeleteOptionalParams, + PrivateEndpointConnectionsCompListByServiceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnectionsComp operations. */ +export class PrivateEndpointConnectionsCompImpl + implements PrivateEndpointConnectionsComp { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnectionsComp class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsCompListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsCompListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsCompListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsCompListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsCompGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsCompCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsCompDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsCompDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsCompListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForEDM.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForEDM.ts new file mode 100644 index 000000000000..396c76a101bd --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForEDM.ts @@ -0,0 +1,502 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnectionsForEDM } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsForEDMListByServiceNextOptionalParams, + PrivateEndpointConnectionsForEDMListByServiceOptionalParams, + PrivateEndpointConnectionsForEDMListByServiceResponse, + PrivateEndpointConnectionsForEDMGetOptionalParams, + PrivateEndpointConnectionsForEDMGetResponse, + PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsForEDMCreateOrUpdateResponse, + PrivateEndpointConnectionsForEDMDeleteOptionalParams, + PrivateEndpointConnectionsForEDMListByServiceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnectionsForEDM operations. */ +export class PrivateEndpointConnectionsForEDMImpl + implements PrivateEndpointConnectionsForEDM { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnectionsForEDM class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForEDMListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForEDMListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForEDMListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForEDMListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForEDMGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsForEDMCreateOrUpdateResponse + >, + PrivateEndpointConnectionsForEDMCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForEDMDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForEDMDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsForEDMListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForMIPPolicySync.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForMIPPolicySync.ts new file mode 100644 index 000000000000..81a2695f308d --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForMIPPolicySync.ts @@ -0,0 +1,504 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnectionsForMIPPolicySync } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncListByServiceResponse, + PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncGetResponse, + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse, + PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnectionsForMIPPolicySync operations. */ +export class PrivateEndpointConnectionsForMIPPolicySyncImpl + implements PrivateEndpointConnectionsForMIPPolicySync { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnectionsForMIPPolicySync class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse + >, + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextOptionalParams + ): Promise< + PrivateEndpointConnectionsForMIPPolicySyncListByServiceNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForSCCPowershell.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForSCCPowershell.ts new file mode 100644 index 000000000000..94acead2c76d --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsForSCCPowershell.ts @@ -0,0 +1,504 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnectionsForSCCPowershell } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsForSCCPowershellListByServiceNextOptionalParams, + PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams, + PrivateEndpointConnectionsForSCCPowershellListByServiceResponse, + PrivateEndpointConnectionsForSCCPowershellGetOptionalParams, + PrivateEndpointConnectionsForSCCPowershellGetResponse, + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse, + PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams, + PrivateEndpointConnectionsForSCCPowershellListByServiceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnectionsForSCCPowershell operations. */ +export class PrivateEndpointConnectionsForSCCPowershellImpl + implements PrivateEndpointConnectionsForSCCPowershell { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnectionsForSCCPowershell class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForSCCPowershellGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse + >, + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsForSCCPowershellListByServiceNextOptionalParams + ): Promise< + PrivateEndpointConnectionsForSCCPowershellListByServiceNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsSec.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsSec.ts new file mode 100644 index 000000000000..7199977421ae --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateEndpointConnectionsSec.ts @@ -0,0 +1,500 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateEndpointConnectionsSec } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsSecListByServiceNextOptionalParams, + PrivateEndpointConnectionsSecListByServiceOptionalParams, + PrivateEndpointConnectionsSecListByServiceResponse, + PrivateEndpointConnectionsSecGetOptionalParams, + PrivateEndpointConnectionsSecGetResponse, + PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsSecCreateOrUpdateResponse, + PrivateEndpointConnectionsSecDeleteOptionalParams, + PrivateEndpointConnectionsSecListByServiceNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnectionsSec operations. */ +export class PrivateEndpointConnectionsSecImpl + implements PrivateEndpointConnectionsSec { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnectionsSec class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsSecListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsSecListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsSecListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsSecListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsSecGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec + ); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsSecCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsSecDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsSecDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: PrivateEndpointConnectionsSecListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResources.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..7d155aaca775 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResources.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + PrivateLinkResourcesListByServiceOptionalParams, + PrivateLinkResourcesListByServiceResponse, + PrivateLinkResourcesGetOptionalParams, + PrivateLinkResourcesGetResponse +} from "../models"; + +/** Class containing PrivateLinkResources operations. */ +export class PrivateLinkResourcesImpl implements PrivateLinkResources { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, groupName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesAdtAPI.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesAdtAPI.ts new file mode 100644 index 000000000000..23b010218ad1 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesAdtAPI.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PrivateLinkResourcesAdtAPI } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + PrivateLinkResourcesAdtAPIListByServiceOptionalParams, + PrivateLinkResourcesAdtAPIListByServiceResponse, + PrivateLinkResourcesAdtAPIGetOptionalParams, + PrivateLinkResourcesAdtAPIGetResponse +} from "../models"; + +/** Class containing PrivateLinkResourcesAdtAPI operations. */ +export class PrivateLinkResourcesAdtAPIImpl + implements PrivateLinkResourcesAdtAPI { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkResourcesAdtAPI class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesAdtAPIListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesAdtAPIGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, groupName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesComp.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesComp.ts new file mode 100644 index 000000000000..347d6944723d --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesComp.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PrivateLinkResourcesComp } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + PrivateLinkResourcesCompListByServiceOptionalParams, + PrivateLinkResourcesCompListByServiceResponse, + PrivateLinkResourcesCompGetOptionalParams, + PrivateLinkResourcesCompGetResponse +} from "../models"; + +/** Class containing PrivateLinkResourcesComp operations. */ +export class PrivateLinkResourcesCompImpl implements PrivateLinkResourcesComp { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkResourcesComp class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesCompListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesCompGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, groupName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesForMIPPolicySync.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesForMIPPolicySync.ts new file mode 100644 index 000000000000..0c91cf1b78f0 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesForMIPPolicySync.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PrivateLinkResourcesForMIPPolicySync } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams, + PrivateLinkResourcesForMIPPolicySyncListByServiceResponse, + PrivateLinkResourcesForMIPPolicySyncGetOptionalParams, + PrivateLinkResourcesForMIPPolicySyncGetResponse +} from "../models"; + +/** Class containing PrivateLinkResourcesForMIPPolicySync operations. */ +export class PrivateLinkResourcesForMIPPolicySyncImpl + implements PrivateLinkResourcesForMIPPolicySync { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkResourcesForMIPPolicySync class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesForMIPPolicySyncGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, groupName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesForSCCPowershell.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesForSCCPowershell.ts new file mode 100644 index 000000000000..ad676c650a63 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesForSCCPowershell.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PrivateLinkResourcesForSCCPowershell } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams, + PrivateLinkResourcesForSCCPowershellListByServiceResponse, + PrivateLinkResourcesForSCCPowershellGetOptionalParams, + PrivateLinkResourcesForSCCPowershellGetResponse +} from "../models"; + +/** Class containing PrivateLinkResourcesForSCCPowershell operations. */ +export class PrivateLinkResourcesForSCCPowershellImpl + implements PrivateLinkResourcesForSCCPowershell { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkResourcesForSCCPowershell class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesForSCCPowershellGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, groupName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesSec.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesSec.ts new file mode 100644 index 000000000000..80836095da91 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkResourcesSec.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PrivateLinkResourcesSec } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { + PrivateLinkResourcesSecListByServiceOptionalParams, + PrivateLinkResourcesSecListByServiceResponse, + PrivateLinkResourcesSecGetOptionalParams, + PrivateLinkResourcesSecGetResponse +} from "../models"; + +/** Class containing PrivateLinkResourcesSec operations. */ +export class PrivateLinkResourcesSecImpl implements PrivateLinkResourcesSec { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkResourcesSec class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesSecListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesSecGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, groupName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForEDMUpload.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForEDMUpload.ts new file mode 100644 index 000000000000..7fe4a634d429 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForEDMUpload.ts @@ -0,0 +1,575 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkServicesForEDMUpload } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateLinkServicesForEDMUploadDescription, + PrivateLinkServicesForEDMUploadListNextOptionalParams, + PrivateLinkServicesForEDMUploadListOptionalParams, + PrivateLinkServicesForEDMUploadListByResourceGroupNextOptionalParams, + PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams, + PrivateLinkServicesForEDMUploadGetOptionalParams, + PrivateLinkServicesForEDMUploadGetResponse, + PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams, + PrivateLinkServicesForEDMUploadCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForEDMUploadUpdateOptionalParams, + PrivateLinkServicesForEDMUploadUpdateResponse, + PrivateLinkServicesForEDMUploadListResponse, + PrivateLinkServicesForEDMUploadListByResourceGroupResponse, + PrivateLinkServicesForEDMUploadListNextResponse, + PrivateLinkServicesForEDMUploadListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkServicesForEDMUpload operations. */ +export class PrivateLinkServicesForEDMUploadImpl + implements PrivateLinkServicesForEDMUpload { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkServicesForEDMUpload class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get all the privateLinkServicesForEDMUpload instances in a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkServicesForEDMUploadListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkServicesForEDMUploadListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkServicesForEDMUploadListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the metadata of a privateLinkServicesForEDMUpload resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForEDMUploadGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Create or update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForEDMUploadDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForEDMUploadDescription: PrivateLinkServicesForEDMUploadDescription, + options?: PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForEDMUploadCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateLinkServicesForEDMUploadDescription, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create or update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForEDMUploadDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForEDMUploadDescription: PrivateLinkServicesForEDMUploadDescription, + options?: PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateLinkServicesForEDMUploadDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForEDMUploadUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForEDMUploadUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, servicePatchDescription, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForEDMUploadUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + servicePatchDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get all the privateLinkServicesForEDMUpload instances in a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkServicesForEDMUploadListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkServicesForEDMUploadListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkServicesForEDMUploadListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.privateLinkServicesForEDMUploadDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.servicePatchDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForEDMUploadDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForM365ComplianceCenter.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForM365ComplianceCenter.ts new file mode 100644 index 000000000000..8d9853416c77 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForM365ComplianceCenter.ts @@ -0,0 +1,704 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkServicesForM365ComplianceCenter } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateLinkServicesForM365ComplianceCenterDescription, + PrivateLinkServicesForM365ComplianceCenterListNextOptionalParams, + PrivateLinkServicesForM365ComplianceCenterListOptionalParams, + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextOptionalParams, + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams, + PrivateLinkServicesForM365ComplianceCenterGetOptionalParams, + PrivateLinkServicesForM365ComplianceCenterGetResponse, + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams, + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams, + PrivateLinkServicesForM365ComplianceCenterUpdateResponse, + PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams, + PrivateLinkServicesForM365ComplianceCenterListResponse, + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupResponse, + PrivateLinkServicesForM365ComplianceCenterListNextResponse, + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkServicesForM365ComplianceCenter operations. */ +export class PrivateLinkServicesForM365ComplianceCenterImpl + implements PrivateLinkServicesForM365ComplianceCenter { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkServicesForM365ComplianceCenter class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get all the privateLinkServicesForM365ComplianceCenter instances in a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkServicesForM365ComplianceCenterListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription + > { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkServicesForM365ComplianceCenterListOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription[] + > { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkServicesForM365ComplianceCenterListOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription + > { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription + > { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription[] + > { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription + > { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the metadata of a privateLinkServicesForM365ComplianceCenter resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365ComplianceCenterGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Create or update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365ComplianceCenterDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365ComplianceCenterDescription: PrivateLinkServicesForM365ComplianceCenterDescription, + options?: PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse + >, + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateLinkServicesForM365ComplianceCenterDescription, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create or update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365ComplianceCenterDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365ComplianceCenterDescription: PrivateLinkServicesForM365ComplianceCenterDescription, + options?: PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateLinkServicesForM365ComplianceCenterDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365ComplianceCenterUpdateResponse + >, + PrivateLinkServicesForM365ComplianceCenterUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, servicePatchDescription, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + servicePatchDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get all the privateLinkServicesForM365ComplianceCenter instances in a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkServicesForM365ComplianceCenterListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams + ): Promise< + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkServicesForM365ComplianceCenterListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextOptionalParams + ): Promise< + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.privateLinkServicesForM365ComplianceCenterDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForM365ComplianceCenterDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.servicePatchDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365ComplianceCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365ComplianceCenter", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365ComplianceCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365ComplianceCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365ComplianceCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForM365SecurityCenter.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForM365SecurityCenter.ts new file mode 100644 index 000000000000..1c609447d8e9 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForM365SecurityCenter.ts @@ -0,0 +1,704 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkServicesForM365SecurityCenter } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateLinkServicesForM365SecurityCenterDescription, + PrivateLinkServicesForM365SecurityCenterListNextOptionalParams, + PrivateLinkServicesForM365SecurityCenterListOptionalParams, + PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextOptionalParams, + PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams, + PrivateLinkServicesForM365SecurityCenterGetOptionalParams, + PrivateLinkServicesForM365SecurityCenterGetResponse, + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams, + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams, + PrivateLinkServicesForM365SecurityCenterUpdateResponse, + PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams, + PrivateLinkServicesForM365SecurityCenterListResponse, + PrivateLinkServicesForM365SecurityCenterListByResourceGroupResponse, + PrivateLinkServicesForM365SecurityCenterListNextResponse, + PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkServicesForM365SecurityCenter operations. */ +export class PrivateLinkServicesForM365SecurityCenterImpl + implements PrivateLinkServicesForM365SecurityCenter { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkServicesForM365SecurityCenter class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get all the privateLinkServicesForM365SecurityCenter instances in a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkServicesForM365SecurityCenterListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription + > { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkServicesForM365SecurityCenterListOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription[] + > { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkServicesForM365SecurityCenterListOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription + > { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription + > { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription[] + > { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription + > { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the metadata of a privateLinkServicesForM365SecurityCenter resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365SecurityCenterGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Create or update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365SecurityCenterDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365SecurityCenterDescription: PrivateLinkServicesForM365SecurityCenterDescription, + options?: PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse + >, + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateLinkServicesForM365SecurityCenterDescription, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create or update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365SecurityCenterDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365SecurityCenterDescription: PrivateLinkServicesForM365SecurityCenterDescription, + options?: PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateLinkServicesForM365SecurityCenterDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365SecurityCenterUpdateResponse + >, + PrivateLinkServicesForM365SecurityCenterUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, servicePatchDescription, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + servicePatchDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get all the privateLinkServicesForM365SecurityCenter instances in a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkServicesForM365SecurityCenterListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams + ): Promise< + PrivateLinkServicesForM365SecurityCenterListByResourceGroupResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkServicesForM365SecurityCenterListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextOptionalParams + ): Promise< + PrivateLinkServicesForM365SecurityCenterListByResourceGroupNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.privateLinkServicesForM365SecurityCenterDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForM365SecurityCenterDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.servicePatchDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365SecurityCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForM365SecurityCenter", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365SecurityCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365SecurityCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForM365SecurityCenterDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForMIPPolicySync.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForMIPPolicySync.ts new file mode 100644 index 000000000000..a012058967b1 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForMIPPolicySync.ts @@ -0,0 +1,692 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkServicesForMIPPolicySync } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateLinkServicesForMIPPolicySyncDescription, + PrivateLinkServicesForMIPPolicySyncListNextOptionalParams, + PrivateLinkServicesForMIPPolicySyncListOptionalParams, + PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextOptionalParams, + PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams, + PrivateLinkServicesForMIPPolicySyncGetOptionalParams, + PrivateLinkServicesForMIPPolicySyncGetResponse, + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams, + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams, + PrivateLinkServicesForMIPPolicySyncUpdateResponse, + PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams, + PrivateLinkServicesForMIPPolicySyncListResponse, + PrivateLinkServicesForMIPPolicySyncListByResourceGroupResponse, + PrivateLinkServicesForMIPPolicySyncListNextResponse, + PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkServicesForMIPPolicySync operations. */ +export class PrivateLinkServicesForMIPPolicySyncImpl + implements PrivateLinkServicesForMIPPolicySync { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkServicesForMIPPolicySync class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get all the privateLinkServicesForMIPPolicySync instances in a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkServicesForMIPPolicySyncListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForMIPPolicySyncDescription + > { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkServicesForMIPPolicySyncListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkServicesForMIPPolicySyncListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForMIPPolicySyncDescription + > { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the metadata of a privateLinkServicesForMIPPolicySync resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForMIPPolicySyncGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Create or update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForMIPPolicySyncDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForMIPPolicySyncDescription: PrivateLinkServicesForMIPPolicySyncDescription, + options?: PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse + >, + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateLinkServicesForMIPPolicySyncDescription, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create or update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForMIPPolicySyncDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForMIPPolicySyncDescription: PrivateLinkServicesForMIPPolicySyncDescription, + options?: PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateLinkServicesForMIPPolicySyncDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForMIPPolicySyncUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, servicePatchDescription, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + servicePatchDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get all the privateLinkServicesForMIPPolicySync instances in a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkServicesForMIPPolicySyncListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkServicesForMIPPolicySyncListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextOptionalParams + ): Promise< + PrivateLinkServicesForMIPPolicySyncListByResourceGroupNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.privateLinkServicesForMIPPolicySyncDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForMIPPolicySyncDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.servicePatchDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForMIPPolicySyncDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForMIPPolicySync", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForMIPPolicySyncDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForMIPPolicySyncDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForMIPPolicySyncDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForO365ManagementActivityAPI.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForO365ManagementActivityAPI.ts new file mode 100644 index 000000000000..b8c14891dcf5 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForO365ManagementActivityAPI.ts @@ -0,0 +1,716 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkServicesForO365ManagementActivityAPI } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateLinkServicesForO365ManagementActivityAPIDescription, + PrivateLinkServicesForO365ManagementActivityAPIListNextOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIGetResponse, + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse, + PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIListResponse, + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupResponse, + PrivateLinkServicesForO365ManagementActivityAPIListNextResponse, + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkServicesForO365ManagementActivityAPI operations. */ +export class PrivateLinkServicesForO365ManagementActivityAPIImpl + implements PrivateLinkServicesForO365ManagementActivityAPI { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkServicesForO365ManagementActivityAPI class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get all the privateLinkServicesForO365ManagementActivityAPI instances in a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription + > { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription[] + > { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription + > { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription + > { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription[] + > { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams + ): AsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription + > { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the metadata of a privateLinkServicesForO365ManagementActivityAPI resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Create or update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForO365ManagementActivityAPIDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForO365ManagementActivityAPIDescription: PrivateLinkServicesForO365ManagementActivityAPIDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse + >, + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateLinkServicesForO365ManagementActivityAPIDescription, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create or update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForO365ManagementActivityAPIDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForO365ManagementActivityAPIDescription: PrivateLinkServicesForO365ManagementActivityAPIDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams + ): Promise< + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse + > { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateLinkServicesForO365ManagementActivityAPIDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse + >, + PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, servicePatchDescription, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + servicePatchDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get all the privateLinkServicesForO365ManagementActivityAPI instances in a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams + ): Promise< + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextOptionalParams + ): Promise< + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + 201: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + 202: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + 204: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: + Parameters.privateLinkServicesForO365ManagementActivityAPIDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + 201: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + 202: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + 204: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.servicePatchDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForO365ManagementActivityAPI", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForO365ManagementActivityAPIDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForSCCPowershell.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForSCCPowershell.ts new file mode 100644 index 000000000000..21715630d4b4 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/privateLinkServicesForSCCPowershell.ts @@ -0,0 +1,692 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PrivateLinkServicesForSCCPowershell } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateLinkServicesForSCCPowershellDescription, + PrivateLinkServicesForSCCPowershellListNextOptionalParams, + PrivateLinkServicesForSCCPowershellListOptionalParams, + PrivateLinkServicesForSCCPowershellListByResourceGroupNextOptionalParams, + PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams, + PrivateLinkServicesForSCCPowershellGetOptionalParams, + PrivateLinkServicesForSCCPowershellGetResponse, + PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams, + PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForSCCPowershellUpdateOptionalParams, + PrivateLinkServicesForSCCPowershellUpdateResponse, + PrivateLinkServicesForSCCPowershellDeleteOptionalParams, + PrivateLinkServicesForSCCPowershellListResponse, + PrivateLinkServicesForSCCPowershellListByResourceGroupResponse, + PrivateLinkServicesForSCCPowershellListNextResponse, + PrivateLinkServicesForSCCPowershellListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkServicesForSCCPowershell operations. */ +export class PrivateLinkServicesForSCCPowershellImpl + implements PrivateLinkServicesForSCCPowershell { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class PrivateLinkServicesForSCCPowershell class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Get all the privateLinkServicesForSCCPowershell instances in a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkServicesForSCCPowershellListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForSCCPowershellDescription + > { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkServicesForSCCPowershellListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkServicesForSCCPowershellListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForSCCPowershellDescription + > { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the metadata of a privateLinkServicesForSCCPowershell resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForSCCPowershellGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Create or update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForSCCPowershellDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForSCCPowershellDescription: PrivateLinkServicesForSCCPowershellDescription, + options?: PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse + >, + PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + resourceName, + privateLinkServicesForSCCPowershellDescription, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Create or update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForSCCPowershellDescription The service instance metadata. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForSCCPowershellDescription: PrivateLinkServicesForSCCPowershellDescription, + options?: PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + privateLinkServicesForSCCPowershellDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForSCCPowershellUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForSCCPowershellUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, servicePatchDescription, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForSCCPowershellUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + resourceName, + servicePatchDescription, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForSCCPowershellDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForSCCPowershellDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get all the privateLinkServicesForSCCPowershell instances in a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkServicesForSCCPowershellListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkServicesForSCCPowershellListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkServicesForSCCPowershellListByResourceGroupNextOptionalParams + ): Promise< + PrivateLinkServicesForSCCPowershellListByResourceGroupNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.privateLinkServicesForSCCPowershellDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + 201: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + 202: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + 204: { + bodyMapper: Mappers.PrivateLinkServicesForSCCPowershellDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + requestBody: Parameters.servicePatchDescription, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForSCCPowershellDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForSCCPowershell", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForSCCPowershellDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForSCCPowershellDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.PrivateLinkServicesForSCCPowershellDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/services.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/services.ts new file mode 100644 index 000000000000..9cd90e9318ad --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operations/services.ts @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { Services } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { M365SecurityAndComplianceClient } from "../m365SecurityAndComplianceClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { ServicesDeleteOptionalParams } from "../models"; + +/** Class containing Services operations. */ +export class ServicesImpl implements Services { + private readonly client: M365SecurityAndComplianceClient; + + /** + * Initialize a new instance of the class Services class. + * @param client Reference to the service client + */ + constructor(client: M365SecurityAndComplianceClient) { + this.client = client; + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + options?: ServicesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: ServicesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.M365SecurityAndCompliance/privateLinkServicesForEDMUpload/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/index.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..9dfb2330aa71 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/index.ts @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./operationResults"; +export * from "./privateLinkServicesForEDMUpload"; +export * from "./services"; +export * from "./privateEndpointConnectionsForEDM"; +export * from "./privateLinkResources"; +export * from "./privateLinkServicesForM365ComplianceCenter"; +export * from "./privateEndpointConnectionsComp"; +export * from "./privateLinkResourcesComp"; +export * from "./privateLinkServicesForM365SecurityCenter"; +export * from "./privateEndpointConnectionsSec"; +export * from "./privateLinkResourcesSec"; +export * from "./privateLinkServicesForO365ManagementActivityAPI"; +export * from "./privateEndpointConnectionsAdtAPI"; +export * from "./privateLinkResourcesAdtAPI"; +export * from "./privateLinkServicesForSCCPowershell"; +export * from "./privateEndpointConnectionsForSCCPowershell"; +export * from "./privateLinkResourcesForSCCPowershell"; +export * from "./privateLinkServicesForMIPPolicySync"; +export * from "./privateEndpointConnectionsForMIPPolicySync"; +export * from "./privateLinkResourcesForMIPPolicySync"; diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/operationResults.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/operationResults.ts new file mode 100644 index 000000000000..3af495030afc --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/operationResults.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationResultsGetOptionalParams, + OperationResultsGetResponse +} from "../models"; + +/** Interface representing a OperationResults. */ +export interface OperationResults { + /** + * Get the operation result for a long running operation. + * @param locationName The location of the operation. + * @param operationResultId The ID of the operation result to get. + * @param options The options parameters. + */ + get( + locationName: string, + operationResultId: string, + options?: OperationResultsGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/operations.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..53b841802a0a --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available M365SecurityAndCompliance REST API operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsAdtAPI.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsAdtAPI.ts new file mode 100644 index 000000000000..6ac3d0a2545e --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsAdtAPI.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams, + PrivateEndpointConnectionsAdtAPIGetOptionalParams, + PrivateEndpointConnectionsAdtAPIGetResponse, + PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams, + PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse, + PrivateEndpointConnectionsAdtAPIDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnectionsAdtAPI. */ +export interface PrivateEndpointConnectionsAdtAPI { + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsAdtAPIListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsAdtAPIGetOptionalParams + ): Promise; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse + >, + PrivateEndpointConnectionsAdtAPICreateOrUpdateResponse + > + >; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsAdtAPICreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsAdtAPIDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsAdtAPIDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsComp.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsComp.ts new file mode 100644 index 000000000000..3d23edba09a8 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsComp.ts @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsCompListByServiceOptionalParams, + PrivateEndpointConnectionsCompGetOptionalParams, + PrivateEndpointConnectionsCompGetResponse, + PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsCompCreateOrUpdateResponse, + PrivateEndpointConnectionsCompDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnectionsComp. */ +export interface PrivateEndpointConnectionsComp { + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsCompListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsCompGetOptionalParams + ): Promise; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsCompCreateOrUpdateResponse + > + >; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCompCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsCompDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsCompDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForEDM.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForEDM.ts new file mode 100644 index 000000000000..50af1c773985 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForEDM.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsForEDMListByServiceOptionalParams, + PrivateEndpointConnectionsForEDMGetOptionalParams, + PrivateEndpointConnectionsForEDMGetResponse, + PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsForEDMCreateOrUpdateResponse, + PrivateEndpointConnectionsForEDMDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnectionsForEDM. */ +export interface PrivateEndpointConnectionsForEDM { + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForEDMListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForEDMGetOptionalParams + ): Promise; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsForEDMCreateOrUpdateResponse + >, + PrivateEndpointConnectionsForEDMCreateOrUpdateResponse + > + >; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForEDMCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForEDMDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForEDMDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForMIPPolicySync.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForMIPPolicySync.ts new file mode 100644 index 000000000000..e07c8d7b71d0 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForMIPPolicySync.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncGetResponse, + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse, + PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnectionsForMIPPolicySync. */ +export interface PrivateEndpointConnectionsForMIPPolicySync { + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncGetOptionalParams + ): Promise; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse + >, + PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateResponse + > + >; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForMIPPolicySyncDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForSCCPowershell.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForSCCPowershell.ts new file mode 100644 index 000000000000..7ae2f6463c3d --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsForSCCPowershell.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams, + PrivateEndpointConnectionsForSCCPowershellGetOptionalParams, + PrivateEndpointConnectionsForSCCPowershellGetResponse, + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse, + PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnectionsForSCCPowershell. */ +export interface PrivateEndpointConnectionsForSCCPowershell { + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsForSCCPowershellListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForSCCPowershellGetOptionalParams + ): Promise; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse + >, + PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateResponse + > + >; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsForSCCPowershellCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsForSCCPowershellDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsSec.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsSec.ts new file mode 100644 index 000000000000..d8032ddb6dd5 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateEndpointConnectionsSec.ts @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsSecListByServiceOptionalParams, + PrivateEndpointConnectionsSecGetOptionalParams, + PrivateEndpointConnectionsSecGetResponse, + PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsSecCreateOrUpdateResponse, + PrivateEndpointConnectionsSecDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnectionsSec. */ +export interface PrivateEndpointConnectionsSec { + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateEndpointConnectionsSecListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsSecGetOptionalParams + ): Promise; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsSecCreateOrUpdateResponse + > + >; + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsSecCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsSecDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsSecDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResources.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResources.ts new file mode 100644 index 000000000000..a1c944fc1dca --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResources.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + PrivateLinkResourcesListByServiceOptionalParams, + PrivateLinkResourcesListByServiceResponse, + PrivateLinkResourcesGetOptionalParams, + PrivateLinkResourcesGetResponse +} from "../models"; + +/** Interface representing a PrivateLinkResources. */ +export interface PrivateLinkResources { + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesListByServiceOptionalParams + ): Promise; + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesAdtAPI.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesAdtAPI.ts new file mode 100644 index 000000000000..d2c181186572 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesAdtAPI.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + PrivateLinkResourcesAdtAPIListByServiceOptionalParams, + PrivateLinkResourcesAdtAPIListByServiceResponse, + PrivateLinkResourcesAdtAPIGetOptionalParams, + PrivateLinkResourcesAdtAPIGetResponse +} from "../models"; + +/** Interface representing a PrivateLinkResourcesAdtAPI. */ +export interface PrivateLinkResourcesAdtAPI { + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesAdtAPIListByServiceOptionalParams + ): Promise; + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesAdtAPIGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesComp.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesComp.ts new file mode 100644 index 000000000000..f8bbd9f9dee7 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesComp.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + PrivateLinkResourcesCompListByServiceOptionalParams, + PrivateLinkResourcesCompListByServiceResponse, + PrivateLinkResourcesCompGetOptionalParams, + PrivateLinkResourcesCompGetResponse +} from "../models"; + +/** Interface representing a PrivateLinkResourcesComp. */ +export interface PrivateLinkResourcesComp { + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesCompListByServiceOptionalParams + ): Promise; + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesCompGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesForMIPPolicySync.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesForMIPPolicySync.ts new file mode 100644 index 000000000000..caca0bea7941 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesForMIPPolicySync.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams, + PrivateLinkResourcesForMIPPolicySyncListByServiceResponse, + PrivateLinkResourcesForMIPPolicySyncGetOptionalParams, + PrivateLinkResourcesForMIPPolicySyncGetResponse +} from "../models"; + +/** Interface representing a PrivateLinkResourcesForMIPPolicySync. */ +export interface PrivateLinkResourcesForMIPPolicySync { + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesForMIPPolicySyncListByServiceOptionalParams + ): Promise; + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesForMIPPolicySyncGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesForSCCPowershell.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesForSCCPowershell.ts new file mode 100644 index 000000000000..0be0d46587ea --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesForSCCPowershell.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams, + PrivateLinkResourcesForSCCPowershellListByServiceResponse, + PrivateLinkResourcesForSCCPowershellGetOptionalParams, + PrivateLinkResourcesForSCCPowershellGetResponse +} from "../models"; + +/** Interface representing a PrivateLinkResourcesForSCCPowershell. */ +export interface PrivateLinkResourcesForSCCPowershell { + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesForSCCPowershellListByServiceOptionalParams + ): Promise; + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesForSCCPowershellGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesSec.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesSec.ts new file mode 100644 index 000000000000..26f9c5aadd53 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkResourcesSec.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + PrivateLinkResourcesSecListByServiceOptionalParams, + PrivateLinkResourcesSecListByServiceResponse, + PrivateLinkResourcesSecGetOptionalParams, + PrivateLinkResourcesSecGetResponse +} from "../models"; + +/** Interface representing a PrivateLinkResourcesSec. */ +export interface PrivateLinkResourcesSec { + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkResourcesSecListByServiceOptionalParams + ): Promise; + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + groupName: string, + options?: PrivateLinkResourcesSecGetOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForEDMUpload.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForEDMUpload.ts new file mode 100644 index 000000000000..eec915b2be5a --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForEDMUpload.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateLinkServicesForEDMUploadDescription, + PrivateLinkServicesForEDMUploadListOptionalParams, + PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams, + PrivateLinkServicesForEDMUploadGetOptionalParams, + PrivateLinkServicesForEDMUploadGetResponse, + PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams, + PrivateLinkServicesForEDMUploadCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForEDMUploadUpdateOptionalParams, + PrivateLinkServicesForEDMUploadUpdateResponse +} from "../models"; + +/// +/** Interface representing a PrivateLinkServicesForEDMUpload. */ +export interface PrivateLinkServicesForEDMUpload { + /** + * Get all the privateLinkServicesForEDMUpload instances in a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkServicesForEDMUploadListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForEDMUploadListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the metadata of a privateLinkServicesForEDMUpload resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForEDMUploadGetOptionalParams + ): Promise; + /** + * Create or update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForEDMUploadDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForEDMUploadDescription: PrivateLinkServicesForEDMUploadDescription, + options?: PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForEDMUploadCreateOrUpdateResponse + > + >; + /** + * Create or update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForEDMUploadDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForEDMUploadDescription: PrivateLinkServicesForEDMUploadDescription, + options?: PrivateLinkServicesForEDMUploadCreateOrUpdateOptionalParams + ): Promise; + /** + * Update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForEDMUploadUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForEDMUploadUpdateResponse + > + >; + /** + * Update the metadata of a privateLinkServicesForEDMUpload instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForEDMUploadUpdateOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForM365ComplianceCenter.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForM365ComplianceCenter.ts new file mode 100644 index 000000000000..8435ef3d5b67 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForM365ComplianceCenter.ts @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateLinkServicesForM365ComplianceCenterDescription, + PrivateLinkServicesForM365ComplianceCenterListOptionalParams, + PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams, + PrivateLinkServicesForM365ComplianceCenterGetOptionalParams, + PrivateLinkServicesForM365ComplianceCenterGetResponse, + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams, + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams, + PrivateLinkServicesForM365ComplianceCenterUpdateResponse, + PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkServicesForM365ComplianceCenter. */ +export interface PrivateLinkServicesForM365ComplianceCenter { + /** + * Get all the privateLinkServicesForM365ComplianceCenter instances in a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkServicesForM365ComplianceCenterListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription + >; + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForM365ComplianceCenterListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365ComplianceCenterDescription + >; + /** + * Get the metadata of a privateLinkServicesForM365ComplianceCenter resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365ComplianceCenterGetOptionalParams + ): Promise; + /** + * Create or update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365ComplianceCenterDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365ComplianceCenterDescription: PrivateLinkServicesForM365ComplianceCenterDescription, + options?: PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse + >, + PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateResponse + > + >; + /** + * Create or update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365ComplianceCenterDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365ComplianceCenterDescription: PrivateLinkServicesForM365ComplianceCenterDescription, + options?: PrivateLinkServicesForM365ComplianceCenterCreateOrUpdateOptionalParams + ): Promise; + /** + * Update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365ComplianceCenterUpdateResponse + >, + PrivateLinkServicesForM365ComplianceCenterUpdateResponse + > + >; + /** + * Update the metadata of a privateLinkServicesForM365ComplianceCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365ComplianceCenterUpdateOptionalParams + ): Promise; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365ComplianceCenterDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForM365SecurityCenter.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForM365SecurityCenter.ts new file mode 100644 index 000000000000..06c4044c1e9a --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForM365SecurityCenter.ts @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateLinkServicesForM365SecurityCenterDescription, + PrivateLinkServicesForM365SecurityCenterListOptionalParams, + PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams, + PrivateLinkServicesForM365SecurityCenterGetOptionalParams, + PrivateLinkServicesForM365SecurityCenterGetResponse, + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams, + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams, + PrivateLinkServicesForM365SecurityCenterUpdateResponse, + PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkServicesForM365SecurityCenter. */ +export interface PrivateLinkServicesForM365SecurityCenter { + /** + * Get all the privateLinkServicesForM365SecurityCenter instances in a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkServicesForM365SecurityCenterListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription + >; + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForM365SecurityCenterListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForM365SecurityCenterDescription + >; + /** + * Get the metadata of a privateLinkServicesForM365SecurityCenter resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365SecurityCenterGetOptionalParams + ): Promise; + /** + * Create or update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365SecurityCenterDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365SecurityCenterDescription: PrivateLinkServicesForM365SecurityCenterDescription, + options?: PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse + >, + PrivateLinkServicesForM365SecurityCenterCreateOrUpdateResponse + > + >; + /** + * Create or update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForM365SecurityCenterDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForM365SecurityCenterDescription: PrivateLinkServicesForM365SecurityCenterDescription, + options?: PrivateLinkServicesForM365SecurityCenterCreateOrUpdateOptionalParams + ): Promise; + /** + * Update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForM365SecurityCenterUpdateResponse + >, + PrivateLinkServicesForM365SecurityCenterUpdateResponse + > + >; + /** + * Update the metadata of a privateLinkServicesForM365SecurityCenter instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForM365SecurityCenterUpdateOptionalParams + ): Promise; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForM365SecurityCenterDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForMIPPolicySync.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForMIPPolicySync.ts new file mode 100644 index 000000000000..10296538bc29 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForMIPPolicySync.ts @@ -0,0 +1,141 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateLinkServicesForMIPPolicySyncDescription, + PrivateLinkServicesForMIPPolicySyncListOptionalParams, + PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams, + PrivateLinkServicesForMIPPolicySyncGetOptionalParams, + PrivateLinkServicesForMIPPolicySyncGetResponse, + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams, + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams, + PrivateLinkServicesForMIPPolicySyncUpdateResponse, + PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkServicesForMIPPolicySync. */ +export interface PrivateLinkServicesForMIPPolicySync { + /** + * Get all the privateLinkServicesForMIPPolicySync instances in a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkServicesForMIPPolicySyncListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForMIPPolicySyncListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the metadata of a privateLinkServicesForMIPPolicySync resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForMIPPolicySyncGetOptionalParams + ): Promise; + /** + * Create or update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForMIPPolicySyncDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForMIPPolicySyncDescription: PrivateLinkServicesForMIPPolicySyncDescription, + options?: PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse + >, + PrivateLinkServicesForMIPPolicySyncCreateOrUpdateResponse + > + >; + /** + * Create or update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForMIPPolicySyncDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForMIPPolicySyncDescription: PrivateLinkServicesForMIPPolicySyncDescription, + options?: PrivateLinkServicesForMIPPolicySyncCreateOrUpdateOptionalParams + ): Promise; + /** + * Update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForMIPPolicySyncUpdateResponse + > + >; + /** + * Update the metadata of a privateLinkServicesForMIPPolicySync instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForMIPPolicySyncUpdateOptionalParams + ): Promise; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForMIPPolicySyncDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForO365ManagementActivityAPI.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForO365ManagementActivityAPI.ts new file mode 100644 index 000000000000..993bb8fd4db9 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForO365ManagementActivityAPI.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateLinkServicesForO365ManagementActivityAPIDescription, + PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIGetResponse, + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams, + PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse, + PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkServicesForO365ManagementActivityAPI. */ +export interface PrivateLinkServicesForO365ManagementActivityAPI { + /** + * Get all the privateLinkServicesForO365ManagementActivityAPI instances in a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkServicesForO365ManagementActivityAPIListOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription + >; + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator< + PrivateLinkServicesForO365ManagementActivityAPIDescription + >; + /** + * Get the metadata of a privateLinkServicesForO365ManagementActivityAPI resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIGetOptionalParams + ): Promise; + /** + * Create or update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForO365ManagementActivityAPIDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForO365ManagementActivityAPIDescription: PrivateLinkServicesForO365ManagementActivityAPIDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse + >, + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse + > + >; + /** + * Create or update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForO365ManagementActivityAPIDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForO365ManagementActivityAPIDescription: PrivateLinkServicesForO365ManagementActivityAPIDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateOptionalParams + ): Promise< + PrivateLinkServicesForO365ManagementActivityAPICreateOrUpdateResponse + >; + /** + * Update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse + >, + PrivateLinkServicesForO365ManagementActivityAPIUpdateResponse + > + >; + /** + * Update the metadata of a privateLinkServicesForO365ManagementActivityAPI instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForO365ManagementActivityAPIUpdateOptionalParams + ): Promise; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForO365ManagementActivityAPIDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForSCCPowershell.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForSCCPowershell.ts new file mode 100644 index 000000000000..f6743ee94c13 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/privateLinkServicesForSCCPowershell.ts @@ -0,0 +1,141 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateLinkServicesForSCCPowershellDescription, + PrivateLinkServicesForSCCPowershellListOptionalParams, + PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams, + PrivateLinkServicesForSCCPowershellGetOptionalParams, + PrivateLinkServicesForSCCPowershellGetResponse, + PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams, + PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse, + ServicesPatchDescription, + PrivateLinkServicesForSCCPowershellUpdateOptionalParams, + PrivateLinkServicesForSCCPowershellUpdateResponse, + PrivateLinkServicesForSCCPowershellDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkServicesForSCCPowershell. */ +export interface PrivateLinkServicesForSCCPowershell { + /** + * Get all the privateLinkServicesForSCCPowershell instances in a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkServicesForSCCPowershellListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkServicesForSCCPowershellListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the metadata of a privateLinkServicesForSCCPowershell resource. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForSCCPowershellGetOptionalParams + ): Promise; + /** + * Create or update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForSCCPowershellDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForSCCPowershellDescription: PrivateLinkServicesForSCCPowershellDescription, + options?: PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse + >, + PrivateLinkServicesForSCCPowershellCreateOrUpdateResponse + > + >; + /** + * Create or update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateLinkServicesForSCCPowershellDescription The service instance metadata. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + privateLinkServicesForSCCPowershellDescription: PrivateLinkServicesForSCCPowershellDescription, + options?: PrivateLinkServicesForSCCPowershellCreateOrUpdateOptionalParams + ): Promise; + /** + * Update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForSCCPowershellUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateLinkServicesForSCCPowershellUpdateResponse + > + >; + /** + * Update the metadata of a privateLinkServicesForSCCPowershell instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + resourceName: string, + servicePatchDescription: ServicesPatchDescription, + options?: PrivateLinkServicesForSCCPowershellUpdateOptionalParams + ): Promise; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForSCCPowershellDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: PrivateLinkServicesForSCCPowershellDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/services.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/services.ts new file mode 100644 index 000000000000..ec43f03a1d6d --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/src/operationsInterfaces/services.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { ServicesDeleteOptionalParams } from "../models"; + +/** Interface representing a Services. */ +export interface Services { + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + options?: ServicesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + options?: ServicesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/test/sampleTest.ts b/sdk/m365securityandcompliance/arm-m365securityandcompliance/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/m365securityandcompliance/arm-m365securityandcompliance/tsconfig.json b/sdk/m365securityandcompliance/arm-m365securityandcompliance/tsconfig.json new file mode 100644 index 000000000000..6e3251194117 --- /dev/null +++ b/sdk/m365securityandcompliance/arm-m365securityandcompliance/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts", "./test/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/m365securityandcompliance/ci.yml b/sdk/m365securityandcompliance/ci.yml new file mode 100644 index 000000000000..b65f2d8da348 --- /dev/null +++ b/sdk/m365securityandcompliance/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/m365securityandcompliance/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/m365securityandcompliance/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: m365securityandcompliance + Artifacts: + - name: azure-arm-m365securityandcompliance + safeName: azurearmm365securityandcompliance + \ No newline at end of file