Skip to content
Draft
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Factory.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.DataFactory;
/**
* Change data capture resource type.
*/
@parentResource(Factory)
model ChangeDataCaptureResource
is Azure.ResourceManager.ProxyResource<ChangeDataCapture, false> {
...ResourceNameParameter<
Resource = ChangeDataCaptureResource,
KeyName = "changeDataCaptureName",
SegmentName = "adfcdcs",
NamePattern = "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"
>;
...Azure.ResourceManager.Legacy.EntityTagProperty;
}

@armResourceOperations
interface ChangeDataCaptureResources {
/**
* Gets a change data capture.
*/
get is ArmResourceRead<
ChangeDataCaptureResource,
Parameters = {
/**
* ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-None-Match`?: string;
},
Error = CloudError
>;

/**
* Creates or updates a change data capture resource.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
createOrUpdate is ArmResourceCreateOrReplaceSync<
ChangeDataCaptureResource,
Parameters = {
/**
* ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-Match`?: string;
},
Response = ArmResourceUpdatedResponse<ChangeDataCaptureResource>,
Error = CloudError
>;

/**
* Deletes a change data capture.
*/
delete is ArmResourceDeleteSync<
ChangeDataCaptureResource,
Error = CloudError
>;

/**
* Lists all resources of type change data capture.
*/
listByFactory is ArmResourceListByParent<
ChangeDataCaptureResource,
Response = ArmResponse<ChangeDataCaptureListResponse>,
Error = CloudError
>;

/**
* Starts a change data capture.
*/
start is ArmResourceActionSync<
ChangeDataCaptureResource,
void,
OkResponse,
Error = CloudError
>;

/**
* Stops a change data capture.
*/
stop is ArmResourceActionSync<
ChangeDataCaptureResource,
void,
OkResponse,
Error = CloudError
>;

/**
* Gets the current status for the change data capture resource.
*/
@get
status is ArmResourceActionSync<
ChangeDataCaptureResource,
void,
ArmResponse<ChangeDataCaptureStatusResponse>,
Error = CloudError
>;
}

@@maxLength(ChangeDataCaptureResource.name, 260);
@@minLength(ChangeDataCaptureResource.name, 1);
@@doc(ChangeDataCaptureResource.name, "The change data capture name.");
@@doc(ChangeDataCaptureResource.properties,
"Properties of the change data capture."
);
@@doc(ChangeDataCaptureResources.createOrUpdate::parameters.resource,
"Change data capture resource definition."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Factory.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.DataFactory;
/**
* Credential resource type.
*/
@parentResource(Factory)
model CredentialResource
is Azure.ResourceManager.ProxyResource<Credential, false> {
...ResourceNameParameter<
Resource = CredentialResource,
KeyName = "credentialName",
SegmentName = "credentials",
NamePattern = "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"
>;
...Azure.ResourceManager.Legacy.EntityTagProperty;
}

@armResourceOperations
interface CredentialResources {
/**
* Gets a credential.
*/
get is ArmResourceRead<
CredentialResource,
Parameters = {
/**
* ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-None-Match`?: string;
},
Response = ArmResponse<CredentialResource> | NotModifiedResponse,
Error = CloudError
>;

/**
* Creates or updates a credential.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
createOrUpdate is ArmResourceCreateOrReplaceSync<
CredentialResource,
Parameters = {
/**
* ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-Match`?: string;
},
Response = ArmResourceUpdatedResponse<CredentialResource>,
Error = CloudError
>;

/**
* Deletes a credential.
*/
delete is ArmResourceDeleteSync<CredentialResource, Error = CloudError>;

/**
* List credentials.
*/
listByFactory is ArmResourceListByParent<
CredentialResource,
Response = ArmResponse<CredentialListResponse>,
Error = CloudError
>;
}

@@maxLength(CredentialResource.name, 127);
@@minLength(CredentialResource.name, 1);
@@doc(CredentialResource.name, "Credential name");
@@doc(CredentialResource.properties, "Properties of credentials.");
@@doc(CredentialResources.createOrUpdate::parameters.resource,
"Credential resource definition."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Factory.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.DataFactory;
/**
* Data flow resource type.
*/
@parentResource(Factory)
model DataFlowResource is Azure.ResourceManager.ProxyResource<DataFlow, false> {
...ResourceNameParameter<
Resource = DataFlowResource,
KeyName = "dataFlowName",
SegmentName = "dataflows",
NamePattern = "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"
>;
...Azure.ResourceManager.Legacy.EntityTagProperty;
}

@armResourceOperations
interface DataFlowResources {
/**
* Gets a data flow.
*/
get is ArmResourceRead<
DataFlowResource,
Parameters = {
/**
* ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-None-Match`?: string;
},
Error = CloudError
>;

/**
* Creates or updates a data flow.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
createOrUpdate is ArmResourceCreateOrReplaceSync<
DataFlowResource,
Parameters = {
/**
* ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-Match`?: string;
},
Response = ArmResourceUpdatedResponse<DataFlowResource>,
Error = CloudError
>;

/**
* Deletes a data flow.
*/
delete is ArmResourceDeleteSync<DataFlowResource, Error = CloudError>;

/**
* Lists data flows.
*/
listByFactory is ArmResourceListByParent<
DataFlowResource,
Response = ArmResponse<DataFlowListResponse>,
Error = CloudError
>;
}

@@maxLength(DataFlowResource.name, 260);
@@minLength(DataFlowResource.name, 1);
@@doc(DataFlowResource.name, "The data flow name.");
@@doc(DataFlowResource.properties, "Data flow properties.");
@@doc(DataFlowResources.createOrUpdate::parameters.resource,
"Data flow resource definition."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Factory.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.DataFactory;
/**
* Dataset resource type.
*/
@parentResource(Factory)
model DatasetResource is Azure.ResourceManager.ProxyResource<Dataset, false> {
...ResourceNameParameter<
Resource = DatasetResource,
KeyName = "datasetName",
SegmentName = "datasets",
NamePattern = "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"
>;
...Azure.ResourceManager.Legacy.EntityTagProperty;
}

@armResourceOperations
interface DatasetResources {
/**
* Gets a dataset.
*/
get is ArmResourceRead<
DatasetResource,
Parameters = {
/**
* ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-None-Match`?: string;
},
Response = ArmResponse<DatasetResource> | NotModifiedResponse,
Error = CloudError
>;

/**
* Creates or updates a dataset.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
createOrUpdate is ArmResourceCreateOrReplaceSync<
DatasetResource,
Parameters = {
/**
* ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@header
`If-Match`?: string;
},
Response = ArmResourceUpdatedResponse<DatasetResource>,
Error = CloudError
>;

/**
* Deletes a dataset.
*/
delete is ArmResourceDeleteSync<DatasetResource, Error = CloudError>;

/**
* Lists datasets.
*/
listByFactory is ArmResourceListByParent<
DatasetResource,
Response = ArmResponse<DatasetListResponse>,
Error = CloudError
>;
}

@@maxLength(DatasetResource.name, 260);
@@minLength(DatasetResource.name, 1);
@@doc(DatasetResource.name, "The dataset name.");
@@doc(DatasetResource.properties, "Dataset properties.");
@@doc(DatasetResources.createOrUpdate::parameters.resource,
"Dataset resource definition."
);
Loading
Loading