Java 类com.amazonaws.services.apigateway.model.PatchOperation 实例源码

项目:ServerlessJavaMaven    文件:Tester.java   
public void run()
{
    String AWSAccessKey="AKIAJM7YMMLXKUH5EWRQ";
    String AWSSecretKey="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";

       BasicAWSCredentials awsCredentials = new BasicAWSCredentials(AWSAccessKey, AWSSecretKey);

       AmazonApiGatewayClient apiClient = new AmazonApiGatewayClient(awsCredentials);
       apiClient.setRegion(Region.getRegion(Regions.US_WEST_2));

       GetRestApisRequest graReq = new GetRestApisRequest();
    GetRestApisResult graRes = apiClient.getRestApis(graReq);
    RestApi theApi = null;
    for ( RestApi api : graRes.getItems() )
    {
        System.out.println("Found existing REST API: " + api.getName());
        if ( "TestAPI".equals(api.getName()))
        {
            theApi = api;



            GetExportRequest geReq = new GetExportRequest()
                    .withRestApiId(api.getId())
                    .withExportType("swagger")
                    .withStageName("TEST");
            GetExportResult geRes = apiClient.getExport(geReq);
            String f = new String(geRes.getBody().array());
            int x = 1;
            String from = "";
            PatchOperation po = new PatchOperation()
                    .withFrom(from)
                    .withOp(Op.Replace)
                    .withPath("");
        }
    }

}
项目:aws-apigateway-importer    文件:PatchUtils.java   
public static PatchOperation createReplaceOperation(String path, String value) {
    PatchOperation op = new PatchOperation();
    op.setOp("replace");
    op.setPath(path);
    op.setValue(value);
    return op;
}
项目:aws-apigateway-importer    文件:PatchUtils.java   
public static  PatchOperation createAddOperation(String path, String value) {
    PatchOperation op = new PatchOperation();
    op.setOp("add");
    op.setPath(path);
    op.setValue(value);
    return op;
}
项目:aws-apigateway-importer    文件:PatchUtils.java   
public static  PatchDocument createPatchDocument(PatchOperation... ops) {
    PatchDocument pd = new PatchDocument();
    pd.setPatchOperations(new ArrayList<>());
    for (PatchOperation op : ops) {
        pd.getPatchOperations().add(op);
    }
    return pd;
}
项目:aws-api-gateway    文件:PatchUtils.java   
public static PatchOperation createReplaceOperation(String path, String value) {
    PatchOperation op = new PatchOperation();
    op.setOp("replace");
    op.setPath(path);
    op.setValue(value);
    return op;
}
项目:aws-api-gateway    文件:PatchUtils.java   
public static  PatchOperation createAddOperation(String path, String value) {
    PatchOperation op = new PatchOperation();
    op.setOp("add");
    op.setPath(path);
    op.setValue(value);
    return op;
}
项目:aws-api-gateway    文件:PatchUtils.java   
public static  PatchDocument createPatchDocument(PatchOperation... ops) {
    PatchDocument pd = new PatchDocument();
    pd.setPatchOperations(new ArrayList<>());
    for (PatchOperation op : ops) {
        pd.getPatchOperations().add(op);
    }
    return pd;
}
项目:aws-apigateway-importer    文件:PatchUtils.java   
public static  PatchOperation createRemoveOperation(String path) {
    PatchOperation op = new PatchOperation();
    op.setOp("remove");
    op.setPath(path);
    return op;
}
项目:aws-api-gateway    文件:PatchUtils.java   
public static  PatchOperation createRemoveOperation(String path) {
    PatchOperation op = new PatchOperation();
    op.setOp("remove");
    op.setPath(path);
    return op;
}